A smart rope skipping data interaction method for competition and training
Through the intelligent rope skipping data interaction method, the MQTT protocol and server side are used to collect and encrypt data, which solves the problem of insufficient recording and feedback of traditional rope skipping data, and realizes intelligent sports management and efficient event monitoring.
Patent Information
- Application Number
- CN202410923084.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-10
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2044-07-10
AI Technical Summary
Traditional skipping rope cannot accurately record data, lacks real-time feedback function, cannot intelligently manage and guide sports, and the event monitoring efficiency is low and the accuracy is not high.
An intelligent rope skipping data interaction method is provided, which uses the MQTT protocol to send data communication requests to the server, determines the current operating mode based on the received instruction information, and performs corresponding data collection and encryption processing to realize real-time monitoring and transmission of event data and training data.
It realizes accurate data recording and real-time feedback of intelligent rope skipping in competition and training modes, improves the intelligence level of sports management and guidance, and improves the efficiency and accuracy of event monitoring.
Smart Images

Figure CN118612202B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data communication technology, and in particular to an intelligent rope skipping data interaction method for competition and training. Background Art
[0002] Limitations of traditional rope skipping: Rope skipping is a sport with a long history. It is loved by the majority of users for its advantages such as being simple and easy to perform, requiring few venues, and having a good training effect on the cardiovascular system. However, the traditional rope skipping has the following limitations during use: it cannot accurately record data. The traditional rope skipping cannot automatically record the number, frequency, duration, and other data of the user's rope skipping. It lacks real-time feedback function and cannot provide users with real-time exercise feedback. It cannot adjust exercise intensity and posture in time. It has no intelligent function and cannot be linked with other devices or applications. It cannot realize intelligent exercise management and guidance. Accordingly, the monitoring of traditional rope skipping events is carried out through manual detection, which leads to problems such as low monitoring efficiency and low monitoring accuracy. Summary of the invention
[0003] In order to overcome the problems existing in the related art, the present disclosure provides an intelligent rope skipping data interaction method for competition and training.
[0004] According to a first aspect of an embodiment of the present disclosure, a method for interacting with smart rope skipping data for competition and training is provided, characterized in that the method is applied to smart rope skipping and comprises:
[0005] In response to the smart skipping rope starting a data interaction mode, a data communication request is sent to a server based on the message queue telemetry transmission protocol MQTT in the smart skipping rope, wherein the data communication request includes a device identity code of the smart skipping rope;
[0006] Polling the instruction information fed back by the server within a preset time period, and in response to receiving the instruction information sent by the server within the preset time period, comparing and identifying the instruction information to determine the current operation mode of the smart skipping rope;
[0007] If the instruction information is protocol message information of the communication type corresponding to the MQTT, it is determined that the current operating mode of the smart rope skipping is the competition mode. In response to the current operating mode being the competition mode, an MQTT long connection communication is established with the server according to the instruction information, and based on the MQTT long connection communication, the event process information sent by the server is received, and a corresponding event data collection operation is performed according to the event process information to generate event data corresponding to the smart rope skipping, and the event data is iteratively encrypted according to the instruction information to generate first encrypted data and send it to the server;
[0008] If the instruction information is protocol message information corresponding to the HTTP communication type, it is determined that the current operating mode of the smart skipping rope is the training mode. In response to the current operating mode being the training mode, the training process information of the smart skipping rope is obtained, and based on the training process information, corresponding training data collection operations are performed on the smart skipping rope to generate training data for the smart skipping rope. The training data is encrypted according to the instruction information, and second encrypted data is generated and sent to the server.
[0009] Optionally, iteratively encrypting the event data according to the instruction information to generate first encrypted data and send it to the server includes:
[0010] According to the instruction information, determine the MQTT communication ID, MQTT communication account password and MQTT communication interface of the smart skipping rope corresponding to the current event;
[0011] Iteratively encrypt the event data according to the MQTT communication ID and the MQTT communication account password to generate the first encrypted data;
[0012] The first encrypted data is sent to the server through the MQTT communication interface.
[0013] Optionally, the iterative encryption of the event data according to the MQTT communication ID and the MQTT communication account password to generate the first encrypted data includes:
[0014] Determine the event data collection duration corresponding to the event process information according to the instruction information, and perform K rounds of iterative expansion on the preset initial key based on the event data collection duration and the event data to generate a K round key;
[0015] Performing bit conversion on the event data, the MQTT communication ID and the MQTT communication account password to generate corresponding bit plaintext information;
[0016] Performing a bit-by-bit XOR operation on the bit plaintext information using the K-th round key to generate corresponding target ciphertext information;
[0017] Perform K rounds of permutation transformation on the target ciphertext information based on a preset permutation transformation algorithm to generate the first encrypted data.
[0018] Optionally, performing K rounds of permutation transformation on the first ciphertext information based on a preset permutation transformation algorithm to generate the first encrypted data includes:
[0019] Dividing the first ciphertext information into a plurality of data blocks, performing nonlinear transformation on the plurality of data blocks through a preset substitution layer of the smart skipping rope to generate transformation data;
[0020] Performing linear permutation on the transformed data through a preset permutation layer of the smart skipping rope to generate first arrangement data;
[0021] The above iterative steps are repeated until the number of permutation transformation rounds reaches K times, and target permutation data is generated, and the target permutation data is used as the first encrypted data.
[0022] Optionally, the step of performing K rounds of iterative expansion on the preset initial key based on the event data collection duration and the event data to generate a K round key includes:
[0023] Encrypting the event data according to the preset initial key to generate first ciphertext information;
[0024] Based on the first ciphertext information and the preset initial key, configuring a second round key called by the second round encryption;
[0025] Repeat the above iterative steps until the number of iterative expansions reaches K times, and generate the K-th round key.
[0026] Optionally, performing corresponding competition data collection operations according to the competition process information to generate competition data corresponding to the smart rope skipping includes:
[0027] Determine the task identifier information corresponding to the event process information;
[0028] monitoring the event instruction information sent by the server within a preset time range, and in response to receiving the target event instruction information sent by the server, comparing the target event instruction information with the task identifier information;
[0029] When it is determined that the target competition instruction information matches the task identifier information, the rope skipping data of the smart rope skipping is monitored according to the competition process information to generate the competition data.
[0030] Optionally, monitoring the rope skipping data of the smart rope skipping according to the competition process information to generate the competition data includes:
[0031] Determine the data type collected by the smart skipping rope according to the competition process information;
[0032] Based on the collected data types, multiple types of multiple sensor data generated by the smart skipping rope during the competition are obtained;
[0033] The multiple sensor data are fused by a sensor fusion algorithm to generate the event data.
[0034] According to a second aspect of an embodiment of the present disclosure, there is provided an intelligent rope skipping data interaction device for competition and training, characterized in that it is applied to an intelligent rope skipping device, and the device comprises:
[0035] A sending module, configured to respond to the smart skipping rope starting a data interaction mode, and to send a data communication request to a server based on the message queue telemetry transmission protocol MQTT in the smart skipping rope, wherein the data communication request includes a device identity code of the smart skipping rope;
[0036] A determination module, configured to poll the instruction information fed back by the server within a preset time period, and in response to receiving the instruction information sent by the server within the preset time period, compare and identify the instruction information to determine the current operation mode of the smart skipping rope;
[0037] A first execution module, for determining that the current operation mode of the smart rope skipping is a competition mode if the instruction information is protocol message information of the communication type corresponding to the MQTT, in response to the current operation mode being the competition mode, establishing MQTT long connection communication with the server according to the instruction information, and based on the MQTT long connection communication, receiving the competition process information sent by the server, performing corresponding competition data collection operations according to the competition process information to generate competition data corresponding to the smart rope skipping, iteratively encrypting the competition data according to the instruction information, generating first encrypted data and sending it to the server;
[0038] The second execution module is used to determine that the current operating mode of the smart skipping rope is the training mode if the instruction information is the protocol message information corresponding to the HTTP communication type, and in response to the current operating mode being the training mode, obtain the training process information of the smart skipping rope, and perform corresponding training data collection operations on the smart skipping rope based on the training process information to generate training data of the smart skipping rope, encrypt the training data according to the instruction information, generate second encrypted data and send it to the server.
[0039] According to a third aspect of an embodiment of the present disclosure, there is provided a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of any one of the methods described in the first aspect are implemented.
[0040] According to a fourth aspect of an embodiment of the present disclosure, there is provided an electronic device, including:
[0041] processor;
[0042] a memory for storing processor-executable instructions;
[0043] The processor is configured to execute executable instructions in the memory to implement the method described in any one of the first aspects.
[0044] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
[0045] Through the above-mentioned method, in response to the smart skipping rope starting the data interaction mode, a data communication request is sent to the server based on the message queue telemetry transmission protocol MQTT in the smart skipping rope, the data communication request includes the device identity code of the smart skipping rope, and the instruction information fed back by the server is polled within a preset time period. In response to receiving the instruction information sent by the server within the preset time period, the instruction information is compared and identified to determine the current operating mode of the smart skipping rope. If the instruction information is the protocol message information of the communication type corresponding to the MQTT, it is determined that the current operating mode of the smart skipping rope is the competition mode. In response to the current operating mode being the competition mode, an MQTT long connection communication is established with the server according to the instruction information, and based on the MQ TT long connection communication, receiving the event process information sent by the server, performing corresponding event data collection operations according to the event process information to generate event data corresponding to the smart skipping rope, iteratively encrypting the event data according to the instruction information, generating first encrypted data and sending it to the server, if the instruction information is the protocol message information corresponding to the HTTP communication type, then determining that the current operation mode of the smart skipping rope is the training mode, in response to the current operation mode being the training mode, obtaining the training process information of the smart skipping rope, and performing corresponding training data collection operations on the smart skipping rope based on the training process information to generate the training data of the smart skipping rope, encrypting the training data according to the instruction information, generating second encrypted data and sending it to the server. In this way, the skipping rope data of the smart skipping rope in different modes is monitored, and data interaction transmission is performed in different ways through different modes, achieving more data interaction purposes of the smart skipping rope and increasing the user experience.
[0046] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0048] Figure 1The present invention is a flow chart of a method for interacting with smart rope skipping data for competition and training according to an exemplary embodiment.
[0049] Figure 2 The present invention is a block diagram of an intelligent rope skipping data interaction device for competition and training according to an exemplary embodiment. DETAILED DESCRIPTION
[0050] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0051] It should be noted that all actions of acquiring signals, information or data in this application are carried out in compliance with the relevant data protection laws and policies of the country where they are located, and with the authorization given by the owner of the corresponding device.
[0052] In some embodiments, in existing smart rope skipping products, a low-power Bluetooth module is integrated into the rope skipping handle, and a motion sensor (such as an accelerometer, gyroscope, etc.) is integrated into the rope skipping to detect the motion state and number of rope skipping. At the same time, firmware code is written for the Bluetooth module and motion sensor of the rope skipping, and the data format and protocol of Bluetooth communication are defined, including the acquisition frequency of sensor data, the structure of data packets, etc., and the data is transmitted to the mobile device via Bluetooth to realize the collection of rope skipping data. At the same time, a matching mobile phone App is developed to connect to the rope skipping via Bluetooth to display real-time rope skipping data, record rope skipping history, and provide training plans and suggestions. In multi-person events, the TCP (Transmission Control Protocol) communication mode is used to complete the upload of multi-device data and the control of devices.
[0053] In some embodiments, the biggest problems of Bluetooth communication scheme and TCP communication scheme are performance and data security. The range of Bluetooth is usually only 10 meters to 100 meters, depending on the power level of the device. It is not suitable for long-distance communication. Bluetooth data transmission, and the data transmission rate of Bluetooth communication is low. The maximum transmission rate of traditional Bluetooth is about 3 Mbps, while the rate of Bluetooth low energy (BLE) is lower, at about 1 Mbps. This limits Bluetooth in applications that require high data transmission rates. Using Bluetooth to work in the 2.4 GHz ISM (Industrial, Scientific and Medical) band, which is also the frequency band used by Wi-Fi, microwave ovens and other devices, is prone to interference and signal congestion, affecting communication quality. Related studies have shown that vulnerabilities in the Bluetooth protocol may be exploited by malicious attackers. TCP communication schemes need to maintain connection status, sequence numbers, confirmation mechanisms and flow control. TCP communication has a larger protocol overhead than connectionless protocols (such as UDP (User Datagram Protocol, User Datagram Protocol), etc.) and is more complex to implement and maintain than connectionless protocols, which increases the complexity and resource consumption of the system due to retransmission and confirmation mechanisms, and TCP communication has poor real-time performance, which is not suitable for data interaction processing in delay-sensitive application scenarios. At the same time, when communication equipment fails, TCP communication cannot easily and quickly locate the problem, and achieve problem location and equipment repair and upgrade.
[0054] In view of this, in the hardware solution of the present application, by setting multiple Hall sensors in the smart skipping rope, the smart adjustment detects the rotation of the skipping rope shaft through multiple Hall sensors, and the built-in algorithm accurately obtains the 360° circular motion of the shaft, making the skipping rope count more accurate. At the same time, the built-in vibration reminds the user, and there are multiple counting methods, such as positive counting, countdown, countdown technology, etc. The calorie calculation is automatically converted into the calories consumed by the number of skipping ropes. The display screen is backlit, and the numbers can be clearly seen in a dark environment. At the same time, in the smart skipping rope of the present application, the hardware adopts a 4G Internet of Things chip in communication, and communicates with the HTTP server based on the built-in openCPU (so that the analysis and computing capabilities of the R language can be embedded in the web page, thereby creating a dynamic and interactive web application) and SDK (Software Development Kit), and obtains the skipping rope data (including the number of rotations, the number of tripping ropes, the IMEI of the Internet of Things card, the timestamp, the signal strength), pushes data, downloads files on the server, and remotely upgrades by OTA (Over-the-Air Technology). At the same time, in terms of the software of the smart skipping rope, the device network access identification is imported through the intelligent background system, device competitions and other operations are intelligently arranged, the device is initialized through https, and the latest IoT communication MQTT (Message QueuingTelemetry Transport) communication method is adopted. A custom communication protocol, load security mode and process design are used for data transmission. Device data can be collected and viewed and the device can be controlled through the web page and mobile app.
[0055] Figure 1 FIG. 1 is a flow chart showing a method for interacting with intelligent rope skipping data for competition and training according to an exemplary embodiment. Figure 1 As shown, the method includes:
[0056] In step S11, in response to the smart skipping rope starting the data interaction mode, a data communication request is sent to a server based on the message queue telemetry transmission protocol MQTT in the smart skipping rope, and the data communication request includes the device identity code of the smart skipping rope.
[0057] For example, in the present embodiment, when the smart skipping rope starts the data interaction mode, it indicates that the current user operating the smart skipping rope needs to record the skipping data. For example, relevant buttons can be configured on the smart skipping rope, and the user presses and holds the button for a set period of time, which determines that the user currently needs to record the skipping exercise data based on the smart skipping rope. When the smart skipping rope enters the data interaction mode, it is necessary to monitor various types of data generated by the skipping activity based on multiple sensors on the smart skipping rope, and generate skipping data to be uploaded to the server.
[0058] It should be noted that in this embodiment, the smart skipping rope, the server and one or more user terminals constitute a data interaction system of the smart skipping rope. One or more user terminals can request the skipping rope data of the smart skipping rope from the server, and generate corresponding health information and / or health planning information based on the skipping rope data. For example, the user terminal can be the user's smart phone. The smart skipping rope turns on the data interaction mode. After the data upload is completed, the generated skipping rope data can be fed back to the user terminal through the server. The user terminal has a corresponding APP built in, and can generate corresponding health information based on the skipping rope data, such as calorie consumption information, skipping rope number information, skipping rope speed information, skipping rope plan information, etc.
[0059] For example, in this embodiment, the smart skipping rope and the server communicate data through the MQTT transmission protocol, and the data transmission of the smart skipping rope is performed based on the portability and security of the MQTT transmission. The smart skipping rope sends a data communication request to the server according to MQTT, and the data communication request includes the device identity code of the smart skipping rope. The server can identify the communication identity of the smart skipping rope through the device identity code, and can arrange the corresponding competition process for the smart skipping rope based on the communication identity to collect the competition data of the smart skipping rope during the competition.
[0060] In step S12, the instruction information fed back by the server is polled within a preset time period, and in response to receiving the instruction information sent by the server within the preset time period, the instruction information is compared and identified to determine the current operating mode of the smart skipping rope.
[0061] For example, in this embodiment, after the smart skipping rope sends a data communication request, it polls the instruction information fed back by the server within a preset time period to determine whether the server has issued instructions to the smart skipping rope. When the instruction information sent by the server is received within the preset time period, the instruction information is compared and identified according to the device identity code of the smart skipping rope to determine the current operating mode of the smart skipping rope.
[0062] It should be noted that the data interaction between the smart rope skipping and the server in this embodiment adopts different data interaction modes based on different data interaction purposes. For example, two data interaction modes are provided in this embodiment, corresponding to the two data interaction purposes of the smart rope skipping. For example, the data interaction purpose of the current smart rope skipping is used to upload the training data of the smart rope skipping. The communication chip in the smart rope skipping is currently based on HTTP communication to perform data interaction and upload training data; when the data interaction purpose of the smart rope skipping is used to upload the event data of the smart rope skipping, the communication chip in the smart rope skipping is currently based on the above-mentioned MQTT protocol to perform event data interaction and upload the event data collected by the smart rope skipping to the MQTT server.
[0063] For example, in this embodiment, the command information is compared with the information protocol, and the server indicates the current operating mode of the smart rope skipping according to the information type of the command information. In this embodiment, the smart rope skipping is used for training data collection interaction and event data collection interaction, so the current operating modes corresponding to the smart rope skipping are event mode and training mode. For example, it can be determined based on the different communication protocols corresponding to the command information whether the current server indicates training data transmission of HTTP communication or event data transmission of MQTT protocol communication.
[0064] It should be noted that in this embodiment, the server has different data storage locations and methods based on different communication protocols and device identity code information of different smart skipping ropes. In comparison, the security of storing event data on the server is greater than the security of storing training data.
[0065] In step S13, if the instruction information is the protocol message information of the communication type corresponding to the MQTT, it is determined that the current operating mode of the smart skipping rope is the competition mode. In response to the current operating mode being the competition mode, an MQTT long connection communication is established with the server according to the instruction information, and based on the MQTT long connection communication, the event process information sent by the server is received, and corresponding event data collection operations are performed according to the event process information to generate event data corresponding to the smart skipping rope, and the event data is iteratively encrypted according to the instruction information to generate first encrypted data and send it to the server.
[0066] For example, in this embodiment, when the instruction information is a protocol message of the corresponding communication type of MQTT, it is determined that the current operating mode of the rope skipping is the competition mode, and the MQTT long connection communication is established with the server according to the instruction information, so that the smart rope skipping always monitors the event process and the event instructions based on the event process sent by the server. Perform the corresponding event data collection operation according to the event process information. In this embodiment, the event data collection operation is formulated according to different event arrangements. For example, the number of rope skippings of the smart rope skipping within 10 minutes is counted to generate corresponding event data. Based on the event data collection operation, after the event data corresponding to the smart rope skipping is generated, the event data is iteratively encrypted according to the intelligent information, and the first encrypted data is generated and sent to the server. In this embodiment, the generated event data is encrypted by iterative encryption. On the basis of ensuring data security, the heavy encryption process is avoided to realize the encrypted transmission of data.
[0067] Optionally, in some embodiments, the above step: iteratively encrypting the event data according to the instruction information to generate first encrypted data and send it to the server includes:
[0068] According to the instruction information, determine the MQTT communication ID, MQTT communication account password and MQTT communication interface of the smart skipping rope corresponding to the current event;
[0069] Iteratively encrypt the event data according to the MQTT communication ID and the MQTT communication account password to generate the first encrypted data;
[0070] The first encrypted data is sent to the server through the MQTT communication interface.
[0071] Optionally, in some embodiments, the above step of iteratively encrypting the event data according to the MQTT communication ID and the MQTT communication account password to generate the first encrypted data includes:
[0072] Determine the event data collection duration corresponding to the event process information according to the instruction information, and perform K rounds of iterative expansion on the preset initial key based on the event data collection duration and the event data to generate a K round key;
[0073] Performing bit conversion on the event data, the MQTT communication ID and the MQTT communication account password to generate corresponding bit plaintext information;
[0074] Performing a bit-by-bit XOR operation on the bit plaintext information using the K-th round key to generate corresponding target ciphertext information;
[0075] Perform K rounds of permutation transformation on the target ciphertext information based on a preset permutation transformation algorithm to generate the first encrypted data.
[0076] Optionally, in some embodiments, the above step of performing K rounds of permutation transformation on the first ciphertext information based on a preset permutation transformation algorithm to generate the first encrypted data includes:
[0077] Dividing the first ciphertext information into a plurality of data blocks, performing nonlinear transformation on the plurality of data blocks through a preset substitution layer of the smart skipping rope to generate transformation data;
[0078] Performing linear permutation on the transformed data through a preset permutation layer of the smart skipping rope to generate first arrangement data;
[0079] The above iterative steps are repeated until the number of permutation transformation rounds reaches K times, and target permutation data is generated, and the target permutation data is used as the first encrypted data.
[0080] Optionally, in some embodiments, the above step, based on the event data collection duration and the event data, performing K rounds of iterative expansion on the preset initial key to generate the K round key, includes:
[0081] Encrypting the event data according to the preset initial key to generate first ciphertext information;
[0082] Based on the first ciphertext information and the preset initial key, configuring a second round key called by the second round encryption;
[0083] Repeat the above iterative steps until the number of iterative expansions reaches K times, and generate the K-th round key.
[0084] Optionally, in some embodiments, the above steps, performing corresponding event data collection operations according to the event process information to generate event data corresponding to the smart rope skipping, include:
[0085] Determine the task identifier information corresponding to the event process information;
[0086] monitoring the event instruction information sent by the server within a preset time range, and in response to receiving the target event instruction information sent by the server, comparing the target event instruction information with the task identifier information;
[0087] When it is determined that the target competition instruction information matches the task identifier information, the rope skipping data of the smart rope skipping is monitored according to the competition process information to generate the competition data.
[0088] Optionally, in some embodiments, the above step of monitoring the rope skipping data of the smart rope skipping according to the competition process information to generate the competition data includes:
[0089] Determine the data type collected by the smart skipping rope according to the competition process information;
[0090] Based on the collected data types, multiple types of multiple sensor data generated by the smart skipping rope during the competition are obtained;
[0091] The multiple sensor data are fused by a sensor fusion algorithm to generate the event data.
[0092] In step S14, if the instruction information is protocol message information corresponding to the HTTP communication type, it is determined that the current operating mode of the smart skipping rope is the training mode. In response to the current operating mode being the training mode, the training process information of the smart skipping rope is obtained, and based on the training process information, corresponding training data collection operations are performed on the smart skipping rope to generate training data for the smart skipping rope. The training data is encrypted according to the instruction information, and second encrypted data is generated and sent to the server.
[0093] For example, in this embodiment, when the instruction information is the protocol message information corresponding to the HTTP communication type, it is determined that the current operation mode of the smart rope skipping is the training mode, the training process information of the smart rope skipping is obtained, and the corresponding training data collection operation is performed on the smart rope skipping based on the training process information. In this embodiment, when it is determined that the current operation mode of the smart rope skipping is the training mode, the training task monitoring process sent by the user end can also be obtained from the server end based on HTTP communication, and the training data of the training task of the smart rope skipping is collected based on the training task monitoring process to generate training data. The training data is encrypted by the instruction information, and the second encrypted data is generated and sent to the server end.
[0094] For example, in this embodiment, a data interaction process of a smart rope skipping is provided, and the device status is: standby, off, rope skipping in progress, charging, and fully charged; the judgment of whether there is a competition is that after the device is turned on, it will connect to the Internet and request the server through HTTP. The server queries whether there is a competition for the rope skipping according to the IMEI code and returns the corresponding competition data; wherein the MQTT connection step includes: the device is turned on, connected to the Internet, and an HTTP request is initiated to the server through the 4g network. The server verifies and sends the MQTT account and password, and the device obtains the account and password to connect to the MQTT communication. Among them, the difference between HTTP and MQTT data streams is that HTTP is the initialization data of the device sent by the server, including the account password, communication port and IP of the MQTT communication, as well as whether to perform an OTA (Over-The-Air) upgrade and whether there is a competition. MQTT mainly deals with the interaction between the server and the rope skipping, such as sending instructions to start the competition, ending the competition, calibrating the device time, uploading rope skipping data, and monitoring the online and offline status of the device.
[0095] Through the above methods, the hardware equipment adopts multiple sensors and built-in optimization algorithms to ensure the accuracy of data collection; the hardware equipment adopts China Mobile's 4G Internet of Things chip to ensure that the data transmission meets the faster real-time requirements and the distance limit reaches a longer range; the communication technology adopts the MQTT communication method, and through the custom mode communication protocol, it enhances the security monitoring of data, reduces the consumption of bandwidth and power, solves the problems of high overhead and high delay, and achieves the requirements of better many-to-many communication mode and stronger multi-channel communication; the operation is more portable and does not limit the device terminal. Whether it is a computer or a mobile phone user, it can complete the operation very conveniently.
[0096] Through the above-mentioned method, in response to the smart skipping rope starting the data interaction mode, a data communication request is sent to the server based on the message queue telemetry transmission protocol MQTT in the smart skipping rope, the data communication request includes the device identity code of the smart skipping rope, and the instruction information fed back by the server is polled within a preset time period. In response to receiving the instruction information sent by the server within the preset time period, the instruction information is compared and identified to determine the current operating mode of the smart skipping rope. If the instruction information is the protocol message information of the communication type corresponding to the MQTT, it is determined that the current operating mode of the smart skipping rope is the competition mode. In response to the current operating mode being the competition mode, an MQTT long connection communication is established with the server according to the instruction information, and based on the MQ TT long connection communication, receiving the event process information sent by the server, performing corresponding event data collection operations according to the event process information to generate event data corresponding to the smart skipping rope, iteratively encrypting the event data according to the instruction information, generating first encrypted data and sending it to the server, if the instruction information is the protocol message information corresponding to the HTTP communication type, then determining that the current operation mode of the smart skipping rope is the training mode, in response to the current operation mode being the training mode, obtaining the training process information of the smart skipping rope, and performing corresponding training data collection operations on the smart skipping rope based on the training process information to generate the training data of the smart skipping rope, encrypting the training data according to the instruction information, generating second encrypted data and sending it to the server. In this way, the skipping rope data of the smart skipping rope in different modes is monitored, and data interaction transmission is performed in different ways through different modes, achieving more data interaction purposes of the smart skipping rope and increasing the user experience.
[0097] Figure 2 FIG. 1 is a block diagram of an intelligent rope skipping data interaction device for competition and training according to an exemplary embodiment. Figure 2 As shown, the device 100 comprises:
[0098] The sending module 110 is used for sending a data communication request to a server based on the message queue telemetry transmission protocol MQTT in the smart skipping rope in response to the smart skipping rope starting the data interaction mode, wherein the data communication request includes the device identity code of the smart skipping rope;
[0099] The determination module 120 is used to poll the instruction information fed back by the server within a preset time period, and in response to receiving the instruction information sent by the server within the preset time period, compare and identify the instruction information to determine the current operation mode of the smart skipping rope;
[0100] A first execution module 130 is used to determine that the current operation mode of the smart rope skipping is a competition mode if the instruction information is protocol message information of the communication type corresponding to the MQTT, and in response to the current operation mode being the competition mode, establish MQTT long connection communication with the server according to the instruction information, and based on the MQTT long connection communication, receive the competition process information sent by the server, perform corresponding competition data collection operations according to the competition process information to generate competition data corresponding to the smart rope skipping, iteratively encrypt the competition data according to the instruction information, generate first encrypted data and send it to the server;
[0101] The second execution module 140 is used to determine that the current operating mode of the smart skipping rope is the training mode if the instruction information is protocol message information corresponding to the HTTP communication type, and in response to the current operating mode being the training mode, obtain the training process information of the smart skipping rope, and perform corresponding training data collection operations on the smart skipping rope based on the training process information to generate training data of the smart skipping rope, encrypt the training data according to the instruction information, generate second encrypted data and send it to the server.
[0102] Optionally, the first execution module 130 includes:
[0103] The first determination submodule is used to determine the MQTT communication ID, MQTT communication account password and MQTT communication interface of the smart rope skipping corresponding to the current event according to the instruction information;
[0104] A first generating submodule, configured to iteratively encrypt the event data according to the MQTT communication ID and the MQTT communication account password to generate the first encrypted data;
[0105] The first sending submodule is used to send the first encrypted data to the server through the MQTT communication interface.
[0106] Optionally, the first generation submodule includes:
[0107] a determination unit, configured to determine, according to the instruction information, a time duration of collecting event data corresponding to the event process information, and perform K rounds of iterative expansion on a preset initial key based on the time duration of collecting event data and the event data, to generate a K round key;
[0108] A first generating unit, configured to perform bit conversion on the event data, the MQTT communication ID and the MQTT communication account password to generate corresponding bit plaintext information;
[0109] A second generating unit, configured to perform a bit-by-bit XOR operation on the bit plaintext information using the K-th round key to generate corresponding target ciphertext information;
[0110] The third generating unit is used to perform K rounds of permutation transformation on the target ciphertext information based on a preset permutation transformation algorithm to generate the first encrypted data.
[0111] Optionally, the third generating unit is used to:
[0112] Dividing the first ciphertext information into a plurality of data blocks, performing nonlinear transformation on the plurality of data blocks through a preset substitution layer of the smart skipping rope to generate transformation data;
[0113] Performing linear permutation on the transformed data through a preset permutation layer of the smart skipping rope to generate first arrangement data;
[0114] The above iterative steps are repeated until the number of permutation transformation rounds reaches K times, and target permutation data is generated, and the target permutation data is used as the first encrypted data.
[0115] Optionally, a determination unit is configured to:
[0116] Encrypting the event data according to the preset initial key to generate first ciphertext information;
[0117] Based on the first ciphertext information and the preset initial key, configuring a second round key called by the second round encryption;
[0118] Repeat the above iterative steps until the number of iterative expansions reaches K times, and generate the K-th round key.
[0119] Optionally, the first execution module 130 includes:
[0120] A second determination submodule is used to determine the task identifier information corresponding to the event process information;
[0121] A comparison submodule, configured to monitor the competition instruction information sent by the server within a preset time range, and in response to receiving the target competition instruction information sent by the server, compare the target competition instruction information with the task identifier information;
[0122] The second generating submodule is used to monitor the skipping data of the smart skipping rope according to the competition process information to generate the competition data when it is determined that the target competition instruction information matches the task identifier information.
[0123] Optionally, the second generation submodule is used to:
[0124] Determine the data type collected by the smart skipping rope according to the competition process information;
[0125] Based on the collected data types, multiple types of multiple sensor data generated by the smart skipping rope during the competition are obtained;
[0126] The multiple sensor data are fused by a sensor fusion algorithm to generate the event data.
[0127] Through the above-mentioned method, in response to the smart skipping rope starting the data interaction mode, a data communication request is sent to the server based on the message queue telemetry transmission protocol MQTT in the smart skipping rope, the data communication request includes the device identity code of the smart skipping rope, and the instruction information fed back by the server is polled within a preset time period. In response to receiving the instruction information sent by the server within the preset time period, the instruction information is compared and identified to determine the current operating mode of the smart skipping rope. If the instruction information is the protocol message information of the communication type corresponding to the MQTT, it is determined that the current operating mode of the smart skipping rope is the competition mode. In response to the current operating mode being the competition mode, an MQTT long connection communication is established with the server according to the instruction information, and based on the MQ TT long connection communication, receiving the event process information sent by the server, performing corresponding event data collection operations according to the event process information to generate event data corresponding to the smart skipping rope, iteratively encrypting the event data according to the instruction information, generating first encrypted data and sending it to the server, if the instruction information is the protocol message information corresponding to the HTTP communication type, then determining that the current operation mode of the smart skipping rope is the training mode, in response to the current operation mode being the training mode, obtaining the training process information of the smart skipping rope, and performing corresponding training data collection operations on the smart skipping rope based on the training process information to generate the training data of the smart skipping rope, encrypting the training data according to the instruction information, generating second encrypted data and sending it to the server. In this way, the skipping rope data of the smart skipping rope in different modes is monitored, and data interaction transmission is performed in different ways through different modes, achieving more data interaction purposes of the smart skipping rope and increasing the user experience.
[0128] The present disclosure also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the method described in any one of the aforementioned embodiments are implemented.
[0129] The present disclosure also provides an electronic device, including:
[0130] processor;
[0131] a memory for storing processor-executable instructions;
[0132] The processor is configured to execute executable instructions in the memory to implement the method described in any one of the aforementioned embodiments.
[0133] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the present disclosure. This application is intended to cover any variations, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0134] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A smart rope skipping data interaction method for competition and training, characterized in that: Applied to intelligent skipping rope, the method comprises: In response to the smart skipping rope starting a data interaction mode, a data communication request is sent to a server based on the message queue telemetry transmission protocol MQTT in the smart skipping rope, wherein the data communication request includes a device identity code of the smart skipping rope; Polling the instruction information fed back by the server within a preset time period, and in response to receiving the instruction information sent by the server within the preset time period, comparing and identifying the instruction information to determine the current operation mode of the smart skipping rope; If the instruction information is protocol message information of the communication type corresponding to the MQTT, it is determined that the current operating mode of the smart rope skipping is the competition mode. In response to the current operating mode being the competition mode, an MQTT long connection communication is established with the server according to the instruction information, and based on the MQTT long connection communication, the event process information sent by the server is received, and a corresponding event data collection operation is performed according to the event process information to generate event data corresponding to the smart rope skipping, and the event data is iteratively encrypted according to the instruction information to generate first encrypted data and send it to the server; If the instruction information is protocol message information corresponding to the HTTP communication type, it is determined that the current operating mode of the smart skipping rope is the training mode. In response to the current operating mode being the training mode, the training process information of the smart skipping rope is obtained, and based on the training process information, corresponding training data collection operations are performed on the smart skipping rope to generate training data for the smart skipping rope. The training data is encrypted according to the instruction information, and second encrypted data is generated and sent to the server.
2. The intelligent rope skipping data interaction method for competition and training according to claim 1, characterized in that: The iteratively encrypting the event data according to the instruction information to generate first encrypted data and send it to the server includes: According to the instruction information, determine the MQTT communication ID, MQTT communication account password and MQTT communication interface of the smart skipping rope corresponding to the current event; Iteratively encrypt the event data according to the MQTT communication ID and the MQTT communication account password to generate the first encrypted data; The first encrypted data is sent to the server through the MQTT communication interface.
3. The intelligent rope skipping data interaction method for competition and training according to claim 2, characterized in that: The iterative encryption of the event data according to the MQTT communication ID and the MQTT communication account password to generate the first encrypted data includes: Determine the event data collection duration corresponding to the event process information according to the instruction information, and perform K rounds of iterative expansion on the preset initial key based on the event data collection duration and the event data to generate a K round key; Performing bit conversion on the event data, the MQTT communication ID and the MQTT communication account password to generate corresponding bit plaintext information; Performing a bit-by-bit XOR operation on the bit plaintext information using the K-th round key to generate corresponding target ciphertext information; Perform K rounds of permutation transformation on the target ciphertext information based on a preset permutation transformation algorithm to generate the first encrypted data.
4. The intelligent rope skipping data interaction method for competition and training according to claim 3 is characterized in that: The step of performing K rounds of permutation transformation on the target ciphertext information based on a preset permutation transformation algorithm to generate the first encrypted data includes: Dividing the target ciphertext information into a plurality of data blocks, performing nonlinear transformation on the plurality of data blocks through a preset substitution layer of the smart skipping rope to generate transformation data; Performing linear permutation on the transformed data through a preset permutation layer of the smart skipping rope to generate first arrangement data; The above iterative steps are repeated until the number of permutation transformation rounds reaches K times, and target permutation data is generated, and the target permutation data is used as the first encrypted data.
5. The intelligent rope skipping data interaction method for competition and training according to claim 3, characterized in that: The step of performing K rounds of iterative expansion on the preset initial key based on the event data collection duration and the event data to generate a K round of keys includes: Encrypting the event data according to the preset initial key to generate first ciphertext information; Based on the first ciphertext information and the preset initial key, configuring a second round key called by the second round encryption; Repeat the above iterative steps until the number of iterative expansions reaches K times, and generate the K-th round key.
6. The intelligent rope skipping data interaction method for competition and training according to any one of claims 1 to 5, characterized in that: The performing corresponding competition data collection operations according to the competition process information to generate competition data corresponding to the smart rope skipping includes: Determine the task identifier information corresponding to the event process information; monitoring the event instruction information sent by the server within a preset time range, and in response to receiving the target event instruction information sent by the server, comparing the target event instruction information with the task identifier information; When it is determined that the target competition instruction information matches the task identifier information, the rope skipping data of the smart rope skipping is monitored according to the competition process information to generate the competition data.
7. The intelligent rope skipping data interaction method for competition and training according to claim 6, characterized in that: The step of monitoring the rope skipping data of the smart rope skipping according to the competition process information to generate the competition data includes: Determine the data type collected by the smart skipping rope according to the competition process information; Based on the collected data types, multiple types of multiple sensor data generated by the smart skipping rope during the competition are obtained; The multiple sensor data are fused by a sensor fusion algorithm to generate the event data.
8. An intelligent rope skipping data interaction device for competition and training, characterized in that: Applied to intelligent skipping rope, the device comprises: A sending module, configured to send a data communication request to a server based on the message queue telemetry transmission protocol MQTT in the smart skipping rope in response to the smart skipping rope starting a data interaction mode, wherein the data communication request includes a device identity code of the smart skipping rope; A determination module, configured to poll the instruction information fed back by the server within a preset time period, and in response to receiving the instruction information sent by the server within the preset time period, compare and identify the instruction information to determine the current operation mode of the smart skipping rope; A first execution module, for determining that the current operation mode of the smart rope skipping is a competition mode if the instruction information is protocol message information of the communication type corresponding to the MQTT, in response to the current operation mode being the competition mode, establishing MQTT long connection communication with the server according to the instruction information, and based on the MQTT long connection communication, receiving the competition process information sent by the server, performing corresponding competition data collection operations according to the competition process information to generate competition data corresponding to the smart rope skipping, iteratively encrypting the competition data according to the instruction information, generating first encrypted data and sending it to the server; The second execution module is used to determine that the current operating mode of the smart skipping rope is the training mode if the instruction information is the protocol message information corresponding to the HTTP communication type, and in response to the current operating mode being the training mode, obtain the training process information of the smart skipping rope, and perform corresponding training data collection operations on the smart skipping rope based on the training process information to generate training data of the smart skipping rope, encrypt the training data according to the instruction information, generate second encrypted data and send it to the server.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method described in any one of claims 1 to 7 are implemented.
10. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to execute executable instructions in the memory to implement the method described in any one of claims 1 to 7.
Citation Information
Patent Citations
Data encryption transmission method
CN108650277A
Skipping rope data acquisition method and device, intelligent skipping rope and related equipment
CN112642094A