Data transmission method and system

Through the distributed architecture of MQTT and EMQX combined with Canvas, the problem of single data transmission delay and interaction forms in the existing technology is solved, and a personalized data transmission method with strong real-time, rich interactiveness, and visual display is realized. It is suitable for online education, intelligent medical care, industrial manufacturing and other fields.

CN120301880APending Publication Date: 2025-07-11SHANGHAI WEIRUAN INFORMATION TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510446629.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-10
Publication Date
2025-07-11

AI Technical Summary

Technical Problem

The existing data transmission technology has problems such as delay, lag, single interaction forms, and inability to meet the diverse needs of users in the fields of live broadcast and the Internet of Things. It is especially difficult to achieve efficient and real-time data transmission and personalized visual display in an unstable environment.

Method used

The MQTT protocol is used for data encapsulation and transmission, the EMQX server cluster is used for message filtering and distribution, and the Canvas visual interface is used for display. The data transmission and display are optimized through distributed architecture and machine learning algorithms to achieve real-time interaction and personalized display.

Benefits of technology

It realizes efficient data transmission in low-latency and unstable network environments, supports rich interactive operations and personalized visual presentation, reduces development and operation costs, and improves system scalability and maintainability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120301880A_ABST
    Figure CN120301880A_ABST
Patent Text Reader

Abstract

The invention provides a data transmission method and system, and the method comprises the steps: generating data at a device or a user terminal at a data source end, packaging the data through an MQTT client, publishing the packaged data to an EMQX server cluster and other distributed system server clusters, and distributing a message to the MQTT client at a data receiving and display end through the EMQX server cluster according to a subscription relation. And the MQTT client transmits the message to a Canvas visual interface to be displayed. The distributed architecture is adopted, the MQTT is responsible for data transmission, the EMQX is responsible for message processing, the Canvas is responsible for visual display, and all modules are clear in responsibility and low in coupling degree. Compared with a traditional centralized architecture, the system is high in expansibility and easy to maintain. According to the method, the functions of strong real-time performance, rich interactivity and visual display individuation are realized, compared with the traditional HTTP data transmission and simple visualization technology, the low-delay transmission of the MQTT ensures the real-time performance of the data, and the flexible drawing capability of the Canvas supports the user to carry out interactive operations such as zooming, labeling and the like and individuation display.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of data transmission and computer technology, and particularly to a data transmission method and system. Background Art

[0002] With the rapid development of Internet technology, the demand for real-time data interaction and visual display is increasing in many fields. In scenarios such as live broadcasts, the Internet of Things, and online education, there is an urgent need for a technical solution that can achieve efficient data transmission, real-time interaction, and personalized visual display. For example, in the live broadcast industry, viewers expect to watch high-definition and smooth live content in real time and interact with the anchor and other viewers in various ways; in the field of the Internet of Things, enterprises need to remotely monitor and manage a large number of devices, requiring device status data to be transmitted in a timely and accurate manner and presented in an intuitive way. However, existing technologies have many deficiencies in meeting these requirements. For example, in existing live broadcast technologies, due to the large amount of data, unstable network environment, and high requirements for devices during network transmission, serious delays, lags, and even interruptions often occur, seriously affecting the viewing experience of viewers. For example, during a live broadcast of a large event, a freeze in the picture at a critical moment may cause viewers to miss exciting moments. The traditional live broadcast interaction form is limited to simple text chats, unable to meet the diverse needs of users, and viewers lack personalized operation means for the live broadcast picture. For example, in an educational live broadcast, it cannot meet the needs of students to zoom in and view key content pictures. Summary of the Invention

[0003] In view of the above-mentioned disadvantages of the prior art, the purpose of the present invention is to provide a data transmission method and system for solving the technical problems existing in the prior art.

[0004] To achieve the above object and other related objects, the present invention provides a data transmission method, including the following steps:

[0005] Obtain the data generated by the data source terminal in the target scenario, denoted as source data;

[0006] Use the first MQTT client to encapsulate the source data and publish the encapsulated data to a preset server cluster; wherein, the first MQTT client is located at the data source terminal;

[0007] Filter the encapsulated data through the server cluster, and distribute the filtered encapsulated data to the second MQTT client according to the subscription relationship, and parse it through the second MQTT client, and transmit the parsed data to a preset visualization interface for display; wherein, the second MQTT client is located at the data display end.

[0008] Optionally, the target scenarios include: scenarios in the field of online education, scenarios in the field of intelligent healthcare, scenarios in the field of industrial manufacturing, scenarios in the field of intelligent transportation, and / or scenarios in the field of smart home.

[0009] Optionally, the server cluster includes a distributed system server cluster, and the preset visualization interface includes a Canvas visualization interface.

[0010] Optionally, if the target scenario is a scenario in the field of online education, the method further includes:

[0011] Extracting features and classifying the message text using a pre-trained BERT model;

[0012] Based on the feature extraction and classification results, jointly training the pre-trained BERT model through federated learning in a homomorphic encryption manner;

[0013] Dynamically adjusting the message distribution strategy according to the teaching progress, students' needs, and behavior patterns.

[0014] Optionally, if the target scenario is a scenario in the field of online education, the method further includes:

[0015] Training the teaching text through the Word2Vec algorithm and mapping words into low-dimensional vectors;

[0016] Identifying the text using a named entity recognition algorithm based on conditional random fields, and integrating entity and semantic relationships to construct a knowledge graph;

[0017] According to the natural language description of the teacher, using the knowledge graph to match teaching resources through a breadth-first search algorithm, and pushing the matched teaching resources to the corresponding students.

[0018] Optionally, when transmitting the parsed data to a preset visualization interface for display, the method further includes:

[0019] Obtaining a generator obtained in advance or in real time, and generating a visualization style through random noise;

[0020] Using a discriminator to distinguish between the generated visualization style and the real user preference style, and generating a unique visualization style according to user sentiment analysis and scenario requirements;

[0021] Feeding back the judgment result of the discriminator to the generator, and having the generator update the strategy, iteratively updating the strategy for generating the visualization style in a loop; and iteratively feeding back the optimized judgment criterion to the discriminator through the generator for iterative discrimination.

[0022] Optionally, the method further includes:

[0023] For distributed nodes in a distributed system server cluster, a distributed system consensus algorithm is used for message interaction in the pre-prepare phase, prepare phase, and commit phase, and after reaching a consensus, distribution is performed according to a trust mechanism and fair tasks;

[0024] Obtain historical message features and use the historical message features as inputs to a convolutional neural network and a long short-term memory network model;

[0025] Perform multi-layer network training, use the stochastic gradient descent algorithm to backpropagate and calculate gradients, and adjust network weights to minimize the cross-entropy loss function;

[0026] Predict message generation and flow directions based on the trained model to optimize resource allocation in the distributed system server cluster.

[0027] Optionally, the method further includes:

[0028] Collect network metric data through an SDN controller and solve for the optimal flow table rules based on the Bellman equation in combination with a dynamic programming algorithm;

[0029] Adjust the flow table and regulate the data traffic of the first MQTT client and / or the second MQTT client based on the flow table adjustment result;

[0030] Introduce a quantum encryption algorithm for data encryption, construct state, action, and reward functions, use the Q-learning algorithm to control the agent to try different actions, and determine whether the reward value increases;

[0031] If the reward value increases, update the Q-value table and optimize the transmission strategy;

[0032] If the reward value does not increase, return to controlling the agent to try different actions again.

[0033] Optionally, the process of collecting network metric data through an SDN controller further includes:

[0034] Based on the collected network metric data, analyze network metrics, including bandwidth utilization, latency, and packet loss rate; and, based on the collected network metric data, analyze traffic patterns using machine learning or a rule engine, identify critical business flows and bottleneck links, and formulate a traffic scheduling strategy according to business priorities so that high-priority traffic can obtain bandwidth and low latency first; and,

[0035] Adjust the routing table of network devices through the SDN controller to dynamically select the optimal path and perform load balancing control among multiple paths; and,

[0036] When a network failure is detected, recalculate the route through the SDN controller and switch the traffic to the backup path; and, when the network load increases, automatically expand the network resources, including enabling backup links or increasing the bandwidth.

[0037] The present invention also provides a data transmission system, which includes:

[0038] A data source terminal, configured to generate data in a target scenario, denoted as source data; and, encapsulate the source data using a first MQTT client and publish the encapsulated data to a preset server cluster; wherein, the first MQTT client is located at the data source terminal;

[0039] A server cluster, configured to filter the encapsulated data and distribute the filtered encapsulated data to a second MQTT client according to the subscription relationship;

[0040] A data display terminal, configured to parse through the second MQTT client and transmit the parsed data to a preset visualization interface for display; wherein, the second MQTT client is located at the data display terminal.

[0041] As described above, the present invention provides a data transmission method and system, which has the following beneficial effects: Data can be generated at the device or user terminal at the data source end, and then encapsulated by the MQTT client and published to a distributed system server cluster such as the EMQX server cluster. Then, the EMQX server cluster distributes the messages to the MQTT clients at the data receiving and display end according to the subscription relationship, and the MQTT client then passes the messages to the Canvas visualization interface for display. The present invention adopts a distributed architecture, where MQTT is responsible for data transmission, EMQX is responsible for message processing, and Canvas is responsible for visual display. The responsibilities of each module are clear and the coupling degree is low. Compared with the traditional centralized architecture, it has strong scalability and is easy to maintain. For example, when a large number of Internet of Things devices are connected, the EMQX cluster nodes can be increased to handle it. The present invention realizes the functions of strong real-time performance, rich interactivity, and personalized visual display. Compared with the traditional HTTP data transmission and simple visualization technology, the low-latency transmission of MQTT ensures data real-time performance, and the flexible drawing ability of Canvas supports users to perform interactive operations such as zooming and annotation and personalized display. The present invention is based on mature open-source technologies, and rich community resources and existing frameworks can be utilized during the development process to shorten the development cycle and reduce the development cost. For example, EMQX provides a complete API and plugin mechanism, which is convenient for developers to integrate. Moreover, the low bandwidth requirement of MQTT reduces the data transmission cost, and the high concurrency processing ability of EMQX reduces the investment in server hardware resources, overall reducing the system construction and operation costs. In the field of smart home, for the long-term data transmission of a large number of devices, if the traditional high-bandwidth protocol is adopted, the cost will increase significantly. Therefore, the present invention can adopt the MQTT protocol as the basis for data transmission. MQTT is a lightweight protocol based on the publish / subscribe model and can efficiently transmit data in a low-bandwidth and unstable network environment. For example, in the real-time interaction of live courseware, it is published to the EMQX message server through the MQTT client, and the server is responsible for receiving, storing, and distributing these messages to ensure the accurate transmission of data between different users and the service center. At the same time, the present invention uses Canvas technology to achieve visual display on the client side. By operating the Canvas API through JavaScript, the received data is converted into intuitive graphics, charts, or animations. For example, in the drawing board of the live broadcast, the operation trajectory of the host (such as a paintbrush, eraser, etc.) is presented on the Canvas in the form of a real-time dynamic trajectory, which is convenient for users to receive and view in real time. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 It is a schematic flow chart of the data transmission method provided by an embodiment of the present invention;

[0043] Figure 2 It is a schematic flow chart of message filtering and distribution provided by an embodiment of the present invention;

[0044] Figure 3 It is a schematic flow diagram of the publish / subscribe mechanism provided in an embodiment of the present invention;

[0045] Figure 4 It is a schematic flow diagram of the visual display provided in an embodiment of the present invention;

[0046] Figure 5 It is a schematic flow diagram of the message processing provided in an embodiment of the present invention;

[0047] Figure 6 It is a schematic flow diagram of the data transmission provided in an embodiment of the present invention;

[0048] Figure 7 It is a schematic framework diagram of the data transmission system provided in an embodiment of the present invention. Detailed implementation manners

[0049] The following uses specific specific examples to illustrate the implementation manners of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific implementation manners. Various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that, without conflict, the following embodiments and the features in the embodiments can be combined with each other.

[0050] It should be noted that the diagrams provided in this embodiment only illustrate the basic concept of the present invention in a schematic manner. Therefore, only the components related to the present invention are shown in the diagrams, rather than being drawn according to the number, shape, and size of the components in actual implementation. The types, quantities, and proportions of the components in actual implementation can be arbitrarily changed, and the component layout type may also be more complex.

[0051] Please refer to Figures 1 to 6 As shown, this embodiment provides a data transmission method, including the following steps:

[0052] Obtain the data generated by the data source terminal in the target scenario, denoted as source data. As an example, in this embodiment or other embodiments, the target scenario includes, but is not limited to: scenarios in the fields of online education, intelligent healthcare, industrial manufacturing, intelligent transportation, and / or smart home, etc.

[0053] Use the first MQTT client to encapsulate the source data and publish the encapsulated data to a pre-set server cluster; wherein, the first MQTT client is located at the data source terminal. As an example, in this embodiment or other embodiments, the server cluster includes, but is not limited to, a distributed system server cluster, such as an EMQX server cluster.

[0054] Filter the encapsulated data through a server cluster, distribute the filtered encapsulated data to a second MQTT client according to the subscription relationship, parse it through the second MQTT client, and transmit the parsed data to a preset visualization interface for display; wherein, the second MQTT client is located at the data display end. As an example, in this embodiment or other embodiments, the preset visualization interface includes, but is not limited to, a Canvas visualization interface.

[0055] According to the above description, in an exemplary embodiment, as Figure 2 shown, if the target scenario is an online education field scenario, then the data transmission method may further include: extracting features and classifying the message text by using a pre-trained BERT model; based on the feature extraction and classification results, jointly training the pre-trained BERT model through homomorphic encryption and federated learning; dynamically adjusting the message distribution strategy according to the teaching progress, student needs, and behavior patterns. It can be seen that this embodiment can develop a message intelligent processing algorithm based on transfer learning and federated learning. In the message filtering stage, transfer learning is used to transfer the knowledge of other live courses or the education field to the current live course, quickly and accurately filtering out useful messages, such as filtering out irrelevant advertising information and incorrect instructions. In the distribution stage, different nodes are enabled to cooperate and learn through federated learning, and the message distribution strategy is dynamically adjusted according to the teacher's teaching progress, students' real-time needs, and behavior patterns to ensure that important messages, such as the teacher's questions and key points of explanation, are delivered in a timely and accurate manner. For example, when the teacher explains difficult knowledge, the system preferentially distributes relevant supplementary materials and solution ideas to students according to the students' answering situations and question frequencies.

[0056] According to the above description, in an exemplary embodiment, as Figure 3 shown, if the target scenario is an online education field scenario, then the method further includes: training teaching texts through the Word2Vec algorithm and mapping words into low-dimensional vectors; identifying texts by using a named entity recognition algorithm based on conditional random fields and integrating entity and semantic relationships to construct a knowledge graph; according to the teacher's natural language description, using the knowledge graph to match teaching resources through a breadth-first search algorithm and pushing the matched teaching resources to the corresponding students. It can be seen that by constructing a domain knowledge graph, information such as data, devices, and users is semantically associated to achieve precise subscription based on semantic understanding. Taking the live class scenario as an example, before the live class, the teacher can describe the course content, teaching objectives, and knowledge points expected for students to receive in natural language, parse the semantics by using the knowledge graph, and precisely match relevant teaching materials, exercises, extended readings, etc. and push them to students, greatly improving the accuracy and comprehensiveness of obtaining teaching resources.

[0057] According to the above description, in an exemplary embodiment, asFigure 4 As shown, when transmitting the parsed data to a preset visualization interface for display, the data transmission method may further include: obtaining a generator obtained in advance or in real time, and generating a visualization style through random noise; using a discriminator to distinguish the generated visualization style from the true user preference style, and generating a unique visualization style according to user sentiment analysis and scenario requirements; feeding back the judgment result of the discriminator to the generator, and having the generator update the strategy, and iteratively update the strategy for generating the visualization style in a loop; and iteratively feeding back the optimized judgment criterion to the discriminator through the generator for iterative discrimination.

[0058] According to the above description, in an exemplary embodiment, as Figure 5 As shown, the data transmission method may further include: for distributed nodes in a distributed system server cluster, performing message interaction in the pre-preparation stage, preparation stage, and commit stage using a distributed system consensus algorithm, and after reaching a consensus, performing distribution according to a trust mechanism and fair tasks; obtaining historical message features and using the historical message features as inputs to a convolutional neural network and a long short-term memory network model; performing multi-layer network training, using a stochastic gradient descent algorithm to backpropagate and calculate gradients, and adjusting network weights to minimize a cross-entropy loss function; predicting message generation and flow directions according to the trained model to optimize resource allocation in the distributed system server cluster.

[0059] According to the above description, in an exemplary embodiment, as Figure 6As shown, the data transmission method may further include: collecting network metric data through an SDN controller, and solving for the optimal flow table rules based on the Bellman equation in combination with the dynamic programming algorithm; adjusting the flow table, and regulating the data traffic of the first MQTT client and / or the second MQTT client based on the adjustment result of the flow table; introducing a quantum encryption algorithm for data encryption, and constructing state, action, and reward functions, controlling the agent to try different actions through the Q-learning algorithm, and determining whether the reward value increases; if the reward value increases, updating the Q-value table and optimizing the transmission strategy; if the reward value does not increase, returning to control the agent to try different actions again. In addition, in this embodiment or other embodiments, the process of collecting network metric data through the SDN controller further includes: analyzing network metrics based on the collected network metric data, including bandwidth utilization, latency, and packet loss rate; and, based on the collected network metric data, analyzing traffic patterns using machine learning or a rule engine, identifying critical business flows and bottleneck links, and formulating a traffic scheduling strategy according to business priorities, so that high-priority traffic can obtain bandwidth and low latency first; and, dynamically selecting the optimal path by adjusting the routing table of network devices through the SDN controller, and performing load balancing control among multiple paths; and, when a network failure is detected, recalculating the route through the SDN controller and switching the traffic to the backup path; and, automatically expanding network resources when the network load increases, including enabling backup links or increasing bandwidth.

[0060] According to the above description, in a specific embodiment, the data transmission method can be applied to the scenario of the online education field, including:

[0061] Real-time interactive classroom: In the online education scenario, with the help of the MQTT lightweight message transmission protocol and the powerful message processing ability of EMQX, teachers can transmit teaching materials such as high-definition teaching audio and video and elaborately made PPTs to the student terminals at almost real-time speed. Students use Canvas technology to freely and real-time annotate and doodle on the screen with teaching content, just like marking key points in a book with a colored pen in a physical classroom. Teachers can also view these operations of students synchronously, just like walking around the classroom to observe the learning situation of students, realizing efficient and natural interactive communication between teachers and students. For example, in mathematics teaching, teachers clearly show complex problem-solving steps step by step through Canvas, and students can raise questions and share their problem-solving ideas at any time, creating a lively classroom interaction atmosphere and greatly improving the teaching effect.

[0062] Personalized learning analysis: With the efficient data collection capability of MQTT, various operation data of students in the learning process are collected, including the correctness of answers, the length of time spent watching teaching videos, and the activeness of participating in discussions. These data are transmitted to the EMQX server for in-depth processing and precise distribution. Subsequently, the data are deeply analyzed with the help of advanced algorithms to gain insight into students' learning habits and accurately assess their mastery of knowledge. Finally, Canvas is used to present the analysis results to teachers and students in the form of intuitive visual charts, which provides strong data support for teachers to formulate personalized teaching plans, and also helps students better understand their learning status and clarify the direction of their efforts.

[0063] When this embodiment uses the personalized visualization display method implemented by Canvas, the intrinsic structure and characteristics of the live course data can be mined through topological data analysis, such as the relationship between students' learning paths and the degree of mastery of knowledge points. The data is mapped to the visualization space using a deep learning algorithm to generate a visualization graphic with high recognition and expressiveness. For example, the data such as the correct rate of students' answers in the live course and the activeness of participating in the discussion are displayed to teachers and students in the form of intuitive radar charts, line charts, etc., to help them quickly understand the learning situation. At the same time, the emotional state of the students can also be analyzed, such as by capturing the students' facial expressions through the camera to judge their concentration, confusion, and historical operation data, to generate a visualization style that meets the students' emotional needs and usage habits. For example, when a student is detected to have a confused expression, the system automatically displays the knowledge points currently being explained in a more concise and prominent way, increases the font, changes the color, and provides relevant prompts and explanations.

[0064] According to the above records, when the data transmission method is applied to the online education field, the new deployment architecture of the EMQX cluster can adopt a multi-layer distributed cluster architecture based on edge computing and fog computing. A lightweight EMQX edge server is deployed at the edge node close to the student end, which is responsible for real-time collection of student device connection information, operation instructions and other data, and performs preliminary processing, such as data format conversion and outlier detection.

[0065] The data format conversion process includes data parsing, format unification, and data mapping. Specifically, data parsing: For different types of data sources, the edge server parses the collected data according to pre-defined protocol parsing rules. For example, if the student uses a device that sends data based on the HTTP protocol, the server extracts parts such as the request header and request body according to the HTTP protocol specification. If the data is transmitted through the WebSocket protocol, it is parsed according to the WebSocket frame format, and the byte stream is converted into a meaningful data structure. Format unification: The parsed data is often in multiple formats, such as JSON, XML, binary, etc. For the convenience of subsequent processing, the edge server uniformly converts these different formats of data into an intermediate format, such as JSON format. For XML data, an XML parser is used to convert it into a JSON object; for binary data, according to its specific encoding rules and data structure definitions, it is converted into the corresponding JSON representation. Data mapping: After unifying the format, it is also necessary to map the data into a structure suitable for subsequent processing. For example, in the operation instructions sent by the student device, there may be some device-specific identifiers and operation codes. The edge server will map these identifiers and codes into the general identifiers and operation types within the system. Suppose the student device uses a specific device ID and operation code "0x01" to represent the "zoom in courseware" operation. The edge server maps it to a unified operation identifier "zoom_in_courseware" and a general device identifier, so that subsequent processing does not need to care about the differences of specific devices.

[0066] The outlier detection process includes statistical outlier detection, rule-based outlier detection and data post-processing. Specifically, statistical outlier detection: calculate the statistical characteristics of the data, such as mean, standard deviation, median, etc. For the connection time interval data of the student device, first calculate the mean \(\mu\) and standard deviation \(\sigma\) of the connection time interval within a period of time. Then, set a threshold range. For example, when the connection time interval is greater than \(\mu+3\sigma\) or less than \(\mu-3\sigma\), it is considered that the connection time interval data may be an outlier. This is based on the 3\(\sigma\) principle in statistics. In the data of normal distribution, the probability of data exceeding this range is extremely low, and it is likely to be an abnormal situation. Rule-based outlier detection: formulate a series of rules based on business logic to detect outliers. For example, it is stipulated that the frequency of students' operation instructions on the courseware in a class cannot exceed a certain upper limit. If it exceeds, it is considered that the operation instruction data may be abnormal. For example, students send operation instructions when they are not logged in. This is obviously not in line with the normal business process and is an abnormal situation. After receiving the data, the edge server checks the data according to these rules and marks the data that does not conform to the rules as an outlier. Subsequent data processing: After data format conversion and outlier detection, normal data will be further processed, such as data compression, encryption, and other operations, and then sent to the fog node for aggregation and in-depth analysis. For detected outliers, the edge server can record and send alarm information to the administrator or related system modules to handle the abnormal situation in a timely manner. At the same time, outlier data can also be saved for subsequent data analysis and troubleshooting to help optimize system performance and improve data quality.

[0067] Deploy medium-sized fog servers at fog nodes to aggregate and deeply analyze data from multiple edge nodes, such as counting students' participation in the live broadcast process and the accuracy of answering questions. The core cluster is responsible for processing key business messages of the entire live course, such as the opening and closing of the live broadcast, and the identity verification of teachers. Through the self-developed distributed consistency algorithm and multi-level caching mechanism, data consistency and efficient transmission between clusters at all levels are ensured. For example, when multiple students submit homework at the same time, the edge server quickly processes the data format, the fog server summarizes and analyzes the completion of the homework, and the core cluster ensures the stability of the entire submission process and data security.

[0068] It can be seen from this that for the scenarios in the online education field: Teachers use professional live broadcast equipment to transmit data such as high-definition videos, audio, and teaching documents to the EMQX cluster in real time using the MQTT protocol. Students use ordinary computer, tablet, or mobile phone devices, and with the help of browsers or dedicated clients, they use the visual interface built by Canvas for learning. During the live broadcast, teachers can display teaching content in real time, such as writing formulas and showing pictures on the virtual blackboard drawn in Canvas. Students interact through mouse, keyboard, or touch operations, such as sending text questions and answering in the answering area drawn in Canvas. EMQX is used to collect and analyze students' learning behavior data, and combined with artificial intelligence technology, it provides personalized teaching suggestions for teachers, such as recommending adjustments to the explanation rhythm and repeated explanations of key content according to students' answering situations. At the same time, intelligent tutoring tools are provided for students, such as automatic question answering and knowledge point summary, to achieve intelligent and personalized teaching. For example, when the answering accuracy rate of most students for a certain knowledge point is low, the teacher is automatically reminded to slow down the explanation speed, and relevant review materials and practice questions are pushed to the students.

[0069] In addition, MQTT adopts the publish-subscribe mode and has the characteristics of being lightweight. In the live class scenario, in a distributed network environment at the teacher's end and the student's end, after encoding data such as high-definition videos, audio, and teaching documents, the teacher publishes them in the form of MQTT messages to a specific topic. The student's end subscribes to the corresponding topic in advance and can receive data in real time. When the network condition is poor, MQTT can automatically adjust the transmission rate according to the network bandwidth, such as reducing the video resolution or audio sampling rate, and at the same time has an ordered transmission and retransmission mechanism. If a data packet is lost, it can be automatically resent to ensure data integrity. In addition, the TLS / SSL encryption technology can be combined to ensure data security while reducing the additional delay caused by security verification and other links, so as to achieve low-latency real-time data transmission, which can better meet the stringent requirements for real-time performance in live classes compared with traditional HTTP. Moreover, EMQX runs on a distributed cluster architecture. When the student's end sends interactive messages (such as asking questions, submitting homework, etc.), EMQX first receives and parses the messages to identify the type and source. With the help of distributed technology, consensus is reached among cluster nodes to ensure the consistency and reliability of message processing. The Canvas technology can build a visual interface on the student's browser or client. After the teaching content (such as virtual blackboard writing, picture display, video playback, etc.) displayed by the teacher in the live broadcast is transmitted to the student's end through MQTT, it is rendered by Canvas. Canvas supports rich graphic drawing and interaction functions, and students can perform interactive operations such as zooming, dragging, and annotating on the teaching content through mouse, keyboard, or touch operations, such as zooming in on teaching pictures to view details and annotating notes on key content.

[0070] In summary, through the above technical process of the collaborative work of MQTT, EMQX, and Canvas, in the scenario of live online classes, it can demonstrate more excellent effects than traditional HTTP data transmission and simple visualization technologies in terms of data real-time performance, message processing efficiency, and visual interaction experience.

[0071] According to the above description, in a specific embodiment, the data transmission method can be applied to the scenario of the intelligent medical field, including:

[0072] Remote medical diagnosis: In the scenario of remote medical treatment, doctors and patients establish a stable connection bridge through MQTT. Medical devices beside the patients, such as electrocardiogram monitors that continuously monitor the heart condition and sphygmomanometers that measure blood pressure, etc., will transmit the collected key physiological data to the EMQX server quickly through MQTT, and then the server will accurately forward it to the doctor's end. Doctors use Canvas technology to directly make real-time annotations on the changes in the patient's condition in the electronic medical record, and at the same time conduct a detailed analysis of the charts of various physiological indicators, just like observing the patient's condition in person beside the patient, realizing efficient and accurate remote diagnosis, enabling high-quality medical resources to cross geographical limitations and benefit more patients.

[0073] Medical training simulation: During medical training, with the help of MQTT and EMQX, a high-speed communication network in a virtual surgical environment is constructed to accurately simulate the data interaction between surgical instruments and patient models. Using Canvas technology, it is possible to draw highly realistic human organ models and surgical scenes, providing an immersive virtual surgical operation space for doctors or medical students. In this virtual environment, they can perform operation exercises for various complex surgeries and can interact with the instructor in various forms such as voice and text in real time, obtaining guidance and feedback in a timely manner, greatly improving the effect and efficiency of medical training.

[0074] According to the above description, in a specific embodiment, the data transmission method can be applied to the scenario of the industrial manufacturing field, including:

[0075] Remote Monitoring and Maintenance of Equipment: In a modern factory, various production equipment continuously collects operation data through built-in sensors, including important parameters such as the temperature of key parts of the equipment, internal pressure, and operating speed. Using the MQTT protocol, this data is transmitted to the EMQX server with extremely low latency. Through the visualization interface drawn by Canvas, engineers can view the operation status of the equipment in real time and comprehensively, just as if they were standing next to the equipment and observing directly. Once an abnormal situation occurs in the equipment, the system will immediately issue an alarm through a preset alarm mechanism. Engineers can not only understand the equipment failure information in real time but also perform debugging and maintenance work such as parameter adjustment and program update on the equipment through the remote operation function, greatly improving the timeliness and efficiency of equipment maintenance and reducing the production downtime caused by equipment failures.

[0076] Optimization of Production Processes: Based on the comprehensive collection of data from all links on the production line by MQTT, EMQX deeply analyzes and efficiently processes this massive amount of data, uncovering potential problems and optimization spaces in the production process. Through Canvas, the real-time data of the production process and detailed analysis results are presented to managers in the form of intuitive charts, graphs, etc. Managers can clearly understand the production situation at a glance, adjust production strategies in a timely manner according to this data, reasonably arrange production tasks, optimize the production process, thereby effectively improving production efficiency, reducing production costs, enhancing product quality, and strengthening the competitiveness of the enterprise in the market.

[0077] According to the above description, in a specific embodiment, the data transmission method can be applied to scenarios in the field of intelligent transportation, including:

[0078] Vehicle-to-Everything (V2X) Communication: In the vehicle-to-everything system of intelligent transportation, vehicles communicate frequently and efficiently with each other and with road infrastructure through MQTT. Vehicles upload key data such as their own location information, driving speed, and vehicle failure information in real time. EMQX undertakes the heavy responsibility of processing massive amounts of vehicle communication data, classifying, sorting, and distributing this data. Through Canvas technology, a map is accurately drawn on the in-vehicle display screen, and traffic conditions such as road congestion and accident locations are displayed in real time. This information provides real-time and accurate navigation guidance and traffic warnings for drivers, helping them plan routes in advance, avoid congested sections, and ensure smoother and safer travel.

[0079] Intelligent Bus Scheduling: Bus vehicles use MQTT to transmit information such as their real-time positions and in-vehicle passenger loads to the EMQX server in the dispatching center. The dispatching center uses Canvas to display the real-time distribution of bus vehicles on urban roads, just like observing the running tracks of bus vehicles on a huge traffic sand table. Based on passenger flow data and the real-time positions of vehicles, the dispatching center can use intelligent algorithms to reasonably arrange the departure times and driving routes of bus vehicles, achieving intelligent bus scheduling. This not only improves the operating efficiency of bus vehicles, reduces the waiting time of passengers, but also optimizes the allocation of bus resources, reduces energy consumption, and enhances the overall service level of urban public transportation.

[0080] According to the above description, in a specific embodiment, the data transmission method can be applied to the smart home field scenario, including:

[0081] Home Appliance Control and Linkage: In the smart home ecosystem, various smart devices such as smart bulbs, smart curtains, and smart air conditioners in the user's home are connected to the home gateway through MQTT, and then the gateway establishes a communication connection with the user's mobile devices (such as mobile phones, tablets) or smart speakers through EMQX. The user can control various devices in an intuitive and convenient operation manner through the Canvas interface in the mobile application. For example, simply sliding or clicking can easily turn on / off the smart bulb and adjust the temperature of the smart air conditioner. The user can also set up linkage scenarios between devices according to their living habits. For example, in the set homecoming mode, the system automatically turns on the lights and opens the curtains to create a warm and comfortable home environment, making life more convenient and pleasant.

[0082] Home Security Monitoring: The home camera uses MQTT to stably transmit the monitoring video stream to the EMQX server. The user can view the monitoring pictures in real time on the mobile phone or computer through Canvas, and understand the situation at home anytime and anywhere. When the camera detects abnormal situations such as strangers breaking in or fire smoke, the system will immediately send alarm information to the user in a timely manner through MQTT. After receiving the alarm, the user can remotely control the camera to conduct a full-range view and video recording, providing reliable protection for home security and allowing the user to feel at ease no matter where they are.

[0083] According to the above description, the present invention can deeply integrate MQTT, Canvas, and EMQX technologies, and combine microservices architecture and container orchestration technology to build a high-performance real-time data processing and visualization system. This system breaks through the limitations of traditional architectures, realizes high modularity and flexible deployment, and significantly improves scalability and maintainability.

[0084] When the present invention deeply integrates MQTT, Canvas, and EMQX technologies, the corresponding integration process can include:

[0085] Data collection and transmission: The device publishes data to the EMQX server through the MQTT protocol. EMQX is responsible for receiving, storing, and forwarding these messages. EMQX supports multiple data formats (such as JSON, XML) to ensure efficient data transmission and processing.

[0086] Real-time data visualization: The front-end application subscribes to topics in EMQX through MQTT to obtain device data in real time. Using Canvas technology, the front-end application can dynamically draw charts, graphs, or other visualization elements to display the device status and data changes in real time.

[0087] Data processing and feedback: EMQX supports a rules engine that can perform data filtering, transformation, and storage during message transmission. The processed data can be published to other topics through MQTT for use by other microservices or front-end applications.

[0088] Corresponding process description for security and scalability: EMQX provides TLS / SSL encryption, authentication, and access control to ensure the security of data transmission. Through the clustering function of EMQX, the system can be horizontally scaled to support more devices and higher concurrency.

[0089] When this invention combines the microservices architecture with container orchestration technology, the microservices architecture splits the application into multiple independent services, and each service is responsible for a specific function. Container orchestration technology is used to manage and schedule these microservices to ensure high availability and scalability. The corresponding application process can include:

[0090] Microservice splitting: Split the system into multiple microservices, such as device management service, data processing service, user authentication service, etc. Each microservice is developed, deployed, and scaled independently, and communicates through REST API or message queues (such as MQTT).

[0091] Containerized deployment: Use Docker to package each microservice into a container image to ensure environment consistency and rapid deployment. Through Kubernetes for container orchestration, automatically manage the deployment, scaling, and fault recovery of containers.

[0092] Service discovery and load balancing: Kubernetes provides built-in service discovery and load balancing functions to ensure efficient communication between microservices. EMQX can be used as a message middleware to connect various microservices to achieve asynchronous communication and decoupling.

[0093] Monitoring and log management: Use Prometheus and Grafana to monitor the performance and health status of microservices. Centralize the management and analysis of logs through the ELK Stack (Elasticsearch, Logstash, Kibana) to quickly locate and solve problems.

[0094] Continuous Integration and Continuous Deployment (CI / CD): Implement continuous integration using Jenkins or GitLab CI to automatically build and test microservices. Achieve seamless deployment and rollback through the rolling update feature of Kubernetes to ensure the high availability of the system.

[0095] In addition, in the data transmission link of the present invention, the MQTT protocol can be deeply transformed by integrating software-defined network (SDN) technology. The SDN controller intelligently regulates network traffic for ultra-high-speed and secure transmission. The adaptive data transmission strategy based on the reinforcement learning algorithm enables the system to autonomously learn and optimize transmission parameters according to different network conditions, greatly improving transmission stability and efficiency. The corresponding traffic regulation process may include:

[0096] Network topology discovery and monitoring: The SDN controller communicates with network devices (switches, routers) through the southbound interface (such as OpenFlow) to obtain the network topology and traffic status in real time. Use monitoring tools (such as sFlow, NetFlow) to collect network traffic data and analyze metrics such as bandwidth utilization, latency, and packet loss rate.

[0097] Traffic analysis and policy formulation: Based on the collected traffic data, the SDN controller uses machine learning or a rule engine to analyze traffic patterns, identify critical business flows and bottleneck links. Formulate traffic scheduling policies according to business priorities (such as real-time video streams, VoIP, file transfers) to ensure that high-priority traffic obtains sufficient bandwidth and low latency.

[0098] Dynamic routing and load balancing: The SDN controller dynamically selects the optimal path by adjusting the routing tables of network devices to avoid congested links. Achieve load balancing among multiple paths, make full use of network resources, and improve the overall throughput.

[0099] Fault recovery and elastic expansion: When a network fault (such as a link interruption) is detected, the SDN controller quickly recalculates the routing and switches the traffic to the backup path to ensure business continuity. When the network load increases, automatically expand network resources (such as enabling backup links or increasing bandwidth) to meet the burst traffic demand.

[0100] QoS (Quality of Service) guarantee: Assign priorities to different business flows by setting DiffServ or MPLS tags to ensure low latency and high reliability for critical applications. Adjust the queue scheduling algorithm (such as WFQ, CBQ) in real time to optimize bandwidth allocation.

[0101] In addition, at the message processing level, EMQX runs on a distributed cluster architecture. When the student side sends interactive messages (such as asking questions, submitting homework, etc.), EMQX first receives and parses the messages to identify the type and source. With the help of distributed technology, consensus is reached among cluster nodes to ensure the consistency and reliability of message processing. The message processing process of EMQX in the distributed cluster architecture includes: message reception and parsing, distributed consensus and message distribution, message processing and routing, high availability and fault tolerance mechanisms.

[0102] Specifically, the corresponding process of message reception and parsing includes: 1. Message reception: The student side publishes interactive messages (such as asking questions, submitting homework) to the EMQX cluster through the MQTT protocol. A certain node (such as an edge node) in the EMQX cluster first receives the message. 2. Message parsing: EMQX parses the MQTT message of the message, extracts the topic (Topic) and payload (Payload) of the message. Identify the message type (such as asking a question or submitting homework) according to the topic (such as `student / question` or `student / homework`). Parse the content in the payload and extract key information (such as student ID, question content, homework file). 3. Message verification: Verify the legality of the message (such as whether the format is correct, whether the student ID is valid). Use TLS / SSL encryption to ensure the security of message transmission.

[0103] The corresponding process of distributed consensus and message distribution includes: 1. Message distribution to cluster nodes: The EMQX node that receives the message distributes the message to other nodes in the cluster to ensure message synchronization within the cluster. Use a distributed consistency protocol (such as Raft or Paxos) to reach consensus among cluster nodes to ensure the consistency and reliability of the message. 2. Message storage and persistence: Store the message in a distributed database (such as Redis, Cassandra) or message queue (such as Kafka) to ensure that the message is not lost. Select different storage strategies according to the message type and priority (such as real-time storage of high-priority messages, batch storage of low-priority messages). 3. Load balancing: Dynamically allocate message processing tasks according to the load conditions of cluster nodes to avoid overloading a single node. Use a load balancing algorithm (such as round-robin, least connections) to optimize the message processing efficiency.

[0104] The message processing and routing corresponding process includes: 1. Message type identification and routing: According to the message type (such as question, homework submission), route the message to the corresponding processing module. Route question messages to the Q&A module. Route homework submission messages to the homework grading module. 2. Message processing: Q&A module: Use natural language processing (NLP) technology to analyze the question content and match relevant knowledge bases or teacher resources. Distribute the questions to relevant teachers or AI Q&A systems, generate answers and return them to students. Homework grading module: Parse the homework file and use automated grading tools (such as code static analysis, text similarity detection) for grading. Store the grading results in the database and notify the students. 3. Message feedback: Publish the processing results (such as Q&A answers, homework grades) to the corresponding topics (such as `teacher / answer` or `system / homework_result`) through the MQTT protocol. The student side subscribes to relevant topics and receives feedback information in real time.

[0105] The high availability and fault tolerance mechanism corresponding process includes: 1. Cluster node monitoring: Use monitoring tools (such as Prometheus, Grafana) to monitor the status of cluster nodes (such as CPU, memory, network) in real time. Detect node failures or performance bottlenecks and perform failover or scaling in a timely manner. 2. Fault recovery: When a certain node fails, other nodes in the cluster take over its tasks to ensure the continuity of message processing. Use distributed storage (such as HDFS, Ceph) to back up message data to prevent data loss. 3. Message retry mechanism: If message processing fails (such as network interruption, service unavailable), EMQX will automatically retry until the message is successfully processed. Set the maximum number of retries and retry intervals to avoid wasting resources due to infinite retries.

[0106] Therefore, in the distributed cluster architecture, EMQX ensures the consistency and reliability of message processing by receiving, parsing, distributing, and processing the interactive messages from the student side. The specific process includes: Message reception and parsing: Identify the message type and source. Distributed consensus and message distribution: Synchronize messages among cluster nodes to ensure consistency and reliability. Message processing and routing: Route to the corresponding module according to the message type and generate feedback results. High availability and fault tolerance mechanism: Ensure the high availability of the system through monitoring, fault recovery, and retry mechanisms. This mechanism can effectively support the real-time interaction needs in large-scale education scenarios and improve the performance and reliability of the system. In terms of visual display, use Canvas technology, combined with advanced front-end interaction technologies, to create an intuitive and convenient visual interaction experience. Through the in-depth application of HTML5 and JavaScript, achieve rich interaction functions such as zooming, dragging, and clicking, enabling users to interact with visual data naturally.

[0107] In summary, the present invention provides a data transmission method. Data can be generated by a device or a user terminal at the data source end, and then encapsulated by an MQTT client and published to a distributed system server cluster such as an EMQX server cluster. Then, the EMQX server cluster distributes messages to the MQTT clients at the data receiving and display end according to the subscription relationship, and these MQTT clients then pass the messages to the Canvas visualization interface for display. This method adopts a distributed architecture, where MQTT is responsible for data transmission, EMQX is responsible for message processing, and Canvas is responsible for visualization display. The responsibilities of each module are clear and the coupling degree is low. Compared with the traditional centralized architecture, it has strong scalability and is easy to maintain. For example, when a large number of Internet of Things devices are connected, it can cope with the situation by adding EMQX cluster nodes. This method realizes the functions of strong real-time performance, rich interactivity, and personalized visualization display. Compared with the traditional HTTP data transmission and simple visualization technology, the low-latency transmission of MQTT ensures data real-time performance, and the flexible drawing ability of Canvas supports users to perform interactive operations such as zooming and annotation and personalized display. This method is based on mature open-source technologies, and rich community resources and existing frameworks can be utilized during the development process to shorten the development cycle and reduce the development cost. For example, EMQX provides a complete API and plug-in mechanism, which is convenient for developers to integrate. Moreover, the low bandwidth requirement of MQTT reduces the data transmission cost, and the high concurrency processing ability of EMQX reduces the investment in server hardware resources, thus overall reducing the system construction and operation costs. In the field of smart home, for the long-term data transmission of a large number of devices, if the traditional high-bandwidth protocol is used, the cost will increase significantly. Therefore, this method can use the MQTT protocol as the basis for data transmission. MQTT is a lightweight protocol based on the publish / subscribe mode and can efficiently transmit data in a low-bandwidth and unstable network environment. For example, in the real-time interaction of live courseware, it is published to the EMQX message server through an MQTT client, and the server is responsible for receiving, storing, and distributing these messages to ensure the accurate transmission of data between different users and the service center. At the same time, this method uses Canvas technology to implement visualization display on the client side. By operating the Canvas API through JavaScript, the received data is converted into intuitive graphics, charts, or animations. For example, in the live drawing board, the operation trajectories of the host (such as the paintbrush, eraser, etc.) are presented on the Canvas in the form of real-time dynamic trajectories, which is convenient for users to receive and view in real time. Therefore, through the multi-dimensional and cross-domain technological innovation and integration, this method can be applied to multiple fields such as online education, intelligent medical care, and industrial manufacturing, providing a revolutionary technical solution for solving the long-existing practical problems in each field.

[0108] In another exemplary embodiment of the present invention, as Figure 7 shown, this embodiment further provides a data transmission system, including:

[0109] A data source terminal, which is used to generate data in a target scenario, denoted as source data; and, encapsulate the source data by using a first MQTT client and publish the encapsulated data to a preset server cluster; wherein, the first MQTT client is located at the data source terminal. As an example, in this embodiment or other embodiments, the target scenario includes but is not limited to: scenarios in the online education field, scenarios in the intelligent medical field, scenarios in the industrial manufacturing field, scenarios in the intelligent transportation field, and / or scenarios in the smart home field, etc. As an example, in this embodiment or other embodiments, the server cluster includes but is not limited to a distributed system server cluster, such as an EMQX server cluster.

[0110] A server cluster, which is used to filter the encapsulated data and distribute the filtered encapsulated data to a second MQTT client according to the subscription relationship;

[0111] A data display terminal, which is used to parse through the second MQTT client and transmit the parsed data to a preset visualization interface for display; wherein, the second MQTT client is located at the data display terminal. As an example, in this embodiment or other embodiments, the preset visualization interface includes but is not limited to a Canvas visualization interface.

[0112] According to the above description, in an exemplary embodiment, as Figure 2 shown, if the target scenario is a scenario in the online education field, then this data transmission method may further include: extracting and classifying the message text by using a pre-trained BERT model; based on the feature extraction and classification results, jointly training the pre-trained BERT model through homomorphic encryption and federated learning; dynamically adjusting the message distribution strategy according to the teaching progress, students' needs, and behavior patterns. It can be seen that this embodiment can develop a message intelligent processing algorithm based on transfer learning and federated learning. In the message filtering stage, transfer learning is used to transfer knowledge from other live courses or the education field to the current live course, quickly and accurately filtering out useful messages, such as filtering out irrelevant advertisement information and incorrect instructions. In the distribution stage, different nodes are allowed to cooperate and learn through federated learning, and the message distribution strategy is dynamically adjusted according to the teacher's teaching progress, students' real-time needs, and behavior patterns to ensure that important messages, such as the teacher's questions and key points of explanation, are delivered in a timely and accurate manner. For example, when the teacher explains difficult knowledge, the system preferentially distributes relevant supplementary materials and solution ideas to students according to the students' answering situations and question frequencies.

[0113] According to the above description, in an exemplary embodiment, as Figure 3As shown, if the target scenario is an online education field scenario, the method further includes: training teaching texts through the Word2Vec algorithm and mapping words into low-dimensional vectors; identifying texts through a named entity recognition algorithm based on conditional random fields and integrating entities and semantic relationships to construct a knowledge graph; according to the natural language description of the teacher, using the knowledge graph to match teaching resources through a breadth-first search algorithm and pushing the matched teaching resources to the corresponding students. Thus, by constructing a domain knowledge graph, semanticizing and associating information such as data, devices, and users, accurate subscription based on semantic understanding is achieved. Taking the live class scenario as an example, before the live broadcast, the teacher can describe the course content, teaching objectives, and knowledge points expected for the students to receive through natural language, use the knowledge graph to analyze semantics, and accurately match relevant teaching materials, exercises, extended readings, etc. and push them to the students, greatly improving the accuracy and comprehensiveness of obtaining teaching resources.

[0114] According to the above description, in an exemplary embodiment, as Figure 4 shown, when transmitting the parsed data to a preset visualization interface for display, the data transmission method may further include: obtaining a generator obtained in advance or in real time and generating a visualization style through random noise; using a discriminator to distinguish the generated visualization style from the real user preference style, and generating a unique visualization style according to user sentiment analysis and scenario requirements; feeding back the judgment result of the discriminator to the generator, and having the generator update the strategy and iteratively update the strategy for generating the visualization style in a loop; and iteratively feeding back the optimized judgment criterion to the discriminator through the generator for iterative discrimination.

[0115] According to the above description, in an exemplary embodiment, as Figure 5 shown, the data transmission method may further include: for distributed nodes in a distributed system server cluster, performing message interaction in the pre-prepare phase, prepare phase, and commit phase using a distributed system consensus algorithm, and after reaching a consensus, performing distribution according to a trust mechanism and fair tasks; obtaining historical message features and using the historical message features as the input of a convolutional neural network and a long short-term memory network model; performing multi-layer network training, using a stochastic gradient descent algorithm to backpropagate and calculate gradients, and adjusting network weights to minimize the cross-entropy loss function; predicting message generation and flow directions according to the trained model and optimizing the resource allocation of the distributed system server cluster.

[0116] According to the above description, in an exemplary embodiment, as Figure 6As shown, the data transmission method may further include: collecting network metric data through an SDN controller, and solving for the optimal flow table rules based on the Bellman equation in combination with a dynamic programming algorithm; adjusting the flow table, and regulating the data traffic of the first MQTT client and / or the second MQTT client based on the flow table adjustment result; introducing a quantum encryption algorithm for data encryption, and constructing state, action, and reward functions, and controlling an agent to try different actions through a Q-learning algorithm and determining whether the reward value increases; if the reward value increases, updating the Q-value table and optimizing the transmission strategy; if the reward value does not increase, returning to control the agent to try different actions again. In addition, in this embodiment or other embodiments, the process of collecting network metric data through an SDN controller further includes: analyzing network metrics based on the collected network metric data, including bandwidth utilization, latency, and packet loss rate; and, based on the collected network metric data, analyzing traffic patterns using machine learning or a rule engine, identifying critical business flows and bottleneck links, and formulating a traffic scheduling strategy according to business priorities so that high-priority traffic can obtain bandwidth and low latency first; and, adjusting the routing table of network devices through an SDN controller to dynamically select an optimal path and perform load balancing control among multiple paths; and, when a network failure is detected, recalculating the route through an SDN controller and switching the traffic to an alternate path; and, automatically expanding network resources when the network load increases, including enabling an alternate link or increasing bandwidth.

[0117] It should be noted that the data transmission system provided in the above embodiment and the data transmission method provided in the above embodiment belong to the same concept. The specific manners in which each module performs operations have been described in detail in the method embodiment and will not be elaborated here. In practical applications, the data transmission system provided in the above embodiment may, according to needs, allocate the above functions to different functional modules, that is, divide the internal structure of the system into different functional modules to complete all or part of the functions described above, and no limitation is imposed here. Therefore, the present invention effectively overcomes various drawbacks in the prior art and has high industrial utilization value.

[0118] In summary, the present invention provides a data transmission method. Data can be generated by a device or a user terminal at the data source end, and then encapsulated by an MQTT client and published to a distributed system server cluster such as an EMQX server cluster. Then, the EMQX server cluster distributes the messages to the MQTT clients at the data receiving and display end according to the subscription relationship, and these MQTT clients then pass the messages to the Canvas visualization interface for display. This system adopts a distributed architecture, where MQTT is responsible for data transmission, EMQX is responsible for message processing, and Canvas is responsible for visualization display. The responsibilities of each module are clear and the coupling degree is low. Compared with the traditional centralized architecture, it has strong scalability and is easy to maintain. For example, when a large number of Internet of Things devices are connected, it can cope with the situation by adding EMQX cluster nodes. This system realizes functions with strong real-time performance, rich interactivity, and personalized visualization display. Compared with traditional HTTP data transmission and simple visualization technologies, the low-latency transmission of MQTT ensures data real-time performance, and the flexible drawing ability of Canvas supports users to perform interactive operations such as zooming and annotation and personalized display. This system is based on mature open-source technologies, and rich community resources and existing frameworks can be utilized during the development process to shorten the development cycle and reduce the development cost. For example, EMQX provides a complete API and plugin mechanism, which is convenient for developers to integrate. Moreover, the low bandwidth requirement of MQTT reduces the data transmission cost, and the high concurrency processing ability of EMQX reduces the investment in server hardware resources, overall reducing the system construction and operation costs. In the field of smart home, for the long-term data transmission of a large number of devices, if traditional high-bandwidth protocols are used, the cost will increase significantly. Therefore, this system can adopt the MQTT protocol as the basis for data transmission. MQTT is a lightweight protocol based on the publish / subscribe mode and can efficiently transmit data in a low-bandwidth and unstable network environment. For example, in the real-time interaction of live teaching courseware, it is published to the EMQX message server through an MQTT client, and the server is responsible for receiving, storing, and distributing these messages to ensure the accurate transmission of data between different users and the service center. At the same time, this system uses Canvas technology to achieve visualization display on the client side. By operating the Canvas API through JavaScript, the received data is converted into intuitive graphics, charts, or animations. For example, in the live painting board, the operation trajectories of the anchor (such as the paintbrush, eraser, etc.) are presented on the Canvas in the form of real-time dynamic trajectories, which is convenient for users to receive and view in real time. Therefore, through multi-dimensional and cross-domain technological innovation and integration, this system can be applied to multiple fields such as online education, intelligent healthcare, and industrial manufacturing, providing a revolutionary technical solution for solving the long-existing practical problems in each field.

[0119] The above embodiments are only illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Any person familiar with this technology can modify or change the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or changes made by those of ordinary skill in the art without departing from the spirit and technical ideas disclosed by the present invention should still be covered by the claims of the present invention.

[0120] It should be understood that although terms such as first and second may be used in the embodiments of the present invention to describe MQTT clients and the like, these MQTT clients should not be limited to these terms. These terms are only used to distinguish MQTT clients from each other. For example, without departing from the scope of the embodiments of the present invention, the first MQTT client may also be referred to as the second MQTT client, and similarly, the second MQTT client may also be referred to as the first MQTT client.

Claims

1. A data transmission method, characterized in that The method includes the following steps: Obtain the data generated by the data source terminal in the target scenario, denoted as source data; Use the first MQTT client to encapsulate the source data and publish the encapsulated data to a preset server cluster; wherein, the first MQTT client is located at the data source terminal; Filter the encapsulated data through the server cluster, and distribute the filtered encapsulated data to the second MQTT client according to the subscription relationship, and parse it through the second MQTT client, and transmit the parsed data to a preset visualization interface for display; wherein, the second MQTT client is located at the data display end.

2. The data transmission method according to claim 1, wherein The target scenarios include: scenarios in the field of online education, scenarios in the field of intelligent healthcare, scenarios in the field of industrial manufacturing, scenarios in the field of intelligent transportation, and / or scenarios in the field of smart home.

3. The data transmission method according to claim 1 or 2, characterized in that, The server cluster includes a distributed system server cluster, and the preset visualization interface includes a Canvas visualization interface.

4. The data transmission method according to claim 3, wherein If the target scenario is a scenario in the field of online education, the method further includes: Use a pre-trained BERT model to extract features and classify message texts; Based on the feature extraction and classification results, jointly train the pre-trained BERT model through homomorphic encryption and federated learning; Dynamically adjust the message distribution strategy according to the teaching progress, students' needs, and behavior patterns.

5. The data transmission method according to claim 3, wherein If the target scenario is a scenario in the field of online education, the method further includes: Train teaching texts through the Word2Vec algorithm and map words into low-dimensional vectors; Identify texts using a named entity recognition algorithm based on conditional random fields, and integrate entities and semantic relationships to construct a knowledge graph; According to the natural language description of the teacher, use the knowledge graph to match teaching resources through the breadth-first search algorithm and push the matched teaching resources to the corresponding students.

6. The data transmission method according to claim 3, wherein When transmitting the parsed data to a preset visualization interface for display, the method further includes: Obtain a generator obtained in advance or in real time, and generate a visualization style through random noise; Use a discriminator to distinguish between the generated visualization style and the real user preference style, and generate a unique visualization style according to user sentiment analysis and scenario requirements; Feed back the judgment result of the discriminator to the generator, and let the generator update the strategy, and iteratively update the strategy for generating the visualization style in a loop; and iteratively feed back the optimized judgment criteria to the discriminator through the generator for iterative discrimination.

7. The data transmission method according to claim 3, wherein The method further includes: For the distributed nodes in the distributed system server cluster, use the distributed system consensus algorithm to perform message interaction in the pre-prepare stage, prepare stage, and commit stage, and after reaching a consensus, perform distribution according to the trust mechanism and fair tasks; Obtain historical message features and use the historical message features as the input of the convolutional neural network and long short-term memory network model; Perform multi-layer network training, use the stochastic gradient descent algorithm to backpropagate and calculate the gradient, and adjust the network weights to minimize the cross-entropy loss function; Predict the generation and flow of messages based on the trained model, and optimize the resource allocation of the server cluster of the distributed system.

8. The data transmission method according to claim 3, wherein The method further includes: Collect network metric data through the SDN controller, and solve the optimal flow table rules based on the Bellman equation in combination with the dynamic programming algorithm; Adjust the flow table, and regulate the data traffic of the first MQTT client and / or the second MQTT client based on the adjustment result of the flow table; Introduce a quantum encryption algorithm for data encryption, and construct state, action, and reward functions. Control the agent to try different actions through the Q-learning algorithm, and judge whether the reward value increases; If the reward value increases, update the Q-value table and optimize the transmission strategy; If the reward value does not increase, return to control the agent to try different actions again.

9. The data transmission method according to claim 8, wherein The process of collecting network metric data through the SDN controller further includes: Based on the collected network metric data, analyze the network metrics, including bandwidth utilization, latency, and packet loss rate; and, based on the collected network metric data, analyze the traffic pattern using machine learning or a rule engine, identify critical business flows and bottleneck links, and formulate a traffic scheduling strategy according to business priorities to enable high-priority traffic to obtain bandwidth and low latency first; and, Dynamically select the optimal path by adjusting the routing table of network devices through the SDN controller, and perform load balancing control among multiple paths; and, When a network failure is detected, recalculate the route through the SDN controller and switch the traffic to the backup path; and, when the network load increases, automatically expand network resources, including enabling backup links or increasing bandwidth.

10. A data transmission system, characterized in that, The system includes: A data source terminal for generating data in a target scenario, denoted as source data; And, encapsulate the source data using the first MQTT client and publish the encapsulated data to a preset server cluster; wherein, the first MQTT client is located at the data source terminal; A server cluster for filtering the encapsulated data and distributing the filtered encapsulated data to the second MQTT client according to the subscription relationship; A data display terminal for parsing through the second MQTT client and transmitting the parsed data to a preset visualization interface for display; wherein, the second MQTT client is located at the data display terminal.

Citation Information

Cited By

  • Data transmission system and method

    CN120602552A