Data communication method and system for smart seat

By identifying and integrating the association of target message topics in smart chairs, the problem of repeated subscription of message topics in the MQTT protocol is solved, the efficiency of the Internet of Things protocol is improved, and more efficient data communication is achieved.

CN118433219BActive Publication Date: 2024-10-22SHENZHEN SIHOO INTELLIGENT FURNITURE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410843926.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-27
Publication Date
2024-10-22
Estimated Expiration
2044-06-27

AI Technical Summary

Technical Problem

The MQTT protocol in smart chairs leads to repeated subscription of message topics due to frequent data interaction, which affects work efficiency.

Method used

By identifying the associated message topics of the target message topic, the collection of message topics to be integrated is filtered out, and integrated into temporary message topics based on subscription frequency and timing, and the life cycle is set to avoid repeated subscriptions.

Benefits of technology

It improves the working efficiency of the Internet of Things protocol, avoids inefficiency problems caused by long-term unsubscription of message topics, and further improves communication efficiency by continuously updating temporary message topics.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118433219B_ABST
    Figure CN118433219B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of data communication, and specifically to a data communication method and system for smart seats, including: obtaining associated message topics of a target message topic; screening out a number of message topic sets to be integrated according to the number of existing identical associated message topics; integrating all associated message topics in the message topic sets to be integrated according to the subscription frequency of the target message topic corresponding to the associated message topic in each message topic set to be integrated, and obtaining a number of temporary message topics, each of which corresponds to a number of target message topics; obtaining the life cycle of the temporary message topic according to the subscription frequency and subscription sequence of the target message topic corresponding to the temporary message topic; deleting the temporary message topic when the life cycle ends, and re-obtaining the temporary message topic. The present invention avoids the problem of low working efficiency of the Internet of Things protocol caused by repeated subscriptions to the same message topics.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data communication technology, and in particular to a data communication method and system for a smart seat. Background Art

[0002] The sensor devices, media devices, and controllable devices in the smart seat need to communicate through the Internet of Things system to realize functions such as status detection, intelligent control, and intelligent interaction of the smart seat. The MQTT (Message Queuing Telemetry Transport) protocol is designed for communication between remote sensors and control devices working in low-bandwidth, unreliable networks in the Internet of Things system. It has the characteristics of low coupling in the three dimensions of space, time, and synchronization, and is suitable for high latency and multiple access devices.

[0003] The MQTT protocol communicates by publishing and subscribing to message topics. Considering that devices in smart seats often need to interact with each other frequently to control and adjust the seats, the MQTT protocol needs to subscribe to multiple message topics at the same time when processing a certain message, and several message topics need to be subscribed to repeatedly, which leads to low working efficiency of the MQTT protocol. Summary of the invention

[0004] In order to solve the above problems, the present invention provides a data communication method and system for a smart seat.

[0005] The data communication method and system for the smart seat of the present invention adopts the following technical solutions:

[0006] In one aspect, an embodiment of the present invention provides a data communication method for a smart seat, the method comprising the following steps:

[0007] The message topic subscribed in any communication is recorded as the target message topic, and all message topics that the seat client that publishes the target message topic relies on when publishing the target message topic are recorded as the associated message topics of the target message topic;

[0008] According to the number of existing identical associated message topics, several message topic sets to be integrated are screened from the associated message topics of all target message topics; according to the subscription frequency of the target message topic corresponding to the associated message topic in each message topic set to be integrated, the associated message topics in all message topic sets to be integrated are integrated to obtain several temporary message topics, each of which corresponds to several target message topics;

[0009] Obtain the life cycle of a temporary message topic according to the subscription frequency and subscription sequence of the target message topic corresponding to the temporary message topic;

[0010] When the life cycle ends, the temporary message topic is deleted and then retrieved.

[0011] Preferably, the target message topic used in the process of re-obtaining the temporary message topic includes a temporary message topic that has not been deleted.

[0012] Preferably, the method of selecting a plurality of message topic sets to be integrated from the associated message topics of all target message topics according to the number of existing identical associated message topics comprises the following specific steps:

[0013] First, for all target message topics, execute step D1: if there are two or more target message topics, and there are the largest number of identical related message topics between the two or more target message topics, record the largest number of identical related message topics as a message topic set to be integrated; at the same time, record the two or more target message topics as referenced topics;

[0014] Then, for the remaining target message topics excluding the referenced topics, step D1 is repeatedly executed until there is no same associated message topic between two or more remaining target message topics, and the repetitive execution is stopped to obtain several message topic sets to be integrated.

[0015] Preferably, the specific steps of obtaining the temporary message topic are as follows:

[0016] Each message topic set to be integrated includes a number of associated message topics, and a target message topic is obtained that includes all associated message topics in each message topic set to be integrated, wherein the number of the obtained target message topics is recorded as N;

[0017] Obtaining a subscription reuse index of each set of message topics to be integrated according to the subscription frequencies of the N target message topics, and when the subscription reuse index of each set of message topics to be integrated is greater than a preset first threshold, integrating all associated message topics in each set of message topics to be integrated into a temporary message topic;

[0018] The temporary message topic corresponds to the N target message topics.

[0019] Preferably, the obtaining of the life cycle of the temporary message topic according to the subscription frequency and subscription sequence of the target message topic corresponding to the temporary message topic comprises the following specific steps:

[0020] The average subscription frequency of the target message topic corresponding to each temporary message topic is obtained, and the life cycle of each temporary message topic is obtained according to the subscription rules of all target message topics corresponding to each temporary message topic at different time sequences and the average subscription frequency.

[0021] Preferably, the specific steps of obtaining all the message topics that are relied upon are as follows:

[0022] The message data corresponding to the target message topic is recorded as b1, and other message data involved in calculating b1 are obtained, and the message topics corresponding to the other message data are used as all the dependent message topics.

[0023] Preferably, the subscription multiplexing index is positively correlated with N and subscription frequency respectively.

[0024] Preferably, the life cycle is positively correlated with the mean of the subscription frequency of the target message topic and the subscription regularity.

[0025] Preferably, the specific steps of obtaining the subscription rule are as follows:

[0026] For all target message topics corresponding to each temporary message topic, all target message topics are sorted in the order of the time they are subscribed to by the client. If there are two or more consecutive identical target message topics in the sorting result, one target message topic is retained; the subscription time interval between two adjacent target message topics in the sorting result is calculated, and then the average of the subscription time intervals between all adjacent target message topics in the sorting result is calculated, and the subscription regularity is negatively correlated with the average of the subscription time intervals.

[0027] On the other hand, an embodiment of the present invention provides a data communication system for a smart seat, the system comprising a seat client and an MQTT server, wherein the seat client comprises sensors, control devices, media devices, interactive devices, storage devices, and computing units on the seat; the seat client publishes and subscribes to messages and message topics to the MQTT server; the MQTT server comprises a memory and a processor, wherein in addition to storing messages and message topics, the memory also stores a computer program that can be run on the processor, and when the processor executes the computer program, the steps of the above-mentioned data communication method for a smart seat are implemented.

[0028] The beneficial effects of the technical solution of the present invention are:

[0029] First, the associated message topics of the target message topic are used to describe message topics that have dependencies when subscribing. These dependent message topics may be subscribed to repeatedly, affecting the working efficiency of the Internet of Things protocol; further screen out the set of message topics to be integrated; and integrate the associated message topics in the set of message topics to be integrated to obtain temporary message topics, thereby avoiding the situation where the message topics are subscribed to repeatedly, thereby improving the working efficiency of the Internet of Things protocol; then calculate the life cycle of the temporary message topic, and delete the temporary message topic at the end of the life cycle, thereby avoiding the problem of low working efficiency caused by the temporary message topic not being subscribed for a long time, thereby further improving the working efficiency of the Internet of Things protocol; finally, after the temporary message topic is deleted, the temporary message topic is obtained again, thereby ensuring that the temporary message topic is continuously updated according to the specific communication situation during the entire communication process, thereby further improving the working efficiency of the Internet of Things protocol. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0031] Figure 1 A flowchart of a data communication method for a smart seat provided by one embodiment of the present invention;

[0032] Figure 2 A framework diagram of a data communication system for a smart seat provided by one embodiment of the present invention. DETAILED DESCRIPTION

[0033] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the data communication method and system for smart seats proposed by the present invention, its specific implementation, structure, features and effects are described in detail as follows in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0034] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0035] Smart seats are a new type of interactive seats that can be used in many scenarios. For example, in home or office scenarios, they can monitor the user's sitting posture and remind the user to correct bad sitting posture, thereby helping to reduce health problems caused by long-term sitting, such as back pain and neck pain. It can also automatically adjust the height, tilt angle and support of the seat according to the user's sitting habits to provide a more comfortable sitting experience. These are just the basic functions of the seat. In addition, it can also be used in entertainment scenarios such as game halls and cinemas. In addition to providing basic functions, the seat can provide feedback on the actions in the picture, such as vibration or movement, to enhance the user experience. It can also be used in passenger aircraft. In addition to providing basic functions, it can also provide sound recording, voice prompts, small table retraction and extension control, seat belt detection, and multimedia functions. Smart seats can also be used in other scenarios, such as vehicles, patient or elderly health checks, etc., which will not be elaborated here. However, no matter what the scenario, the core function of smart seats is to provide an automated and intelligent interactive function and provide user experience. Therefore, smart seats must contain some interactive devices, such as sensors, multimedia devices, motors and other controllable devices, microphones and touch screens and other interactive devices, computing and storage devices installed on the seats or independent of the seats, etc. Sensors include pressure sensors, gyroscopes, etc.

[0036] These devices need to communicate through the IoT system, especially in scenes such as cinemas, game halls, passenger planes, hospital wards, etc. There are many smart seats. Not only do the devices on the same seat need to communicate, but even different seats need to communicate to achieve the linkage effect between seats. This makes smart seats more dependent on an efficient IoT system. As a common protocol in the IoT system, the MQTT protocol is well used in the IoT system built by smart seats. The protocol can work in low-bandwidth, unreliable networks. The protocol is designed for communication between remote sensors and control devices. It has the characteristics of low coupling in the three dimensions of space, time, and synchronization, and is suitable for high latency and multiple access devices.

[0037] In the MQTT protocol, any device that needs to communicate is regarded as a client. In the IoT system of the smart seat, the above-mentioned devices related to the smart seat are clients. The process of each client sending data to the MQTT server is called sending a message. When sending a message, a message subject will be attached. When a client receives a message, the client needs to subscribe to the message subject of the message to be received from the MQTT server, and then the MQTT server will send the message of the subscribed message subject to the client. If the client does not subscribe to the corresponding message subject, the message of the message subject will not be sent to the client. However, since the clients on the smart seat need to perform frequent data interaction, some clients, such as devices with computing functions (including CPU, single-chip microcomputer, graphics card, etc.) need to subscribe to multiple topics at the same time when processing a certain message, and several topics need to be subscribed repeatedly, which leads to low working efficiency of the MQTT protocol in the IoT system of the smart seat. The present invention further improves the working efficiency of the MQTT protocol by dynamically integrating and updating the message subjects in the MQTT protocol.

[0038] The specific scheme of the data communication method and system for the smart seat provided by the present invention is described in detail below with reference to the accompanying drawings.

[0039] Embodiment 1:

[0040] See also Figure 1 , which shows a flow chart of a data communication method for a smart seat provided by an embodiment of the present invention, the method comprising the following steps:

[0041] Step S001: record the message topic subscribed in any communication as the target message topic, and record all message topics that the seat client that publishes the target message topic relies on when publishing the target message topic as associated message topics of the target message topic.

[0042] Since the smart seat uses an interactive seat as the core, it is necessary to collect and analyze various status data of the seat for seat interaction. For example, on the seat of the passenger plane, it is necessary to collect data such as the acceleration of the seat, the retracted state of the small table, the tilt angle of the seat back, the state of the seat belt, etc. These data are used as message data and are published to the server with a message topic. When the computing unit subscribes to these message topics, it receives these message data and analyzes them through the computing unit, such as threshold judgment, condition judgment, etc., to obtain the analysis results. Then the analysis results are also published to the server as message data with message topics. Finally, the motor controller of the small table or backrest on the seat will receive the above analysis results by subscribing to the message topic, and adjust the small table or backrest by controlling the motor. In addition to this process, other interactions include voice prompts, multimedia use, seat posture adjustment, etc. In this process, if a complete interaction is to be carried out, it generally goes through the stages of data collection, publishing, computing device subscription, analysis and calculation, publishing calculation results, control or interaction device subscription, and execution of interaction. The message topic subscribed by the control or interaction device in this process depends on the message topic of the above-mentioned collected data. If a control or interaction process is performed multiple times, the message topic it depends on will be subscribed multiple times.

[0043] This embodiment uses the following method to describe the dependency relationship between message topics, specifically:

[0044] The message topic subscribed during any communication is recorded as the target message topic, the client that publishes the target message topic (referred to as the seat client in this embodiment) is recorded as A, and all message topics that the seat client A relies on when publishing the target message topic are recorded as associated message topics of the target message topic.

[0045] The associated message topic corresponds to the message topic of the collected message data, and the target message topic corresponds to the message topic subscribed by the control or interaction device.

[0046] Of course, the target message topic in this embodiment is not limited to the message topic subscribed by the control or interaction device, and the associated message topic is not limited to the message topic of the message data directly collected or output by devices such as sensors. As long as there is a dependency relationship between the message data, the associated message topic of the target message topic can be obtained by using the above method.

[0047] In this embodiment, as an example, all message topics relied upon in the above process include the following methods:

[0048] The message data corresponding to the target message topic is recorded as b1. Therefore, the message data is from seat client A. Obtain other message data that seat client A participates in when calculating b1, and take the message topics corresponding to other message data as all the dependent message topics.

[0049] For example, when b1 is calculated through message data such as the acceleration of the seat, the folding and unfolding status of the small table, the tilt angle of the seat back, the status of the seat belt, etc. (for example, the seat client A calculates b1 through the provided threshold judgment, condition judgment and other calculation processes), then the message topics of these message data are all the message topics they depend on, and the message topics of these message data are all associated message topics of the target message topic.

[0050] In other embodiments, the quantity flow of the above other message data can also be obtained separately, and linear normalization processing is performed. When the normalized data flow is less than the threshold value T1, for example, T1=0.2, the message topics corresponding to these data flows are not used as the dependent message topics, and the message topics corresponding to the data flow not less than T1 are used as the dependent message topics. In this way, it can be avoided that some message data with small flow rates participate in the calculation of b1. Due to the small data flow rate, such message topics are not very helpful in improving the working efficiency of the MQTT protocol, so they can be ignored, so that the subsequent process of improving the working efficiency of the MQTT protocol is robust, but compared with the above method of this embodiment, it requires additional calculation.

[0051] As an optional example, all message topics relied upon in the above process include the following methods:

[0052] All message topics subscribed by any client at the same time or adjacent time (for example, within the last 5 seconds) as b1 are used as the associated message topics of the target message topic. The associated message topics obtained by this method do not have high accuracy, but the calculation process is simple and suitable for scenarios with strict requirements on network delay. Even if the accuracy is not high, it can still improve the efficiency of the protocol to a certain extent compared to the existing MQTT protocol. In some scenarios where clients do not subscribe frequently, the accuracy will be higher.

[0053] Step S002: Filter out a number of message topic sets to be integrated from the associated message topics of all target message topics according to the number of existing identical associated message topics.

[0054] The above method obtains the associated message topic of the target message topic, which describes the message topics with dependencies in the seat interaction process. These message topics may have different degrees of repeated subscription problems in frequent, complex and diverse interactions, affecting the working efficiency of the protocol.

[0055] Furthermore, this embodiment needs to analyze the associated message topics of all target message topics to obtain a set of message topics to be integrated. The associated message topics in the set of message topics to be integrated are some message topics that may need to be integrated and optimized. For example, the problem of repeated subscription of some associated message topics is relatively serious, which has a significant impact on the working efficiency of the protocol. These need to be optimized and integrated, while others are not so serious and have little impact on the working efficiency of the protocol, so they do not need to be optimized and integrated.

[0056] As an example, the method for obtaining the message topic set to be integrated is as follows:

[0057] First, for all target message topics, perform step D1: if there are two or more target message topics, and there are the most common associated message topics between the two or more target message topics, then the most common associated message topics are recorded as a message topic set to be integrated. At the same time, the two or more target message topics are recorded as referenced topics.

[0058] It should be noted that the presence of the largest number of identical associated message topics between two or more target message topics indicates that there are some associated message topics. Among the two or more target message topics where these associated message topics appear at the same time, there may of course be other associated message topics. Although some other associated message topics also appear at the same time in two or more target message topics, the number of these other associated message topics is not as large as these associated message topics. These associated message topics have a great impact on the working efficiency of the protocol, and therefore are recorded as the message topic set to be integrated.

[0059] For example, there are four target message topics M1, M2, M3, and M4, and the corresponding associated message topics are {m1, m2, m3}, {m1, m2, m3, m4}, {m1, m2, m4, m5}, and {m1, m2, m3, m5}, respectively. It can be seen that {m1, m2, m3} is the same associated message topic existing between two or more target message topics (M1, M2, M4), and {m1, m2, m3} contains the largest number of target message topics, which are 3. Although {m1, m2} is also the same associated message topic existing between two or more target message topics (M1, M2, M4, M3), the number of target message topics is small, which is only two. Therefore, {m1, m2, m3} is used as the message topic set to be integrated.

[0060] Following the above steps, for the remaining target message topics excluding the referenced topics, step D1 is repeated until there is no same associated message topic between two or more remaining target message topics, and the repeated execution is stopped to obtain several message topic sets to be integrated.

[0061] So far, several message topic sets to be integrated are obtained, which describe related message topics that have different degrees of impact on the working efficiency of the protocol.

[0062] Step S003: According to the subscription frequency of the target message topic corresponding to the associated message topic in each message topic set to be integrated, all associated message topics in the message topic set to be integrated are integrated to obtain a plurality of temporary message topics.

[0063] Different sets of message topics to be integrated describe related message topics that have different degrees of impact on the work efficiency of the protocol. Next, these related message topics with different degrees of impact need to be reintegrated to obtain temporary message topics. When using temporary message topics for communication, it can avoid the situation of repeatedly subscribing to the same message topics during seat interaction to a certain extent, which can improve the work efficiency of the protocol.

[0064] As an example, the method for obtaining a temporary message topic is as follows:

[0065] For any message topic set to be integrated, which contains several related message topics, obtain a target message topic that also contains all the related message topics in the message topic set to be integrated, and the number of target message topics obtained is recorded as N; these N target message topics all contain all the related message topics in the message topic set to be integrated.

[0066] For example, for the above-mentioned message topic set to be integrated {m1, m2, m3}, it corresponds to three target message topics M1, M2, M4.

[0067] The subscription reuse index of the set of message topics to be integrated is obtained based on the subscription frequency of these N target message topics. The subscription reuse index is an index that is positively correlated with N and subscription frequency, respectively, and is used to describe whether the set of message topics to be integrated needs to be integrated. The larger the number of target message topics N obtained, the more interactions of the seats will require subscriptions to multiple related message topics in the same set of message topics to be integrated. If the subscription frequency is high, it means that the subscription process is repeated, which has a great impact on the working efficiency of the MQTT protocol, and integration is more necessary at this time.

[0068] When the subscription multiplexing index of the message topic set to be integrated is greater than the first threshold th1, all associated message topics in the message topic set to be integrated are integrated into a temporary message topic.

[0069] During communication, if the above N target message topics need to be subscribed to their associated message topics next time, they can directly subscribe to the temporary message topic. When subscribing to the temporary message topic, the message data corresponding to the associated message topic in the message topic set to be integrated will be sent together.

[0070] Step S004: Obtain the life cycle of the temporary message topic according to the subscription frequency and subscription sequence of the target message topic corresponding to the temporary message topic; and delete the temporary message topic when the life cycle ends.

[0071] The above method of communicating data by obtaining temporary message topics avoids the situation in the MQTT protocol where multiple topics need to be subscribed to at the same time when processing a message, and several topics need to be subscribed to repeatedly, but it does not further improve the working efficiency of the MQTT protocol. The reason is that the interaction of seats is a complex and changeable process, and different temporary message topics may be obtained in different time periods. On the one hand, as the communication process progresses, there will be more and more temporary message topics, and on the other hand, some temporary message topics will become invalid, which increases the burden of the MQTT protocol. Therefore, it is necessary to set a life cycle for the temporary message topic.

[0072] The temporary message topics mentioned above are obtained by integrating the message topic set to be integrated, and the message topic set to be integrated also corresponds to the N target message topics mentioned above, so each temporary message topic also corresponds to N target message topics.

[0073] The life cycle of a temporary message topic is determined by its corresponding N target message topics. The order and frequency of subscription to these N target message topics affect the life cycle of the temporary message topic.

[0074] As an example, the method for obtaining the life cycle of a temporary message topic includes:

[0075] The average subscription frequency of all target message topics corresponding to each temporary message topic is obtained, and the life cycle of each temporary message topic is obtained according to the subscription regularity and the average subscription frequency of all target message topics corresponding to each temporary message topic in different time sequences.

[0076] The life cycle is positively correlated with the mean subscription frequency of the target message topic and the subscription regularity of the target message topic. The larger the mean subscription frequency and the subscription regularity, the more regular the corresponding interaction process is. In this case, the temporary message topic may be used multiple times in the future. Therefore, the temporary message topic can exist for a relatively longer time.

[0077] The time starts from the generation time of the temporary message topic. When the existence time of the temporary message topic exceeds the life cycle, the temporary message topic will be deleted.

[0078] Step S005: After deleting the temporary message topic, the temporary message topic is retrieved.

[0079] During the above process, temporary message topics will be continuously generated and deleted.

[0080] In this embodiment, every time a temporary message topic is deleted, the above steps are used to regenerate the temporary message topic. The general process is: first, the associated message topics of the target message topic are obtained, and then several message topic sets to be integrated are screened out, and then all the associated message topics in the message topic sets to be integrated are integrated to obtain several temporary message topics and their life cycles.

[0081] It should be noted that the target message topic used in the process of re-obtaining the temporary message topic includes the temporary message topic that has not been deleted, so as to avoid the problem that some temporary message topics that have not been deleted are repeatedly subscribed to and affect the working efficiency of the protocol.

[0082] This embodiment is now completed.

[0083] Embodiment 2:

[0084] The present embodiment provides a data communication system for a smart seat, which includes a seat client and an MQTT server, wherein the seat client includes sensors, control devices, media devices, interactive devices, storage devices, and computing units on the seat; the seat client publishes and subscribes to messages and message topics to the MQTT server; the MQTT server includes a memory and a processor, wherein the memory, in addition to storing messages and message topics, also stores a computer program that can be run on the processor, and the computer program implements the steps of the above-mentioned data communication method for a smart seat, which are roughly as follows: some repeatedly subscribed message topics are integrated into temporary message topics, and when the temporary message topic life cycle ends, it is deleted and regenerated; note that the regenerated temporary message topic may be different from the deleted temporary message topic, as shown in the following example. Figure 2 shown.

[0085] Embodiment three:

[0086] In this embodiment, if there are two or more target message topics, and there are the largest number of identical associated message topics between the two or more target message topics, then the largest number of identical associated message topics are recorded as a message topic set to be integrated, including the specific method of:

[0087] For any target message topic, all associated message topics of the target message topic constitute a message topic set;

[0088] For the message topic sets of all target message topics, firstly, the intersection of any two message topic sets is obtained, and the intersection indicates that there are the same associated message topics between the message topic sets.

[0089] Then, multiple intersections can be obtained between all message topic sets (only one intersection is retained if there is a duplicate intersection), and the intersection S containing the largest number of related message topics is obtained. Since the intersection S may not be the intersection of two message topic sets, it may also be the intersection of more than two message topic sets. At the same time, the intersection S is the intersection with the most related message topics in the intersection. Therefore, the obtained intersection S represents the largest number of identical related message topics between two or more target message topics, so the intersection S is a message topic set to be integrated.

[0090] It should be noted that there may be multiple intersections S obtained. At this time, the number of intersections S corresponds to the number of message topic sets to be integrated.

[0091] In this embodiment, as a preferred example, the subscription reuse index of the message topic set to be integrated is obtained according to the subscription frequency of the N target message topics, including the following method:

[0092] First, in this embodiment, the subscription frequency of each target topic refers to the ratio of the number of times the target topic is subscribed by the client in a recent period of time to the length of this period of time.

[0093] In this embodiment, the recent period of time refers to the recent week. In other embodiments, other time periods may be set, which are not specifically limited in this embodiment. In addition, it should be supplemented that: in all embodiments of the present invention, the communication process in the recent period of time is analyzed.

[0094] The subscription frequencies of the N target message topics are linearly normalized. When the normalized subscription frequency is greater than the second threshold th2, the corresponding target message topic is used as a frequently subscribed topic, and the number of frequently subscribed topics is recorded as a subscription reuse index.

[0095] As an optional example, the method for obtaining the subscription reuse indicator also includes:

[0096] The sum of the subscription frequencies of N target message topics is used as the subscription reuse indicator.

[0097] This optional example analyzes the subscription frequency as a whole, without analyzing whether the subscription frequency of each target message topic is large or small. Therefore, compared with the above preferred example, although this example has a small amount of calculation, it is relatively less accurate.

[0098] It should be noted that after obtaining the subscription reuse index, this embodiment needs to perform linear normalization on the subscription reuse index to eliminate the influence of dimensions and orders of magnitude in different embodiments. Then, when the subscription reuse index of the message topic set to be integrated is greater than the first threshold th1, all related message topics in the message topic set to be integrated are integrated into a temporary message topic.

[0099] This embodiment is described by taking th1=0.6 and th1=0.45 as examples. Other values ​​may be set in other embodiments, and this embodiment does not specifically limit them.

[0100] As an example, all the related message topics in the message topic set to be integrated are integrated into a temporary message topic, including the following method:

[0101] Hash the hexadecimal data of all associated message topics in the message topic set to be integrated, and use the result as the temporary message topic.

[0102] Embodiment 4:

[0103] In this embodiment, as an example, the life cycle of each temporary message topic is obtained according to the subscription rules and the average of the subscription frequencies of all target message topics corresponding to each temporary message topic at different times, and the specific process included is:

[0104] First, obtain a time length coefficient that is positively correlated with the subscription regularity and subscription frequency. , and then calculate the life cycle :

[0105]

[0106] Where T0 represents a fixed reference time length.

[0107] In this embodiment, as a preferred example, the subscription rules of all target message topics corresponding to each temporary message topic at different times include the following methods:

[0108] For all target message topics corresponding to each temporary message topic, in the recent period, all target message topics are sorted according to the time when they were subscribed by the client. If there are two or more consecutive identical target message topics in the sorting results, only one target message topic is retained. Then the subscription time interval between two adjacent target message topics is calculated, and the average subscription time interval between all adjacent target message topics is calculated. , This indicates that the subscription interval between target message topics is large. During the subscription interval of the target message topic, the temporary message topic will not be subscribed, but will be mixed with other message topics. Therefore, the subscription regularity is small. As a subscription rule.

[0109] As an optional example, the subscription rules of all target message topics corresponding to each temporary message topic at different times include the following methods:

[0110] For all target message topics corresponding to each temporary message topic, calculate the average time interval of each target message topic being subscribed by the client in the recent period of time. The mean of the average time intervals of all target message topics is recorded as , then As a subscription rule.

[0111] This method analyzes and calculates the subscription time of each target message topic separately, and does not analyze all target message topics together, resulting in lower accuracy than the above-mentioned preferred example. However, in this optional example, each target message topic only needs to pay attention to its own subscription time interval without considering the subscription time intervals of other target message topics, and therefore occupies fewer computing resources.

[0112] In this embodiment, as an example, the time length coefficient Linear normalization is performed to eliminate the influence of dimensions and orders of magnitude in different embodiments.

[0113] This embodiment is described by taking T0 equal to 5 minutes as an example. In other embodiments, it can be set to other values, which are not specifically limited in this embodiment. For example, in other embodiments, T0 can also be calculated by the following method: in all communication processes, the time interval between any two recent subscriptions is calculated, and the time intervals between all subscriptions are clustered by mean shift, and the category with the largest number of time intervals in the clustering results is marked, and the average of all time intervals in the marked category is calculated, and the average represents the average subscription interval in all communication processes, and the average is used as T0.

[0114] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A data communication method for a smart seat, characterized in that: The method comprises the following steps: The message topic subscribed in any communication is recorded as the target message topic, and all message topics that the seat client that publishes the target message topic relies on when publishing the target message topic are recorded as the associated message topics of the target message topic; According to the number of existing identical associated message topics, several message topic sets to be integrated are screened from the associated message topics of all target message topics; according to the subscription frequency of the target message topic corresponding to the associated message topic in each message topic set to be integrated, the associated message topics in all message topic sets to be integrated are integrated to obtain several temporary message topics, each of which corresponds to several target message topics; Obtain the life cycle of a temporary message topic according to the subscription frequency and subscription sequence of the target message topic corresponding to the temporary message topic; When the life cycle ends, the temporary message topic is deleted and the temporary message topic is obtained again; The specific steps for obtaining the temporary message topic are as follows: Each message topic set to be integrated includes a number of associated message topics, and a target message topic is obtained that includes all associated message topics in each message topic set to be integrated, wherein the number of the obtained target message topics is recorded as N; Obtaining a subscription reuse index of each set of message topics to be integrated according to the subscription frequencies of the N target message topics, and when the subscription reuse index of each set of message topics to be integrated is greater than a preset first threshold, integrating all associated message topics in each set of message topics to be integrated into a temporary message topic; The temporary message topic corresponds to the N target message topics.

2. The data communication method for a smart seat according to claim 1, characterized in that: The target message topic used in the process of re-obtaining the temporary message topic includes the temporary message topic that has not been deleted.

3. The data communication method for a smart seat according to claim 1, characterized in that: The specific steps of selecting a plurality of message topic sets to be integrated from the associated message topics of all target message topics according to the number of existing identical associated message topics are as follows: First, for all target message topics, execute step D1: if there are two or more target message topics, and there are the largest number of identical related message topics between the two or more target message topics, record the largest number of identical related message topics as a message topic set to be integrated; at the same time, record the two or more target message topics as referenced topics; Then, for the remaining target message topics excluding the referenced topics, step D1 is repeatedly executed until there is no same associated message topic between two or more remaining target message topics, and the repetitive execution is stopped to obtain several message topic sets to be integrated.

4. The data communication method for a smart seat according to claim 1, characterized in that: The specific steps of obtaining the life cycle of the temporary message topic according to the subscription frequency and subscription sequence of the target message topic corresponding to the temporary message topic are as follows: The average subscription frequency of the target message topic corresponding to each temporary message topic is obtained, and the life cycle of each temporary message topic is obtained according to the subscription rules of all target message topics corresponding to each temporary message topic at different time sequences and the average subscription frequency.

5. The data communication method for a smart seat according to claim 1, characterized in that: The specific steps for obtaining all the message topics that are dependent on are as follows: The message data corresponding to the target message topic is recorded as b1, and other message data involved in calculating b1 are obtained, and the message topics corresponding to the other message data are used as all the dependent message topics.

6. The data communication method for a smart seat according to claim 1, characterized in that: The subscription multiplexing index is positively correlated with N and the subscription frequency respectively.

7. The data communication method for a smart seat according to claim 4, characterized in that: The life cycle is positively correlated with the mean of the subscription frequency of the target message topic and the subscription regularity.

8. The data communication method for a smart seat according to claim 4, characterized in that: The specific steps for obtaining the subscription rule are as follows: For all target message topics corresponding to each temporary message topic, all target message topics are sorted in the order of the time they are subscribed to by the client. If there are two or more consecutive identical target message topics in the sorting result, one target message topic is retained; the subscription time interval between two adjacent target message topics in the sorting result is calculated, and then the average of the subscription time intervals between all adjacent target message topics in the sorting result is calculated, and the subscription regularity is negatively correlated with the average of the subscription time intervals.

9. A data communication system for a smart seat, the system comprising a seat client and an MQTT server, wherein the seat client comprises a sensor, a control device, a media device, a storage device and a computing unit on the seat; the seat client publishes a message topic to the MQTT server; the MQTT server comprises a memory and a processor, wherein the memory stores a computer program that can be run on the processor in addition to storing messages and message topics, characterized in that: When the processor executes the computer program, the steps of the data communication method for a smart seat as described in any one of claims 1 to 8 are implemented.