Human factor data storage method and analysis method, electronic equipment and storage medium

By adopting human data files in predetermined data formats in human data storage, the problems of human data storage and processing efficiency and security in the prior art are solved, and efficient and secure data storage and analysis are achieved.

CN120072163APending Publication Date: 2025-05-30KINGFAR INTERNATIONAL INC
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411515397.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-28
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

The prior art has efficiency and security problems in the storage and processing of human-related data, especially in the storage and complex queries of massive data.

Method used

A method for storing human data is proposed. By obtaining data packets from sensors, the human data is stored in a human data file in a predetermined data format. The file format includes a file header and a data body. The file header includes a frame header, a length value and a verification value, and the verification is performed based on a predetermined verification algorithm to ensure data security.

Benefits of technology

It realizes efficient data storage and access, ensures data security, and adapts to diverse human data, improving the efficiency and security of data storage and parsing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120072163A_ABST
    Figure CN120072163A_ABST
Patent Text Reader

Abstract

The invention provides a human factor data storage method and analysis method, electronic equipment and a storage medium, and the storage method comprises the steps: obtaining a data packet from a sensor, the data packet containing human factor data; the human factor data is stored in a human factor data file in a preset data format, the preset data format is provided with a file header and a data body, the file header comprises a frame header, a length value and a check value, and the human factor data from the sensor is stored in the data body; the verification value in the file header is obtained based on a predetermined verification algorithm. According to the human factor data storage method, data integrity can be kept, high data storage efficiency is achieved, and correspondingly, the analysis method has high analysis efficiency. And the data security can be further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of human factors engineering and ergonomics, and particularly to a method for storing and parsing human factor data, an electronic device, and a storage medium. Background Art

[0002] Human factors engineering and ergonomics mainly study the relationship among humans, machines, and the environment. It comprehensively uses physiology, psychology, hygiene, and anthropometry to study the interaction between humans and other elements of the system, and is attracting increasing attention. According to factors such as human psychology, physiology, and body structure, it studies the reasonable relationship among humans, machines, and the environment to ensure that people work safely, healthily, and comfortably and achieve satisfactory work results. Therefore, it is playing an increasingly important role in improving people's physical and mental health, work efficiency, safety, and comfort. In human factors engineering, the data of the human body, machine, human-machine interaction, environment, etc. collected during the analysis of human behavior, cognition, and operation processes can be called human factor data. The instrument equipment for collecting human factor data can include various types of sensing devices or other measurement devices to collect various physiological data, psychological data, and behavioral data, etc. Human factor data is widely involved in various application fields such as health, medical care, and intelligent driving. The storage, processing, complex query, and data security of massive human factor data have become increasingly important. Therefore, how to design a new data storage method, especially suitable for the data storage of human factor data and the corresponding parsing method, to improve the efficiency of data storage and access has become an urgent problem to be solved. Summary of the Invention

[0003] In view of this, embodiments of the present invention provide a method for storing human factor data, a method for parsing human factor data, and an electronic device to eliminate or improve one or more defects existing in the prior art.

[0004] One aspect of the present invention provides a method for storing human factor data, and the method includes the following steps:

[0005] Obtain a data packet from a sensor, where the data packet contains human factor data;

[0006] Store the human factor data in a human factor data file in a predetermined data format, where the predetermined data format has a file header and a data body, the file header includes a frame header, a length value, and a check value, and the human factor data from the sensor is stored in the data body, and the check value in the file header is obtained based on a predetermined check algorithm.

[0007] In some embodiments of the present invention, the file header further includes a file header payload, and the file header payload includes a sensor description field for representing sensor characteristics; the length value in the file header is the length value of the file header payload.

[0008] In some embodiments of the present invention, the method further includes: before storing for the first time a data packet containing human factor data from a sensor, receiving a message containing a sensor description field from the sensor, and generating a file header of the human factor data file based on the received message.

[0009] In some embodiments of the present invention, generating the file header of the human factor data file based on the received message includes: using the message body containing the sensor description field from the sensor as the file header, the message body including a frame header, a length value, a check value, and a payload, the payload including a plurality of sensor description fields; or obtaining a plurality of sensor description fields from the message containing the sensor description field from the sensor, filling the frame header of the file header, and filling the length value, the check value, and the payload in the file header based on the plurality of sensor description fields to obtain the file header.

[0010] In some embodiments of the present invention, the data packet includes a packet header part and a payload part, the packet header part includes a frame header, a payload length value, and a check value, and the payload part of the data packet includes human factor data.

[0011] In some embodiments of the present invention, storing the human factor data in a human factor data file in a predetermined data format includes: storing the data packet from the sensor completely in the data body of the human factor data file, the data body containing one or more data packets.

[0012] In some embodiments of the present invention, storing the human factor data in a human factor data file in a predetermined data format includes: verifying the obtained data packet based on a predetermined data packet verification algorithm and the check value in the data packet, and obtaining the human factor data in the data packet after successful verification; and storing the obtained human factor data in the data body of the human factor data file.

[0013] In some embodiments of the present invention, the sensor description field includes some or all of the following fields: sensor ID, sensor type, sensor name suffix, and data packet reporting frequency.

[0014] In some embodiments of the present invention, the data packet is a data packet containing human factor data from a human factor data acquisition sensor; the human factor data file is stored based on hexadecimal.

[0015] Another aspect of the present invention further provides a method for parsing human factor data, where the human factor data is stored in a human factor data file in a predetermined format. The predetermined data format has a file header and a data body. The file header includes a frame header, a length value, and a check value. The data body includes human factor data. The method includes: a file header parsing step: verifying the human factor data file header based on a predetermined check algorithm and the check value in the file header, and reading out the information in the file header after successful verification; and a human factor data parsing step: after successful verification of the file header, reading the human factor data in the data body.

[0016] In some embodiments of the present invention, before obtaining the data packet from the sensor, an operation start instruction is sent to the sensor to instruct the sensor to send a data packet containing human factor data.

[0017] In some embodiments of the present invention, the message containing the sensor description field from the sensor is received based on the following interaction process: sending an initialization message to the sensor and receiving an initialization message from the sensor. The initialization message includes a frame header field, a payload length field, a check field, and a message body part. The message body part includes a message type and sensor initialization information including the number of attached sensors, the sensor system type, and grouping information; and based on the received initialization message from the sensor, sending a scan command message to the sensor. The scan command message includes a frame header field, a payload length field, a check field, and a message body part. The message body part includes a message type and a plurality of sensor description fields. The plurality of sensor description fields include some or all of the following fields: sensor ID, sensor type, sensor name suffix, and data packet reporting frequency.

[0018] Another aspect of the present invention provides a method for parsing human factor data, where the human factor data is stored in a human factor data file in a predetermined format. The predetermined data format has a file header and a data body. The file header includes a frame header, a length value, and a check value. The data body includes human factor data. The method includes: a file header parsing step: verifying the human factor data file header based on a predetermined check algorithm and the check value in the file header, and reading out the information in the file header after successful verification; and a data body parsing step: after successful verification of the file header, reading the human factor data in the data body.

[0019] In some embodiments of the present invention, the data body includes at least one data packet containing human factor data. The data packet containing human factor data includes a packet header and a payload. The packet header includes a frame header, a payload length value, and a check value. The payload of the data packet includes human factor data. The step of parsing the human factor data includes: verifying the data packets in the data body based on a pre-determined data packet verification algorithm and the check value in the data packet, and reading the human factor data in the data packet after successful verification.

[0020] In some embodiments of the present invention, the file header further includes a file header payload, and the file header payload includes a sensor description field. The method further includes displaying the information in the read file header and the human factor data in the data body on a display device.

[0021] Another aspect of the present invention provides an electronic device, which includes a processor, a memory, and computer instructions stored on the memory. The processor is used to execute the computer instructions, and when the computer instructions are executed, the device implements the steps of the method described above.

[0022] Another aspect of the present invention further provides a computer-readable storage medium, in which computer instructions are stored, and when the computer instructions are executed by a processor, the steps of the method described above are implemented.

[0023] The method for storing human factor data and the corresponding electronic device of the present invention ensure high data storage efficiency and high data security, and can adapt to diverse human factor data. Correspondingly, the method for parsing human factor data of the present invention has high parsing efficiency and security, and is easy to access.

[0024] The additional advantages, objects, and features of the present invention will be partially described below, and will become partially apparent to those of ordinary skill in the art after studying the following text, or can be learned from the practice of the present invention. The objects and other advantages of the present invention can be achieved and obtained by the structure specifically pointed out in the specification and the drawings.

[0025] Those skilled in the art will understand that the objects and advantages that can be achieved by the present invention are not limited to the above specifically described, and the above and other objects that the present invention can achieve will be more clearly understood according to the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The drawings described herein are used to provide a further understanding of the present invention, form a part of this application, and do not limit the present invention.

[0027] Figure 1 It is a schematic flowchart of the method for storing human factor data in an embodiment of the present invention.

[0028] Figure 2 An example of the data packet structure provided by an embodiment of the present invention.

[0029] Figure 3 A schematic diagram of the human factor data storage process in an embodiment of the present invention.

[0030] Figure 4 A schematic diagram of the human factor data storage process in another embodiment of the present invention.

[0031] Figure 5 A schematic diagram of the human factor data storage process in yet another embodiment of the present invention.

[0032] Figure 6 An example of the structure of the data body in the human factor data file in an embodiment of the present invention.

[0033] Figure 7 A schematic flowchart of the human factor data parsing method in an embodiment of the present invention.

[0034] Figure 8 A schematic diagram of the human factor data parsing process in an embodiment of the present invention.

[0035] Figure 9 A schematic diagram of the human factor data parsing process in another embodiment of the present invention.

[0036] Figure 10 A schematic diagram of the structure of the CmdInfo message body transmitted in an embodiment of the present invention.

[0037] Figure 11 A schematic diagram of the structure of the CmdScan message body transmitted in an embodiment of the present invention.

[0038] Figure 12 A schematic diagram of the structure of the CmdStart message body transmitted in an embodiment of the present invention. Detailed implementation manners

[0039] To make the objectives, technical solutions and advantages of the present invention clearer and more understandable, the present invention will be further described in detail below in conjunction with the implementation manners and the accompanying drawings. Herein, the illustrative implementation manners of the present invention and their descriptions are used to explain the present invention, but do not limit the present invention.

[0040] Herein, it should also be noted that in order to avoid obscuring the present invention due to unnecessary details, only the structures and / or processing steps closely related to the solution of the present invention are shown in the drawings, while other details less related to the present invention are omitted.

[0041] It should be emphasized that the term "comprising / including", as used herein, refers to the presence of features, elements, steps or components, but does not exclude the presence or addition of one or more other features, elements, steps or components.

[0042] In view of the problems of efficiency and security in the existing data storage format for human factor data storage and subsequent parsing, etc., the present invention proposes a new human factor data storage method and a corresponding human factor data parsing method. The human factor data includes human body-related data, machine-related data, human-machine interaction-related data, and environment-related data. The human body-related data includes, but is not limited to, one or a combination of the following: skin galvanic skin temperature data, pulse data, blood pressure data, blood oxygen data, electrocardiogram data, electromyogram data, muscle oxygen data, respiration data, biomechanical data, near-infrared brain imaging data, electroencephalogram data, transcranial stimulation data, heart rate variability data, heart rate data, image / video data, sound data, eye movement data, gesture or motion data. The machine-related data includes, but is not limited to, one or a combination of the following: machine operation data, fault alarm data, machine control data, machine model data, machine communication data, machine positioning data. The human-machine interaction-related data includes, but is not limited to, one or a combination of the following: human-machine voice interaction data, human-machine text interaction data, human-machine touch interaction data, human-machine gesture or motion interaction data, human-machine electroencephalogram interaction data, human-machine eye movement interaction data, human-machine facial expression interaction data. The environment-related data includes, but is not limited to, one or a combination of the following: location data, humidity data, temperature data, chromaticity data, brightness data, weather data, road condition data, traffic data, stimulus signal data, event or signal marking data. These data can be obtained through a sensing device that supports the acquisition of corresponding types of data or other types of measurement devices. For the sake of convenience of expression, the present invention refers to the human factor data acquisition and acquisition device as a "sensor".

[0043] Figure 1 The following shows a schematic flow chart of the human factor data storage method in an embodiment of the present invention. This method can be executed by a storage device (such as a computer, a mobile phone or other dedicated handheld terminals, etc.) that interacts with the sensor and receives sensor data. Below, the storage device will be described as an example of a mobile phone, but the storage device of the present invention is not limited to a mobile phone and can also be other terminals that interact with the sensor and have a data storage function. The way the storage device communicates with the sensor can be direct communication with the sensor or communication with multiple sensors through a hub (hub), etc. After the storage program of the mobile phone receives a data packet from the sensor, it can execute the human factor data storage method of the present invention. As Figure 1 shown, the human factor data storage method includes the following steps:

[0044] Step S110, obtain a data packet from the sensor, and the data packet contains human factor data.

[0045] In an embodiment of the present invention, sensing data of various types of sensors can be obtained, that is, sensing data of various types of sensors capable of obtaining human factor data. The sensing data of each sensor can be included in a data packet or divided into multiple data packets and transmitted to a mobile phone for storage by the mobile phone. Examples of sensor types may include pressure sensors, acceleration sensors, gyroscope sensors, electrocardiogram sensors, electromyogram sensors, angular velocity sensors, pulse sensors, etc., but the present invention is not limited thereto. A sensor can also collect different types of sensing signals through multiple channels to obtain multiple types of sensing data. For example, attitude data and temperature data can be obtained simultaneously, etc.

[0046] Step S120, storing the human factor data in a human factor data file in a predetermined data format, where the predetermined data format has a file header and a data body, the file header includes a frame header, a length value, and a check value, and the human factor data from the sensor is stored in the data body.

[0047] In some other embodiments of the present invention, the frame header in the file header is, for example, a value identifying the sensor type or the sensed data type such as a sensor ID or a sensed data type, but the present invention is not limited thereto. The check value in the file header is obtained based on a predetermined check algorithm, and the predetermined check algorithm can be an exclusive OR check algorithm or other existing check algorithms. For example, when the check algorithm is an exclusive OR check algorithm, the check information used for the check operation can also be determined in advance. Since the check algorithm itself is a mature technology, it will not be elaborated here. The length value in the file header can represent the length value of the payload in the file header, or it can be the length value of a part or the whole of the data body in the human factor data file.

[0048] In the case where the length value in the file header represents the length value of the payload in the file header, in addition to the frame header, the length value, and the check value, the file header further includes a file header payload. The file header payload may include a sensor description field for representing sensor characteristics, where the sensor characteristics include but are not limited to the characteristics of the sensor itself and / or the characteristics of the sensor sensing data. The characteristics of the sensor itself may include, for example, some or all of the following characteristics: sensor identification characteristics (such as a sensor ID), sensor type characteristics, sensor name characteristics (such as a sensor name suffix), the group where the sensor is located, etc. The characteristics of the sensor sensing data may include, for example, some or all of the following characteristics: the type of sensed data, the data packet reporting frequency, etc. As an example, the sensor description field may include some or all of the following fields: sensor ID, sensor type, sensor name suffix, and data packet reporting frequency, but the present invention is not limited thereto. In the case where the length value in the file header represents the length value of the file header payload, the file header payload can be quickly read during data parsing based on this length value.

[0049] In some other embodiments of the present invention, when the file header includes a file header payload part, the length value of the file header payload can be a predetermined fixed length. In this case, the length value in the file header can be the overall length of the data body in the file.

[0050] In an alternative embodiment of the present invention, the file header may not contain a payload. The sensor description field for representing sensor characteristics can be stored as a payload in the data body of the file when the first human factor data is stored. In this case, the length value in the file header preferably only represents the length of the sensor description field in the data body, and of course, it can also represent the overall length of the data body in the file.

[0051] In some embodiments of the present invention, the file header can be generated when the first data packet containing human factor data from the sensor is received and data storage is to be performed, or it can be generated in advance before the data packet containing human factor data is received. The file header part can be generated and stored only once, and there is no need to change during subsequent storage processes, or only the length value field in the file header is updated when the length value field in the file header should be updated. The data body of the human factor data file is usually stored multiple times. After each data packet containing human factor data from the corresponding sensor is received, the entire data packet or the human factor data therein is sequentially stored into the data body.

[0052] In some embodiments of the present invention, after each data packet from the sensor is received, a storage device such as a mobile phone can store the received complete data packet in the data body part of the human factor data file, or extract (read) the human factor data in the data packet, and then store the read human factor data in the data body of the human factor data file.

[0053] The present invention ensures data storage efficiency and data security by storing human factor data in a human factor data file with a predetermined data format. The predetermined data format has a file header and a data body. Since the file header includes a check value, data security can be ensured. The human factor data from the same sensor can be stored in the data body of the same human factor data file, which has high data storage efficiency.

[0054] In addition, in a preferred embodiment of the present invention, the human factor data file is stored in hexadecimal, which can further improve data storage efficiency compared with the binary data storage format.

[0055] In some embodiments of the present invention, the file header of the human factor data file may be generated based on the sensor description fields pre-stored in the storage device before the first storage of the data packet containing human factor data from the sensor, or may be generated based on the message containing the sensor description field from the sensor before the first storage of the data packet containing human factor data from the sensor. If it is generated based on the message containing the sensor description field from the sensor, the method further includes the following steps:

[0056] Before storing the data packet containing human factor data from the sensor, receive the message containing the sensor description field from the sensor, and generate the file header of the human factor data file based on the received message. The sensor description fields used to generate the file header are preferably multiple fields representing different sensor description information, and can be obtained by receiving one or more messages containing the sensor description field from the sensor.

[0057] The data packets obtained from the sensors in the present invention can be data packets transmitted based on different data transmission protocols. Based on different data transmission protocols, the data packets can have different structures.

[0058] As an example, the data packet from the sensor is a data packet transmitted based on the data transmission protocol between the sensor and the host computer, etc. As Figure 2 shown, the data packet may include: a packet header part and a payload (data content, which can be simply referred to as payload) part. Among them, the packet header part is the part that identifies the beginning of the data packet, and it includes: a frame header field, a payload length field, and a check field. The payload length represents the length of the payload. The check value in the check field is a value calculated by a check algorithm to prevent data errors. The receiving party can check whether there are errors in the data transmission process based on the pre-negotiated check algorithm, so as to respond in time when errors are found. In an optional application example, the payload length part in the packet header can be set based on the length occupied by the actual human factor data type. Therefore, the value of the payload length is dynamically adjustable. Correspondingly, since the number of bytes occupied by the payload field corresponds to the value of the payload length, the number of bytes occupied by the data content in the payload field is also dynamically adjustable, thereby satisfying the transmission of human factor data with different payload lengths. The device that receives the human factor data can store and / or parse the human factor data by using the method provided by the present invention.

[0059] Figures 3 to 4 It is a schematic diagram of the data storage process in different embodiments of the present invention. Referring to Figures 3 - 4 , the data storage process of this embodiment is as follows:

[0060] Step S11, receive the data packet 10 containing human factor data from the sensor.

[0061] The data packet 10 includes a packet header and a payload. The packet header may include a frame header, a length value, and a check value. The payload includes human factor data. The length value in the packet header represents the length of the payload, and the payload contains human factor data of one or more channels.

[0062] Step S12: Generate a file header of a human factor data file in a predetermined data format.

[0063] Under initial conditions, both the file header and the data body of the human factor data file in the predetermined data format are empty. The file header of the human factor data file in the predetermined data format includes a frame header field, a length field, and a check field. Preferably, it also includes a payload field. Among them, the payload field includes sensor description fields for filling to represent sensor characteristics, usually multiple sensor description fields, such as sensor ID, sensor type, sensor name suffix, and data packet reporting frequency, etc. This step can directly use the data packet received from the sensor carrying sensor description information (with the sensor description field as the payload) as the file header before or after receiving the data packet containing human factor data and before storing the human factor data, or can also fill the initially empty file header based on the pre-acquired information.

[0064] More specifically, if the sensor description information is pre-stored in a storage device such as a mobile phone, or is provided to the mobile phone by the sensor through at least one interaction between the mobile phone and the sensor, this step can fill the file header by obtaining the values of each field of the file header through the obtained sensor description information to obtain the file header of the human factor data file in the predetermined data format. The frame header of the file header can be a fixed value. For example, the sensor ID can be used as the frame header. Of course, other information can also be used as the frame header. The length of the frame header in the file header can be a fixed value (such as occupying 1 byte or other values) or can be preset in advance. The check value can be obtained based on the sensor description field through a predetermined check algorithm (such as the exclusive OR algorithm). The payload can be each sensor description field, and the length value can be the payload length, that is, the length value of each sensor description field.

[0065] If the sensor description information is transmitted to the mobile phone by the sensor in a data packet at one time, the mobile phone can directly use the data packet received from the sensor carrying the sensor description information as the file header of the human factor data file. To execute this step, the mobile phone can request the sensor description information from the sensor before step S11 and receive the data packet received from the sensor carrying the sensor description information (with the sensor description field as the payload). Since the data packet includes a frame header, a length value, a check value, and a payload, in this step, the data packet with the sensor description field as the payload can be directly used as the file header of the human factor data file. At this time, the frame header, length value, check value, and payload in the file header are exactly the same as the data packet carrying the sensor description information.

[0066] The file header can be generated only once. When subsequent human factor data is stored into the data body, it is not necessary to regenerate the file header repeatedly.

[0067] In the embodiments of the present invention, in addition to fields such as the frame header, length value, check value, and payload (optional) in the file header, other fields can also be flexibly added based on the scenario, such as the sensor identification field, measurement item field, etc. The present invention is not limited thereto.

[0068] Step S13: Store the human factor data in the packet 10 containing the human factor data received in the data body.

[0069] In this step, the packet 10 containing the human factor data received can be directly stored in the data body without verifying the packet. At this time, as shown in (a) of Figure 3 and Figure 6 , the data body contains one or more packets. Alternatively, the human factor data can also be extracted from the packet containing the human factor data, and then the human factor data is stored in the data body. As shown in (b) of Figure 4 and Figure 6 , the data body only contains the human factor data in the packet, rather than the entire packet. In the case of extracting and storing the human factor data, it is necessary to first verify the packet using a predetermined verification algorithm. After successful verification, the human factor data is read based on the length value in the packet header and stored in the data body. Through verification, it can be identified whether the packet is sent incorrectly, ensuring the accuracy of data transmission. If the verification fails, it indicates that the packet is sent incorrectly, and the packet can be discarded.

[0070] As shown in Figure 5 is a more specific example of the data storage process of the present invention. As shown in Figure 5 , before the mobile phone receives a packet containing human factor data from the sensor and needs to store the human factor data, it first confirms whether the file header has been generated. If the file header has been generated, the packet containing the human factor data is directly stored in the data body; if the file header has not been generated, that is, the packet is the first packet to be stored, the file header is first generated through the following operations:

[0071] 1) Use the sensor ID as the frame header;

[0072] 2) Perform a verification calculation based on a predetermined verification algorithm to obtain the check value as the check value in the file header. For example, use the sensor ID (Sensor ID), sensor type (SensorType), sensor name suffix (SensorNameID), and packet reporting frequency (PkgsFreq) to perform the verification calculation to generate the check value in the file header;

[0073] 3) Take the currently known sensor description information, such as Sensor ID, SensorType, SensorNameID, and PkgsFreq, as the payload in the file header, and the length value is the length of these payloads.

[0074] In the above steps of forming the file header, the frame header, length value, and check value can each occupy only 1 byte. As an example, hexadecimal 0xFC, 0xFB, 0xFA can represent different sensor system types. 0xFC represents a Bluetooth-based wireless sensor system, 0xFB represents an electroencephalogram acquisition system, and 0xFA represents a functional near-infrared system. If you want to use 1 byte to represent the sensor system type as the frame header, you can simply fill C, B, or A in the frame header field to represent the corresponding 0xFC, 0xFB, 0xFA. The lengths of the various fields in the file header can also be reasonably set to other lengths based on the actual usage scenario. The content in the file header and / or data body can be encrypted using obfuscation encryption or other encryption methods to further improve data security.

[0075] After generating the file header, store the data packet containing human factor data in the data body, thus completing the storage of the current data packet. When storing the data packet in the data body, when the subsequent host computer needs to parse the human factor data file, it needs to check each data packet in the data header and data body one by one, discard the data packets with verification errors, and parse and display the data in the data packets with correct verification.

[0076] As a variant embodiment, the sensor description information used as the payload in the file header can also be stored in the data body, and it only needs to be stored once during the first storage. The data packet containing human factor data is stored behind the sensor description information. As a variant embodiment, in addition to storing sensor description information and human factor data, the data body can also store other necessary data based on the specific scenario.

[0077] As a variant embodiment, the length value in the file header can also be the overall length of the content in the data body.

[0078] As a variant embodiment, the mobile phone can first check the data packet containing human factor data. After successful verification, extract the human factor data in the data packet and only store the human factor data in the data body. In this case, when the subsequent host computer parses the human factor data file, there is no need to check the content of the data body, and only the data header needs to be checked.

[0079] The data body in the human factor data file of the present invention can contain the human factor data of 1 data packet, or can contain the human factor data of multiple data packets. When storing the human factor data in multiple data packets in the same human factor data file, the file header can be stored only once, and the data body will be stored multiple times, and the data in each data packet will be stored in sequence. If the length in the file header represents the length of the data body, the length value in the file header can be updated each time the data body length changes.

[0080] The human factor data file of the present invention stores data in hexadecimal. Each hexadecimal digit represents 4 bits. Compared with the binary data storage format, the data representation is more compact and the storage efficiency is higher. In addition, some or all of the fields such as the frame header, length value, and check value in the file header can be set as encrypted fields, and the encryption includes confusion encryption. In the case that the file header also includes other fields, the other fields can also be set as encrypted fields in the same way. This can ensure the security of the data.

[0081] In summary, the data storage method of the present invention does not require data format conversion, can efficiently store the human factor data in the data packet in the human factor data file in a predetermined data format, and has high data security; in addition, the data format is simple and easy to query.

[0082] Before the host computer stores the human factor data, it can interact with the sensor multiple times to obtain sensor information. For example, these message types (CmdType) include CmdInfo (initialization information), CmdScan (scan command), CmdScanAck (scan command confirmation), CmdEventInfo (marking information), CmdStart (data start), etc.

[0083] (1) CmdInfo (initialization information) message

[0084] The initial initiation of the CmdInfo message can be the mobile phone, and the receiving party is the sensor, which is used to obtain the initialization information field of the sensor. The structure of the CmdInfo message body is as Figure 10As shown, it includes the following fields: Header, PayloadLen, PayloadXor, and Payload. Among them, the Payload includes: CmdType (specifically CmdInfo), DevNum, SensorSysType, GroupID, and milliseconds Since Epoch (int64) ms since 1970. Among them, the first byte (Byte_0) in the CmdInfo message is the Header, the second byte (Byte_1) is the Payload length. If the Payload length is C, it means the length is 12. The third byte (Byte_2) is the PayloadXor, and PayloadXor represents the check value obtained by performing an exclusive OR check on the Payload. The Payload starts from the fourth byte (Byte_3). CmdInfo is a specific type of message (CmdType) used to confirm the existence of test devices (sensors). The value of this message type CmdInfo is predefined, and the receiving end of the message matches the message type based on this value. DevNum being 0 means there is no connection between the sensor and the Hub through the Hub. DevNum being other values means the number of sensors connected through the Hub. SensorSysType can represent multiple meanings, such as bandwidth, whether there is a battery, wired transmission or wireless transmission, etc., and different meanings can be represented by preset values. Group ID represents the group where the sending end and the receiving end (sensor and mobile phone) are located. Only devices in the same group can communicate, send and receive messages, and communication between different groups is not possible. The time stamp represents the operation time. The time of the sensing device is calculated using a programmer's calculator and then converted to milliseconds to obtain the data operation time, which is mainly used for time synchronization with the sensor. In the CmdInfo message sent from the mobile phone to the sensor, the fields that need to be filled by the sensor are initially empty. After the sensor receives the CmdInfo message and fills it, it further returns the CmdInfo message (which can also be called the CmdInfo confirmation message) to the mobile phone.

[0085] More specifically, after the sensor receives the CmdInfo message from the mobile phone, it performs a check on the group number. If the group numbers are the same, it can return the CmdInfo message to the mobile phone, indicating that further scanning operations can be performed.

[0086] (2) CmdScan (Scan Command) Message

[0087] The initial initiator of the CmdScan message can be the mobile phone, and the recipient is the sensor. It is used to instruct the sensor to start the scanning operation and request all sensors within the specified group (Group) to report their respective identification information. After receiving the scan command message, the sensor starts the scanning operation and can transmit information such as the sensor number, the main uses and measurement items of the sensor device, the sensor name suffix, the sampling rate, the battery level, and the Bluetooth signal to the mobile phone through the scan command confirmation message.

[0088] The structure of the CmdScan message body is as Figure 11 shown, and it includes the following fields: Header, PayloadLen, PayloadXor, and Payload. Among them, the Payload includes: message type (CmdType, specifically CmdScan), sensor number (Sensor ID), sensor type (SensorType), sensor name suffix (SensorNameID), data packet reporting frequency (PkgsFreq), battery level (Battery), signal strength (RSSI), running status (RunningStatus), and signal type (SignalType), etc. Among them, CmdScan is a specific message type (CmdType) used to request all sensors within the specified group to report their respective identification information. The value of this message type CmdScan is predefined, and the receiving end of the message matches the message type based on this value. The sensor number is used to identify the sensor. The sensor type (SensorType) is used to distinguish the main uses and measurement items of a single sensor device. When the sensor name suffix is 0, it can indicate that the name suffix is not displayed on the upper computer.

[0089] In the CmdScan message sent by the mobile phone to the sensor, the fields that need to be filled by the sensor are initially empty. After the sensor receives the CmdScan message and fills it, it further returns the CmdScan message to the mobile phone.

[0090] (3) CmdScanAck (Scan Command Confirmation) message

[0091] The initial initiator of the CmdScanAck message can be the mobile phone, and the recipient can be the upper computer. After the mobile phone confirms that it has received the scan operations of all sensors within the group, it responds to the upper computer through this CmdScanAck message on how many sensors have reported their identification information.

[0092] The CmdScanAck message body may include the following fields: frame header, payload length, check value, and payload. Among them, the payload may include: message type (CmdType, specifically CmdScanAck), group number (GroupID), number of test devices (DevNum), etc.

[0093] (4) Marking information (CmdEventInfo) message

[0094] The initial initiator of the CmdEventInfo message can be the mobile phone, and the recipient is the sensor.

[0095] The CmdEventInfo message may include the following fields: frame header, payload length, check value, and payload. Among them, the payload may include: message type (CmdType, specifically CmdEventInfo) and event type (EventType), etc., for behavior (event) marking.

[0096] The marking information may or may not be available, depending on the specific scenario requirements. If there is no need for marking information, it can be not transmitted. Scenarios where behavior marking can be performed include, for example, the start of running, the end of running, and other behaviors. Marking information refers to the operation of marking an event on the mobile phone. Clicking the marking button indicates the start of recording marking information.

[0097] After receiving the marking information message, the sensor starts the corresponding data measurement operation or status recording operation, and returns the corresponding measurement data to the mobile phone in the form of a data packet containing human factor data after the marking event is completed.

[0098] (5) Start command (CmdStart) message

[0099] The initial initiator of the start command (CmdStart) message can be the mobile phone, and the recipient is the sensor, used to send a start command to the sensor, indicating that the sensor starts to perform a certain operation or report the collected data. After the sensor confirms receiving the start command and starts to execute the operation, it transmits the sensor number and the collected data information to the mobile phone by returning the CmdStart message to the mobile phone.

[0100] The structure of the CmdStart message is as Figure 12As shown in the figure, it includes the following fields: frame header, payload length, check value, and payload. Among them, the payload includes: message type (CmdType, specifically CmdStart), sensor ID (SensorID), packet index (PkgsIndex), and data information body (human factor data), etc. Among them, CmdStart is used to request the sensor to collect and report data. The packet index is used to identify the packet, and based on the packet index, it can be verified whether there are missing or incorrect packets during packet transmission.

[0101] (6) Stop command (CmdStop) message

[0102] The initial initiator of the stop command (CmdStop) message can be the mobile phone, and the receiver is the sensor. It is used to send a stop command to the sensor, instructing the sensor to stop the current operation or data collection. After the sensor confirms receiving the stop command, it stops the corresponding operation and will transmit whether the operation has been successfully stopped to the mobile phone by returning a CmdStop message to the mobile phone.

[0103] The CmdStop message also includes a frame header, payload length, check value, and payload. Among them, the payload includes: message type (CmdType, specifically CmdStop) and message content, etc.

[0104] (7) Clock synchronization (CmdSyncClock) message

[0105] The initial initiator of the CmdSyncClock message can be the mobile phone, and the receiver is the sensor. It is used to send a clock synchronization command to the sensor, instructing the sensor to synchronize its internal clock to ensure time consistency, and transmit information such as sensor ID, clock calibration, and whether to save to the sensor. After the sensor confirms receiving the clock synchronization, it can perform the corresponding clock synchronization operation.

[0106] The CmdSyncClock message also includes a frame header, payload length, check value, and payload. Among them, the payload can include: message type (CmdType, specifically CmdSyncClock), sensor ID, and calibrated clock information, etc.

[0107] (8) Report status (CmdReportStatus) message

[0108] The initial initiator of the CmdReportStatus message can be the sensor, and the receiver is the mobile phone. It is used for the sensor to send a status report to the mobile phone, providing the current status, operation results, or other relevant information, including sensor ID, battery level, signal, and / or impedance of each channel.

[0109] The CmdReportStatus message also includes a frame header, a payload length, a check value, and a payload. The payload may include: a message type (CmdType, specifically CmdReportStatus), a sensor number, and some or all of the following information: sensor number, battery level, signal, and / or impedance of each channel.

[0110] The structures of the respective message bodies and the contents of the payloads included as described above are only examples, and may also contain more or fewer fields, that is, other fields may be added or some fields may be reduced to adapt to different scenarios. Moreover, there may be other message types, and the structures of all these messages can also be defined based on the requirements of the actual transmission protocol used.

[0111] The mobile phone and the sensor can communicate in a wired or wireless manner. Through the interaction between the sensor and the mobile phone, the mobile phone can obtain various information of the sensor. After the connection between the mobile phone and the sensor is successfully established, the sensor will send a data packet carrying human factor data to the mobile phone. After the receiving end receives the data packet, it can store it as a hexadecimal file according to the data storage method of the present invention.

[0112] In the data storage method of the present invention, a host computer (such as a server, a computer, a mobile phone, an industrial control computer, or other devices) can store human factor data in the same data format as the data packet of the sensor, without changing the data format, making the storage more efficient and maintaining the integrity of the data. In addition, since the same storage format is used for storing a wide variety of human factor data for diverse purposes, it is convenient for the management of human factor data.

[0113] Corresponding to the human factor data file obtained by the foregoing data storage method, the present invention also provides a method for parsing human factor data for a human factor data file. This parsing method can be performed in a data processing device serving as a host computer, and can be performed in a mobile phone, a computer, or a server. Figure 7 Shown is a schematic flowchart of the method for parsing human factor data in an embodiment of the present invention. As Figure 7 Shown, a human factor data file to be parsed can be selected, and a parsing method including the following steps can be performed on the human factor data file:

[0114] Step S210, file header parsing step: Based on a pre-determined check algorithm and the check value in the file header, the human factor data file header is checked. After the check is successful, the information in the file header is read out.

[0115] The information in the parsed file header may include, for example, a frame header and a payload. The payload may include, for example: Sensor ID, Sensor Type, Sensor Name ID, and Packet Reporting Frequency (PkgsFreq).

[0116] Step S220, data body parsing step: After the file header verification is successful, read the human factor data in the data body.

[0117] In this step, corresponding to the foregoing data storage method, if the data body stores a complete data packet containing human factor data, then as Figure 9 shown, to read the human factor data in the data packet, it is necessary to verify each data packet one by one and read out the human factor data in all the data packets that pass the verification, so as to complete the parsing of the data body.

[0118] If the data body stores the human factor data extracted from the data packets from the sensors, then as Figure 8 shown, the human factor data of the data body can be directly read without verifying the human factor data.

[0119] After parsing the file header and the data body, the payload and the human factor data in the parsed file header can be visually displayed and can be used for data query and data analysis.

[0120] The data parsing method of the present invention has high parsing efficiency, high security, simple query, and high access efficiency.

[0121] Corresponding to the above data storage method, the present invention also provides a data storage device (electronic device), which includes a computer device. The computer device includes a processor and a memory. The memory stores computer instructions. The processor is used to execute the computer instructions stored in the memory. When the computer instructions are executed by the processor, the data storage device implements the steps of the data storage method as described above.

[0122] Corresponding to the above data parsing method, the present invention also provides a human factor data parsing device (electronic device), which includes a computer device. The computer device includes a processor and a memory. The memory stores computer instructions. The processor is used to execute the computer instructions stored in the memory. When the computer instructions are executed by the processor, the data storage device implements the steps of the data parsing method as described above.

[0123] An embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the foregoing edge computing server deployment method are implemented. The computer-readable storage medium may be a tangible storage medium, such as a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, register, floppy disk, hard disk, removable storage disk, CD-ROM, or any other form of storage medium well-known in the technical field.

[0124] An embodiment of the present invention also provides a computer program product, including computer instructions. When the computer instructions are executed by a processor, the steps of the data storage method and / or data parsing method as described above are implemented.

[0125] Those of ordinary skill in the art should understand that the various exemplary components, systems, and methods described in conjunction with the embodiments disclosed herein can be implemented in hardware, software, or a combination of both. Specifically, whether to implement in hardware or software depends on the specific application and design constraints of the technical solution. A professional technician can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention. When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit (ASIC), appropriate firmware, a plug-in, a functional card, and so on. When implemented in software, the elements of the present invention are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium or transmitted through a data signal carried in a carrier wave on a transmission medium or a communication link.

[0126] It should be clear that the present invention is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order between steps after understanding the spirit of the present invention.

[0127] In the present invention, the features described and / or illustrated for one embodiment can be used in the same or similar manner in one or more other embodiments, and / or combined with the features of other embodiments or replace the features of other embodiments.

[0128] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, various modifications and variations can be made to the embodiments of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. A method for storing human factor data, characterized in that: The method comprises the following steps: Acquire a data packet from a sensor, wherein the data packet contains human factor data; The human factors data is stored in a human factors data file in a predetermined data format, wherein the predetermined data format has a file header and a data body, the file header includes a frame header, a length value and a check value, the human factors data from the sensor is stored in the data body, and the check value in the file header is obtained based on a predetermined check algorithm.

2. The method according to claim 1, characterized in that: The file header also includes a file header payload, and the file header payload includes a sensor description field for representing sensor characteristics; The length value in the file header is the length value of the file header payload.

3. The method according to claim 2, characterized in that The method further comprises: Before storing a data packet containing human factor data from a sensor for the first time, a message containing a sensor description field is received from the sensor, and a file header of the human factor data file is generated based on the received message.

4. The method according to claim 3, characterized in that The file header of the human factor data file generated based on the received message includes: Using a message body containing a sensor description field from a sensor as a file header, the message body including a frame header, a length value, a check value, and a payload, the payload including a plurality of sensor description fields; or Based on the message containing the sensor description field from the sensor, multiple sensor description fields are obtained, the frame header of the file header is filled, and the length value, check value and payload in the file header are filled based on the multiple sensor description fields to obtain the file header.

5. The method according to any one of claims 1 to 4, characterized in that: The data packet includes a header part and a payload part, wherein the header part includes a frame header, a payload length value and a check value, and the payload part of the data packet includes human factor data.

6. The method according to claim 5, characterized in that Storing the human factors data in a human factors data file in a predetermined data format includes: The data packets from the sensor are completely stored in a data body of the human factors data file, wherein the data body contains one or more data packets.

7. The method according to claim 5, characterized in that Storing the human factors data in a human factors data file in a predetermined data format includes: Verifying the acquired data packet based on a predetermined data packet verification algorithm and a verification value in the data packet, and obtaining the human factor data in the data packet after the verification is successful; The obtained human factor data is stored in the data body of the human factor data file.

8. The method according to claim 2, characterized in that: The sensor description field includes part or all of the following fields: sensor ID, sensor type, sensor name suffix, and data packet reporting frequency.

9. The method according to any one of claims 1 to 4, characterized in that: The data packet is a data packet containing human factors data from a human factors data acquisition sensor; The human factor data file is stored based on hexadecimal.

10. The method according to claim 1, characterized in that The method further comprises: Before acquiring the data packet from the sensor, an operation start instruction is sent to the sensor to instruct the sensor to send a data packet containing human factor data.

11. The method according to claim 3, characterized in that The message containing the sensor description field is received from the sensor based on the following interaction process: Sending an initialization message to the sensor and receiving an initialization message from the sensor, the initialization message including a frame header field, a payload length field, a check field, and a message body, the message body including a message type and sensor initialization information including the number of attached sensors, sensor system type, and grouping information; Based on the received initialization message from the sensor, a scan command message is sent to the sensor, wherein the scan command message includes a frame header field, a payload length field, a check field, and a message body part, wherein the message body part includes a message type and multiple sensor description fields, wherein the multiple sensor description fields include some or all of the following fields: sensor ID, sensor type, sensor name suffix, and data packet reporting frequency.

12. A method for analyzing human factor data, characterized in that: The human factor data is stored in a human factor data file in a predetermined format, the predetermined data format having a file header and a data body, the file header including a frame header, a length value and a check value, the data body including the human factor data, and the method comprising: File header parsing step: verifying the human factor data file header based on a predetermined verification algorithm and a verification value in the file header, and reading the information in the file header after the verification is successful; and Data body parsing step: After the file header is successfully verified, read the human factor data in the data body.

13. The method according to claim 12, characterized in that The data body includes at least one data packet containing human factor data, the data packet containing human factor data includes a packet header and a payload, the packet header includes a frame header, a payload length value and a check value, the payload of the data packet includes human factor data, and the human factor data parsing step includes: The data packets in the data body are verified based on a predetermined data packet verification algorithm and a verification value in the data packet, and the human factor data in the data packet is read after the verification is successful.

14. The method according to claim 12, characterized in that The file header also includes a file header payload, and the file header payload includes a sensor description field; The method further includes displaying the read information in the file header and the human factors data in the data body on a display device.

15. An electronic device comprising a processor, a memory and computer instructions stored in the memory, characterized in that: The processor is used to execute the computer instructions, and when the computer instructions are executed, the device implements the steps of the method according to any one of claims 1 to 14.

16. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, which, when executed by a processor, implement the steps of the method described in any one of claims 1 to 14.

Citation Information

Cited By

  • Human factor data storage method and analysis method, electronic device and storage medium

    EP4733950A1