Motion recognition method and device of intelligent mattress, electronic equipment and storage medium
Through the motion recognition method of smart mattresses and two-stage matching processing, the problem of lack of unified data processing and inconsistent recognition rules for different types of mattresses in smart mattress motion recognition in the existing technology is solved, and efficient and accurate motion recognition is achieved. and flexible rule configuration.
Patent Information
- Application Number
- CN202411374001.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-01-21
AI Technical Summary
The existing smart mattress motion recognition methods lack unified data processing, and different types of smart mattresses have different recognition rules, and a set of recognition rules cannot be shared. They need to be configured according to different types of smart mattresses.
An action recognition method for smart mattresses is proposed. By obtaining the mattress monitoring data and user test data of smart mattresses, a two-stage matching process is performed. In the first stage, the mattress monitoring data is matched with the target configuration rules to generate an action log data set; in the second stage, the action log data set is matched with the user test data to obtain the action recognition results, and the results are sent to the user front-end for rendering. and display.
Through two-stage matching processing, the efficiency and accuracy of action recognition are improved, a systematic data processing process is realized, the independent rule configuration required for different mattress types is reduced, and the flexibility of rule configuration is improved.
Smart Images

Figure CN119339441A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a method, device, electronic device and storage medium for motion recognition of a smart mattress. Background Art
[0002] At present, different types of smart mattress detections directly output logs through the hardware serial port, lacking unified data processing; different types of smart mattresses have different identification rules, and it is impossible to share a set of identification rules, which need to be configured according to different types of smart mattresses.
[0003] In summary, the technical problems existing in the relevant technologies need to be improved. Summary of the invention
[0004] The embodiments of the present application aim to solve at least one of the technical problems in the related art to a certain extent. To this end, the main purpose of the embodiments of the present application is to propose a method, device, electronic device and storage medium for motion recognition of a smart mattress, which can improve the flexibility of rule configuration and improve the efficiency and accuracy of motion recognition.
[0005] To achieve the above purpose, one aspect of an embodiment of the present application proposes a motion recognition method for a smart mattress, which is applied to a server side. The method comprises the following steps:
[0006] Obtain mattress monitoring data of the smart mattress and receive user test data sent by the user front end;
[0007] Performing a first matching process on the mattress monitoring data and the target configuration rule to obtain an action log data set;
[0008] Performing a second matching process on the action log data set and the user test data to obtain an action recognition result;
[0009] The action recognition result is sent to the user front end; so that the user front end renders the action recognition result to obtain target recognition result interface data, and the target recognition result interface data is displayed on the user front end.
[0010] In some embodiments, the mattress monitoring data includes a plurality of log monitoring data, and the first matching process is performed on the mattress monitoring data and the target configuration rule to obtain the action log data set, including:
[0011] Performing information extraction processing on the target configuration rule to obtain a number of target action character strings;
[0012] Integrate each of the target action character strings to obtain a target action array;
[0013] According to the target action string in the target action array, traverse and query each of the log monitoring data in the mattress monitoring data, and filter out a number of log monitoring data in the mattress monitoring data that successfully matches the target action string;
[0014] Annotate each of the successfully matched log monitoring data to obtain a number of action annotation data;
[0015] The action annotation data are integrated to obtain the action log data set.
[0016] In some embodiments, performing a second matching process on the action log data set and the user test data to obtain an action recognition result includes:
[0017] The various action annotation data in the action log data set are traversed and queried according to the user test data, the action annotation data in the action log data set that successfully matches the user test data is screened out, and the successfully matched action annotation data is used as the action recognition result.
[0018] In some embodiments, after performing a second matching process on the action log data set and the user test data to obtain an action recognition result, the method further includes:
[0019] Generate performance indicator log data based on the action recognition result;
[0020] The performance indicator log data is analyzed and processed to obtain target performance indicator information; the target performance indicator information is used to evaluate the motion recognition performance of the smart mattress.
[0021] To achieve the above purpose, another aspect of the embodiment of the present application proposes a motion recognition method for a smart mattress, which is applied to a user front end. The method comprises the following steps:
[0022] Receive the action recognition results sent by the server;
[0023] Rendering the action recognition result to obtain target recognition result interface data, and displaying the target recognition result interface data through a visual interface;
[0024] Wherein, the motion recognition result is determined according to the motion recognition method of the smart mattress applied to the server side.
[0025] In some embodiments, the method further comprises:
[0026] Acquire motion recognition configuration data; wherein the motion recognition configuration data includes target configuration rules;
[0027] Rendering the motion recognition configuration data to obtain target configuration interface data, and displaying the target configuration interface data through a visual interface; wherein the target configuration interface data includes a smart mattress type control;
[0028] In response to a selection instruction for the smart mattress type control, target action interface data corresponding to the smart mattress type control is obtained, and the target action interface data is displayed through a visual interface; the target action interface data includes an action recognition button;
[0029] In response to a click instruction on the action recognition button, a request is made to the smart mattress to trigger a smart mattress test mechanism to obtain user test data, and the user test data is sent to a server.
[0030] To achieve the above purpose, another aspect of the embodiment of the present application proposes a motion recognition device for a smart mattress, which is applied to a server side and includes the following modules:
[0031] A data acquisition module is used to obtain mattress monitoring data of the smart mattress and receive user test data sent by the user front end;
[0032] A first matching processing module, used for performing a first matching process on the mattress monitoring data and the target configuration rule to obtain an action log data set;
[0033] A second matching processing module, used for performing a second matching process on the action log data set and the user test data to obtain an action recognition result;
[0034] The action recognition result sending module is used to send the action recognition result to the user front end; so that the user front end renders the action recognition result, obtains the target recognition result interface data, and displays the target recognition result interface data on the user front end.
[0035] To achieve the above purpose, another aspect of the embodiment of the present application proposes a motion recognition device for a smart mattress, which is applied to a user front end. The device includes the following modules:
[0036] The action recognition result receiving module is used to receive the action recognition result sent by the server;
[0037] A visualization interface display module is used to render the action recognition result to obtain target recognition result interface data, and display the target recognition result interface data through a visualization interface;
[0038] Wherein, the motion recognition result is determined according to the motion recognition device of the smart mattress applied to the server side.
[0039] To achieve the above-mentioned purpose, another aspect of an embodiment of the present application provides an electronic device, the electronic device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the above-mentioned method when executing the computer program.
[0040] To achieve the above-mentioned purpose, another aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described above is implemented.
[0041] The embodiments of the present application include at least the following beneficial effects: The present application provides a method, device, electronic device and storage medium for motion recognition of a smart mattress. The scheme obtains the mattress monitoring data of the smart mattress and receives the user test data sent by the user front end; performs a first matching process on the mattress monitoring data and the target configuration rule to obtain a motion log data set; performs a second matching process on the action log data set and the user test data to obtain a motion recognition result; sends the motion recognition result to the user front end; enables the user front end to render the motion recognition result, obtains the target recognition result interface data, and displays the target recognition result interface data on the user front end. The embodiment of the present application performs a first matching process on the mattress monitoring data and the target configuration rule, so that the target configuration rule can adapt to different types of smart mattresses, realizes the compatibility of a set of systems with different mattresses, reduces the independent rule configuration required due to different mattress types, and improves the flexibility of the rule configuration; performs a second matching process on the action log data set and the user test data, so that the user's motion can be more accurately identified and the false recognition rate can be reduced. Through the two-stage matching process, a systematic data processing flow is realized, and the efficiency and accuracy of motion recognition are improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 is a flowchart of steps when the motion recognition method of the smart mattress provided by the embodiment of the present application is applied to the server side;
[0043] Figure 2 This is a schematic diagram of an interface for entering action recognition configuration provided by an embodiment of the present application;
[0044] Figure 3 is a schematic diagram of a list of action recognition configurations provided in an embodiment of the present application;
[0045] Figure 4 This is a schematic diagram of a data collection interface of a first device type provided in an embodiment of the present application;
[0046] Figure 5 is a schematic diagram of a data collection interface of a second device type provided in an embodiment of the present application;
[0047] Figure 6 It is a flowchart of the steps when the motion recognition method of the smart mattress provided by the embodiment of the present application is applied to the user front end;
[0048] Figure 7 It is a flowchart of a motion recognition method for a smart mattress provided in an embodiment of the present application;
[0049] Figure 8 It is a structural diagram of the action recognition device of the smart mattress provided in the embodiment of the present application when it is applied to the server side;
[0050] Fig. 9 It is a structural schematic diagram of the action recognition device of the smart mattress provided in the embodiment of the present application when it is applied to the user front end;
[0051] Fig.10 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0052] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below in conjunction with the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present application. They are only examples of devices and methods consistent with some aspects of the embodiments of the present application as detailed in the attached claims.
[0053] It is understood that the terms "first", "second", etc. used in this application can be used to describe various concepts in this article, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another concept. For example, without departing from the scope of the embodiment of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein can be interpreted as "at the time of" or "when" or "in response to determination".
[0054] The terms "at least one", "multiple", "each", "any", etc. used in this application, at least one includes one, two or more, multiple includes two or more, each refers to each of the corresponding multiple, and any refers to any one of the multiple.
[0055] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0056] At present, different types of smart mattress detections directly output logs through the hardware serial port, lacking unified data processing; different types of smart mattresses have different identification rules, and it is impossible to share a set of identification rules, which need to be configured according to different types of smart mattresses.
[0057] In view of this, the embodiment of the present application provides a method, device, electronic device and storage medium for motion recognition of a smart mattress. The scheme obtains the mattress monitoring data of the smart mattress and receives the user test data sent by the user front end; performs a first matching process on the mattress monitoring data and the target configuration rule to obtain a motion log data set; performs a second matching process on the action log data set and the user test data to obtain a motion recognition result; sends the motion recognition result to the user front end; so that the user front end renders the motion recognition result to obtain the target recognition result interface data, and displays the target recognition result interface data on the user front end. The embodiment of the present application performs a first matching process on the mattress monitoring data and the target configuration rule, so that the target configuration rule can adapt to different types of smart mattresses, realizes the compatibility of a set of systems with different mattresses, reduces the independent rule configuration required due to different mattress types, and improves the flexibility of rule configuration; performs a second matching process on the action log data set and the user test data, so that the user's motion can be more accurately identified and the false recognition rate can be reduced. Through the two-stage matching process, a systematic data processing flow is realized, and the efficiency and accuracy of motion recognition are improved.
[0058] The motion recognition method of the smart mattress provided in the embodiment of the present application relates to the field of data processing technology. The motion recognition method of the smart mattress provided in the embodiment of the present application can be applied to a terminal, can also be applied to a server, and can also be software running in a terminal or a server. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, and a car terminal, etc., but is not limited to this; the server side can be configured as an independent physical server, or a server cluster or distributed system composed of multiple physical servers, and can also be configured to provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network, content distribution network) and big data and artificial intelligence platforms and other basic cloud computing services. The cloud server, the server can also be a node server in the blockchain network; the software can be an application that implements the motion recognition method of the smart mattress, etc., but is not limited to the above forms.
[0059] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld devices or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs (personal computers), minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0060] See also Figure 1 , Figure 1 This is an optional step flow chart when the motion recognition method of the smart mattress provided in the embodiment of the present application is applied to the server side, and is applied to the server side. Figure 1 The method may include but is not limited to steps S101 to S104.
[0061] Step S101, obtaining mattress monitoring data of the smart mattress and receiving user test data sent by the user front end;
[0062] The server is used to receive real-time monitoring data of different types of smart mattresses, that is, the server can obtain mattress monitoring data of smart mattresses and perform data processing and data matching operations on the server. Specifically, different types of smart mattresses are connected to the computer through the serial port, and the Python (an object-oriented interpretive programming language) tool is opened on the computer to monitor the real-time data obtained by the serial port, and the real-time monitoring data is uploaded to the server through the Python tool.
[0063] As for the smart mattress, it is a high-tech mattress that integrates sensors, data processing and communication technologies, and can monitor the user's sleep status, heart rate, breathing rate, body movement and other physiological indicators, that is, the above-mentioned mattress monitoring data. Among them, the data form of the mattress monitoring data includes but is not limited to: time string, embedded log content, serial port name.
[0064] The user front end can be used to obtain user test data and send the user test data to the server, and the user front end can also render the data and visualize the data.
[0065] The user test data is the action log data of the user testing on the smart mattress, such as the log data related to the action of getting into bed on the right.
[0066] Step S101 shown in the embodiment of the present application provides a unified data basis for subsequent action recognition by acquiring mattress monitoring data of the smart mattress and user test data sent by the user front end.
[0067] Step S102, performing a first matching process on the mattress monitoring data and the target configuration rule to obtain an action log data set;
[0068] The target configuration rules are entered in advance in the background system (backend), please refer to Figure 2 , Figure 2 is a schematic diagram of an interface for entering action recognition configuration provided by an embodiment of the present application, such as Figure 2 As shown, the configuration entry interface of the background system can include six configuration items: "Device classification id (Identity document, identity identification number)", "Name", "Type (single or double)", "Matching rule", "Serial port type", and "Sorting". By entering the action recognition configuration in advance, the action corresponding to the user test can be quickly identified during action recognition. After the action recognition configuration of different smart mattress types is entered into the background system, the action recognition configuration of different smart mattress types can be displayed in the form of a table. Please refer to Figure 3 , Figure 3 is a schematic diagram of a list of action recognition configurations provided by an embodiment of the present application. Figure 3 As shown, "the device classification" may include "the main model" and "the flagship model", "the mode" may include "single mode" and "double mode", and the name may include "getting on the left side of the bed", "getting on the right side of the bed", "turning over on the left side", "turning over on the right side", "leaving the bed on the left side", "leaving the bed on the right side", "getting on the bed at the same time", "turning over at the same time", "leaving the bed at the same time", "getting on the left side of the bed", "getting on the right side of the bed", "turning over on the left", "turning over on the right", "leaving the bed on the left", and "leaving the bed on the right".
[0069] At present, in different sleeping action scenes, the related art only has the following actions: "getting into bed on the left", "getting into bed on the right", "turning over on the left", "turning over on the right", "leaving bed on the left", and "leaving bed on the right". In the embodiment of the present application, Figure 3 As shown, different types of smart mattresses have different configurations. In particular, the execution actions of the main smart mattress in the embodiment of the present application may include "getting into bed on the left side", "getting into bed on the right side", "turning over on the left side", "turning over on the right side", "leaving bed on the left side", "leaving bed on the right side", "getting into bed at the same time", "turning over at the same time", and "leaving bed at the same time". The embodiment of the present application introduces more execution action types, which can more comprehensively capture the actual actions of the user on the mattress, and configure matching rules for each execution action type, thereby improving the accuracy and comprehensiveness of action recognition.
[0070] In the specific implementation, after the motion recognition configuration list is added to the background system, the motion recognition configuration data will be stored in the MySQL database. The table structure in the MySQL database is as follows:
[0071] "CREATE TABLE`devi ce_ru le`(
[0072] `id`i nt(11)NOT NULL AUTO_I NCREMENT COMMENT'ID',
[0073] `cat_id`i nt(11)DEFAULT NULL COMMENT'Device category id',
[0074] `type`i nt(1)DEFAULT'1'COMMENT'Type 1 Single 2 Double',
[0075] `key`varchar(255)DEFAULT NULL COMMENT'name',
[0076] `rule`varchar(255)DEFAULT NULL COMMENT'matching rule',
[0077] `ru l e_list`varchar(255)DEFAULT NULL COMMENT'Combined matching rules',
[0078] `sort` int(255) DEFAULT'1' COMMENT'sort',
[0079] `chuankou_type`i nt(1)DEFAULT'1'COMMENT'Serial port type 1 is master 2 is slave 3 includes both',
[0080] `ct ime`i nt(11)DEFAULT NULL COMMENT'creation time',
[0081] PRI MARY KEY(`id`)
[0082] )ENG I NE = InnoDB AUTO_I NCREMENT = 16 DEFAULT CHARSET = utf8 COMMENT = 'Device rules'".
[0083] After the action configuration list is added to the MySQL database, the user front end can render different content based on the action recognition configuration data. Figures 4 to 5 , Figure 4 is a schematic diagram of a data collection interface of a first device type provided in an embodiment of the present application, Figure 5 Schematic diagram of the data collection interface of the second device type provided in the embodiment of the present application. Figure 4 and Figure 5 As shown in FIG. 1 , selecting different types of smart mattresses can display different button combinations for identifying actions. Specifically, Figure 4 As shown, when the device type is "main model", nine action combinations can be included: "getting into bed on the left side", "getting into bed on the right side", "turning over on the left side", "turning over on the right side", "leaving bed on the left side", "leaving bed on the right side", "getting into bed at the same time", "turning over at the same time", and "leaving bed at the same time"; Figure 5 As shown in the figure, when the device type is "Flagship", it can include six action combinations: "Get on the bed on the left", "Get on the bed on the right", "Turn over on the left", "Turn over on the right", "Leave the bed on the left", and "Leave the bed on the right". Figure 4 and Figure 5 As shown in the figure, after selecting different action types to execute the test, corresponding log data will be generated, such as Figure 4 The log data in "A:*******......" and Figure 5The log data "a:*******......" in the action test log data is saved after the action execution test, which can be used for subsequent data matching to obtain the action recognition result.
[0084] Among them, the mattress monitoring data includes several log monitoring data.
[0085] In some embodiments, step S102 may include: performing information extraction processing on the target configuration rule to obtain a number of target action character strings; integrating each target action character string to obtain a target action array; traversing and querying each log monitoring data in the mattress monitoring data according to the target action character string in the target action array, and screening out a number of log monitoring data that successfully matches the target action character string in the mattress monitoring data; marking each log monitoring data that successfully matches to obtain a number of action marking data; integrating each action marking data to obtain an action log data set.
[0086] Among them, the target configuration rule is the above Figure 2 and Figure 3 The matching rules mentioned in are set in advance.
[0087] Information extraction processing is the process of extracting and processing the target configuration rules to obtain multiple target action strings. The target action string is a unique string corresponding to each action. It can be understood that different types of smart mattresses have different execution actions with a unique special string. Whether the match is successful is confirmed by judging whether the real-time log monitoring data contains a certain string. If the real-time log monitoring data contains a special string, it is considered that the match is successful.
[0088] For the target action array, it is a string array formed by integrating all the special strings of the matching rules.
[0089] The action annotation data is the log monitoring data that successfully matches the target action string in the mattress monitoring data, and is the log data that is annotated as corresponding to a certain execution action. Among them, multiple action annotation data constitute an action log data set.
[0090] Among them, the first matching process is the process of pairing the mattress monitoring data obtained in real time with the target configuration rules. Specifically, firstly, the target configuration rules are subjected to information extraction processing to obtain multiple target action strings; then, each target action string is integrated to obtain a target action array containing multiple target action strings; then, according to the multiple target action strings in the target action array, each log monitoring data in the mattress monitoring data is traversed and queried to filter out multiple log monitoring data that successfully match the target action string in the mattress monitoring data, that is, each target action string in the target action array is matched with each log monitoring data in the mattress monitoring data to obtain matching consistent data; then, each successfully matched log monitoring data is annotated to obtain multiple action annotated data; finally, each action annotated data is integrated to obtain an action log data set.
[0091] Step S102 shown in the embodiment of the present application performs a first matching process on the mattress monitoring data and the target configuration rules so that the target configuration rules can adapt to different types of smart mattresses, thereby achieving compatibility of a set of systems with different mattresses and reducing the independent rule configuration required due to different mattress types.
[0092] Step S103, performing a second matching process on the action log data set and the user test data to obtain an action recognition result;
[0093] In some embodiments, step S103 may include: traversing and querying each action annotation data in the action log data set according to the user test data, filtering out the action annotation data in the action log data set that successfully matches the user test data, and using the successfully matched action annotation data as the action recognition result.
[0094] The second matching process is a process of matching each action annotation data in the action log data set with the user test data.
[0095] Step S103 shown in the embodiment of the present application can more accurately identify the user's actions by performing a second matching process on the action log data set and the user test data, thereby reducing the misrecognition rate and improving the recognition accuracy.
[0096] In some embodiments, after step S103, the method may further include: generating performance indicator log data based on the action recognition result; and analyzing and processing the performance indicator log data to obtain target performance indicator information.
[0097] The performance indicator log data may include but is not limited to: the time difference between the real-time data and the user's test action. The time difference between the real-time data and the user's test action is the most important indicator for testing a smart mattress, which includes the response speed of the smart mattress to human body motion recognition, the accuracy of motion recognition, etc. The target performance indicator information can be obtained by analyzing and processing the performance indicator log data. The target performance indicator information is used to evaluate the motion recognition performance of the smart mattress. The target performance indicator information can be the time difference between the real-time data and the user's test action contained in the performance indicator log data.
[0098] Step S104, sending the action recognition result to the user front end; so that the user front end renders the action recognition result to obtain target recognition result interface data, and displays the target recognition result interface data on the user front end.
[0099] Rendering refers to the process of converting the data structure in a computer program (such as action recognition results) into a visual representation such as graphics, images or videos. For the specific implementation of rendering, reference can be made to the implementation principle of relevant visual interface rendering, and the embodiments of this application will not be repeated here.
[0100] Among them, the target recognition result interface data is a data set that is rendered and ready to be displayed on the user front end. These data sets contain all the necessary information so that the user front end can build an intuitive and easy-to-understand interface to display the action recognition results. This data may include but is not limited to: action type, timestamp, statistics, and visualization elements.
[0101] Step S104 shown in the embodiment of the present application provides an intuitive user interface by sending the motion recognition results to the user front end and rendering and displaying them through the user front end, thereby enhancing the user experience and enabling the user to more easily understand and utilize the motion recognition results.
[0102] Steps S101 to S104 shown in the embodiment of the present application are to obtain the mattress monitoring data of the smart mattress and receive the user test data sent by the user front end; perform a first matching process on the mattress monitoring data and the target configuration rules to obtain an action log data set; perform a second matching process on the action log data set and the user test data to obtain an action recognition result; send the action recognition result to the user front end; so that the user front end renders the action recognition result to obtain the target recognition result interface data, and displays the target recognition result interface data on the user front end. The embodiment of the present application performs a first matching process on the mattress monitoring data and the target configuration rules, so that the target configuration rules can adapt to different types of smart mattresses, realizes the compatibility of a set of systems with different mattresses, reduces the independent rule configuration required due to different mattress types, and improves the flexibility of the rule configuration; performs a second matching process on the action log data set and the user test data, so that the user's actions can be more accurately identified and the misrecognition rate can be reduced. Through the two-stage matching process, a systematic data processing flow is realized, and the efficiency and accuracy of action recognition are improved.
[0103] See also Figure 6 , Figure 6 This is an optional step flow chart of the action recognition method of the smart mattress provided by the embodiment of the present application when it is applied to the user front end. Figure 6 The method may include but is not limited to steps S601 to S602.
[0104] Step S601, receiving the action recognition result sent by the server;
[0105] Among them, the action recognition results are based on Figure 1 The motion recognition method of the smart mattress is determined. Specifically, in the server side, each motion annotation data in the motion log data set is traversed and queried according to the user test data, and the motion annotation data that successfully matches the user test data in the motion log data set is screened out, and the successfully matched motion annotation data is the motion recognition result.
[0106] In step S601 shown in the embodiment of the present application, the user front end can receive the action recognition result processed by the server in real time, ensuring that the user can obtain the latest monitoring information.
[0107] Step S602, rendering the action recognition result to obtain target recognition result interface data, and displaying the target recognition result interface data through a visual interface;
[0108] Rendering refers to the process of converting the data structure in a computer program (such as action recognition results) into a visual representation such as graphics, images or videos. For the specific implementation of rendering, reference can be made to the implementation principle of relevant visual interface rendering, and the embodiments of this application will not be repeated here.
[0109] Among them, the visual interface refers to the theory, method and technology of using computer graphics and image processing technology to convert data into graphics or images and display them on the screen, and perform interactive processing. This process not only involves the visual presentation of data, but also covers multiple design elements such as the layout, color, font, and icon of the interface, aiming to enhance the user's interactive experience with the digital world. In this regard, the embodiments of this application will not be elaborated here.
[0110] Among them, the target recognition result interface data is a data set that is rendered and ready to be displayed on the user front end. These data sets contain all the necessary information so that the user front end can build an intuitive and easy-to-understand interface to display the action recognition results. This data may include but is not limited to: action type, timestamp, statistics, and visualization elements.
[0111] Step S602 shown in the embodiment of the present application converts the action recognition result into easy-to-understand interface data through rendering processing, thereby improving the user's interactive experience.
[0112] In some embodiments, it may also include: obtaining action recognition configuration data; wherein the action recognition configuration data includes target configuration rules; rendering the action recognition configuration data to obtain target configuration interface data, and displaying the target configuration interface data through a visual interface; wherein the target configuration interface data includes a smart mattress type control; in response to a selection instruction for the smart mattress type control, obtaining target action interface data corresponding to the smart mattress type control, and displaying the target action interface data through a visual interface; the target action interface data includes an action recognition button; in response to a click instruction for the action recognition button, requesting the smart mattress to trigger the smart mattress test mechanism to obtain user test data, and sending the user test data to the server.
[0113] Among them, the action recognition configuration data is the above Figure 2 The data entered, such as Figure 3 As shown, the action recognition configuration data includes target configuration rules.
[0114] For the visual interface, it can be used to display the target configuration interface data and the target action interface data. Among them, the target configuration interface data includes the smart mattress type control, such as Figure 4 and Figure 5As shown in the figure, the device type can be selected into two types: main type and flagship type. The smart mattress type control is a device type selection control. Among them, the target action interface data includes an action recognition button, such as Figure 4 and Figure 5 As shown, the action recognition buttons may include buttons such as “Get on the left side of the bed”, “Get on the right side of the bed”, “Turn over on the left side”, “Turn over on the right side”, “Leave the bed on the left side”, “Leave the bed on the right side”, “Get on the bed at the same time”, “Turn over at the same time”, “Leave the bed at the same time”, “Get on the left side of the bed”, “Get on the right side of the bed”, “Turn over on the left side”, “Turn over on the right side”, “Leave the bed on the left side”, and “Leave the bed on the right side”.
[0115] In a specific implementation, the action recognition configuration data is first obtained; then the action recognition configuration data is rendered to obtain target configuration interface data, and the target configuration interface data is displayed through a visual interface; then, in response to a selection instruction for a smart mattress type control, the target action interface data corresponding to the smart mattress type control is obtained, and the target action interface data is displayed through a visual interface; finally, in response to a click instruction for an action recognition button, a request is made to the smart mattress to trigger a smart mattress test mechanism to obtain user test data, and the user test data is sent to the server.
[0116] In steps S601 to S602 shown in the embodiment of the present application, the user front end can receive the action recognition results processed by the server in real time, ensuring that the user can obtain the latest monitoring information; the action recognition results are converted into easy-to-understand interface data through rendering processing, thereby improving the user's interactive experience.
[0117] In order to explain the principle of the technical solution of the present invention in detail, the overall process of the present invention is described below in combination with some specific embodiments. It is easy to understand that the following is an explanation of the technical principle of the present invention and cannot be regarded as a limitation of the present invention.
[0118] See also Figure 7 , Figure 7 is a flow chart of the motion recognition method of the smart mattress provided in the embodiment of the present application; Figure 7 As shown, the motion recognition process of the smart mattress is as follows:
[0119] On the one hand, first, the motion recognition configuration data of different smart mattress types are entered in advance in the background system (backend). After the motion recognition configuration data of different smart mattress types are entered in the background system, the motion recognition configuration data will be stored in the MySQL database. Then, the user front end can render the content corresponding to the different smart mattress types according to the motion recognition configuration data and display it on the visual interface. Next, the user front end can select different types of smart mattresses on the visual interface, so that the motion recognition button combination corresponding to the smart mattress type is displayed on the visual interface of the user front end; finally, the user can test according to the selected motion recognition button combination to obtain user test data. The user front end also collects the user test data and uploads the collected user test data to the server.
[0120] At the same time, on the other hand, different types of smart mattresses are connected to the computer through the serial port. The Python tool is opened on the computer to listen to the serial port to obtain the real-time monitoring data of the smart mattress, and the real-time monitoring data is uploaded to the server through the Python tool; then, the server obtains all the configuration rules in the MySQL database; then, the unique special strings corresponding to all the configuration rules are matched with each real-time monitoring data of the smart mattress in a loop. If the unique special string corresponding to a configuration rule successfully matches a certain real-time monitoring data, the real-time monitoring data that successfully matches is labeled, and the labeled real-time monitoring data is regarded as the data of a certain action, and a loop is jumped out, until each matching rule is matched with each real-time monitoring data and the loop is ended, thereby obtaining an action log data set.
[0121] Finally, the user test data uploaded by the user front end to the server is matched with the large action log data set matched and processed by the server to detect whether a certain action is executed normally and the time required for the execution. If the user test data matches the action log data set successfully, the result of the successful match is output and the result of the successful match is returned to the visual interface of the user front end. At the same time, if the user test data matches the action log data set successfully, a log record will be formed. The most important thing in the log record is the time difference between the real-time data time and the user test action. The time difference is the most important indicator for testing smart mattresses. This indicator includes the response speed of the smart mattress to the human body's action recognition, the accuracy of action recognition, etc.
[0122] It can be understood that the overall process of the motion recognition method of the smart mattress provided in the embodiment of the present application is: different types of smart mattresses are connected to the computer side through the serial port, and the Python tool is opened in the computer side to listen to the serial port to obtain the real-time monitoring data of the smart mattress, and the real-time monitoring data is uploaded to the server through the Python tool; at the same time, the log data of the user's test action is pushed to the server by clicking a button in a Web page interface; finally, the action annotation data obtained after the server processes the real-time monitoring data is matched with the log data of the user's test action. If the action annotation data matches the log data of the user's test action successfully, the successful matching result is returned to the user interface (Web page interface).
[0123] It should be pointed out that this embodiment only briefly illustrates the general process of the motion recognition method of the smart mattress. The detailed description of each step can refer to the relevant content in the aforementioned embodiment and will not be repeated here. It can be understood that the present invention is not limited to this.
[0124] The embodiment of the present application obtains the mattress monitoring data of the smart mattress and receives the user test data sent by the user front end; performs a first matching process on the mattress monitoring data and the target configuration rules to obtain an action log data set; performs a second matching process on the action log data set and the user test data to obtain an action recognition result; sends the action recognition result to the user front end; so that the user front end renders the action recognition result to obtain the target recognition result interface data, and displays the target recognition result interface data on the user front end. The embodiment of the present application performs a first matching process on the mattress monitoring data and the target configuration rules, so that the target configuration rules can adapt to different types of smart mattresses, realizes the compatibility of a set of systems with different mattresses, reduces the independent rule configuration required due to different mattress types, and improves the flexibility of rule configuration; performs a second matching process on the action log data set and the user test data, so that the user's actions can be more accurately identified and the false recognition rate can be reduced. Through the two-stage matching process, a systematic data processing flow is realized, and the efficiency and accuracy of action recognition are improved.
[0125] In summary, the motion recognition method for the smart mattress provided in the embodiment of the present application can realize the reuse of motion recognition, realize unified configuration management, reduce the errors caused by manual judgment, make the detection more intelligent and systematic, and facilitate testing and maintenance.
[0126] The present application also provides a motion recognition device for a smart mattress. Figure 8 , Figure 8 800 is a schematic diagram of the structure of the motion recognition device of the smart mattress provided in the embodiment of the present application when applied to the server side. The device 800 includes the following modules:
[0127] The data acquisition module 801 is used to acquire the mattress monitoring data of the smart mattress and receive the user test data sent by the user front end;
[0128] A first matching processing module 802 is used to perform a first matching process on the mattress monitoring data and the target configuration rule to obtain an action log data set;
[0129] A second matching processing module 803 is used to perform a second matching process on the action log data set and the user test data to obtain an action recognition result;
[0130] The action recognition result sending module 804 is used to send the action recognition result to the user front end; so that the user front end renders the action recognition result, obtains the target recognition result interface data, and displays the target recognition result interface data on the user front end.
[0131] The present application also provides a motion recognition device for a smart mattress. Fig. 9 , Fig. 9 900 is a schematic diagram of the structure of the motion recognition device of the smart mattress provided in the embodiment of the present application when it is applied to the user front end. The device 900 includes the following modules:
[0132] The action recognition result receiving module 901 is used to receive the action recognition result sent by the server;
[0133] A visualization interface display module 902 is used to render the action recognition result to obtain target recognition result interface data, and display the target recognition result interface data through a visualization interface;
[0134] The action recognition result is based on Figure 8 The motion recognition device of the smart mattress is determined.
[0135] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0136] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above-mentioned motion recognition method of the smart mattress when executing the computer program. The electronic device can be any smart terminal including a tablet computer, a car computer, etc.
[0137] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0138] See also Fig.10 , Fig.10 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:
[0139] The processor 1001 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application.
[0140] The memory 1002 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1002 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 1002, and the processor 1001 calls and executes the motion recognition method of the smart mattress in the embodiment of this application;
[0141] Input / output interface 1003, used to implement information input and output;
[0142] The communication interface 1004 is used to realize the communication interaction between the device and other devices. The communication can be realized through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WI FI, Bluetooth, etc.);
[0143] A bus 1005 , which transmits information between various components of the device (e.g., the processor 1001 , the memory 1002 , the input / output interface 1003 , and the communication interface 1004 );
[0144] The processor 1001 , the memory 1002 , the input / output interface 1003 and the communication interface 1004 are connected to each other in communication within the device via the bus 1005 .
[0145] The embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the motion recognition method of the smart mattress is implemented.
[0146] It can be understood that the contents of the above method embodiments are all applicable to the present storage medium embodiments, the functions specifically implemented by the present storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0147] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0148] The motion recognition method, motion recognition device, electronic device and storage medium of the smart mattress provided in the embodiment of the present application obtain the mattress monitoring data of the smart mattress and receive the user test data sent by the user front end; the mattress monitoring data and the target configuration rule are matched for the first time to obtain the motion log data set; the motion log data set and the user test data are matched for the second time to obtain the motion recognition result; the motion recognition result is sent to the user front end; so that the user front end renders the motion recognition result to obtain the target recognition result interface data, and displays the target recognition result interface data on the user front end. The embodiment of the present application performs a first matching process on the mattress monitoring data and the target configuration rule, so that the target configuration rule can adapt to different types of smart mattresses, realizes the compatibility of a set of systems with different mattresses, reduces the independent rule configuration required due to different mattress types, and improves the flexibility of the rule configuration; the action log data set and the user test data are matched for the second time, so that the user's action can be more accurately identified and the false recognition rate can be reduced. Through the two-stage matching process, a systematic data processing flow is realized, and the efficiency and accuracy of motion recognition are improved.
[0149] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0150] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0151] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0152] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0153] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0154] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0155] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0156] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0157] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0158] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.
[0159] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. A motion recognition method for a smart mattress, characterized in that: Applied to the server side, the method comprises the following steps: Obtain mattress monitoring data of the smart mattress and receive user test data sent by the user front end; Performing a first matching process on the mattress monitoring data and the target configuration rule to obtain an action log data set; Performing a second matching process on the action log data set and the user test data to obtain an action recognition result; The action recognition result is sent to the user front end; so that the user front end renders the action recognition result to obtain target recognition result interface data, and displays the target recognition result interface data on the user front end.
2. The method according to claim 1, characterized in that: The mattress monitoring data includes a plurality of log monitoring data, and the mattress monitoring data and the target configuration rule are first matched to obtain an action log data set, including: Performing information extraction processing on the target configuration rule to obtain a number of target action character strings; Integrate each of the target action character strings to obtain a target action array; According to the target action string in the target action array, traverse and query each of the log monitoring data in the mattress monitoring data, and filter out a number of log monitoring data in the mattress monitoring data that successfully matches the target action string; Annotate each of the successfully matched log monitoring data to obtain a number of action annotation data; The action annotation data are integrated to obtain the action log data set.
3. The method according to claim 1, characterized in that The performing a second matching process on the action log data set and the user test data to obtain an action recognition result includes: The various action annotation data in the action log data set are traversed and queried according to the user test data, the action annotation data in the action log data set that successfully matches the user test data is screened out, and the successfully matched action annotation data is used as the action recognition result.
4. The method according to claim 1, characterized in that: After performing a second matching process on the action log data set and the user test data to obtain an action recognition result, the method further includes: Generate performance indicator log data based on the action recognition result; The performance indicator log data is analyzed and processed to obtain target performance indicator information; the target performance indicator information is used to evaluate the motion recognition performance of the smart mattress.
5. The motion recognition method of the smart mattress is characterized by: Applied to the user front end, the method comprises the following steps: Receive the action recognition results sent by the server; Rendering the action recognition result to obtain target recognition result interface data, and displaying the target recognition result interface data through a visual interface; Wherein, the motion recognition result is determined according to the motion recognition method of the smart mattress according to any one of claims 1-4.
6. The method according to claim 5, characterized in that The method further comprises: Acquire motion recognition configuration data; wherein the motion recognition configuration data includes target configuration rules; Rendering the motion recognition configuration data to obtain target configuration interface data, and displaying the target configuration interface data through a visual interface; wherein the target configuration interface data includes a smart mattress type control; In response to a selection instruction for the smart mattress type control, target action interface data corresponding to the smart mattress type control is obtained, and the target action interface data is displayed through a visual interface; the target action interface data includes an action recognition button; In response to a click instruction on the action recognition button, a request is made to the smart mattress to trigger a smart mattress test mechanism to obtain user test data, and the user test data is sent to a server.
7. A motion recognition device for a smart mattress, characterized in that: Applied to the server side, the device includes the following modules: A data acquisition module is used to obtain mattress monitoring data of the smart mattress and receive user test data sent by the user front end; A first matching processing module, used for performing a first matching process on the mattress monitoring data and the target configuration rule to obtain an action log data set; A second matching processing module, used for performing a second matching process on the action log data set and the user test data to obtain an action recognition result; The action recognition result sending module is used to send the action recognition result to the user front end; so that the user front end renders the action recognition result, obtains the target recognition result interface data, and displays the target recognition result interface data on the user front end.
8. A motion recognition device for a smart mattress, characterized in that: Applied to the user front end, the device includes the following modules: The action recognition result receiving module is used to receive the action recognition result sent by the server; A visualization interface display module is used to render the action recognition result to obtain target recognition result interface data, and display the target recognition result interface data through a visualization interface; Wherein, the motion recognition result is determined according to the motion recognition device of the smart mattress described in claim 7.
9. An electronic device, characterized in that: The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.