Method and device for improving operation stability of electronic recording work card

By detecting the operating status and initiating a multi-task parallel processing mechanism, combined with a dual storage strategy of local and enterprise servers, the problem of data loss in the event of hardware failure or communication anomalies in electronic recording badges has been solved, achieving efficient real-time task processing and data integrity assurance.

CN120915418AInactive Publication Date: 2025-11-07XIAN UNIV OF SCI & TECH
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202511445747.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-11
Publication Date
2025-11-07
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing electronic recording badges cannot provide timely warnings in case of hardware failure or communication anomalies, leading to data loss and making it difficult to efficiently process real-time tasks in parallel.

Method used

By detecting the operating status of the electronic recording badge, a multi-task parallel processing mechanism is initiated, a dual storage strategy of local and enterprise servers is adopted, and a custom protocol is used to retransmit data when communication is interrupted, ensuring the integrity and real-time performance of the recording data.

Benefits of technology

It improves the operational stability of electronic recording badges, avoids data loss, enhances response efficiency in complex scenarios, and meets the need for long-term data retention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120915418A_ABST
    Figure CN120915418A_ABST
Patent Text Reader

Abstract

The invention discloses a method and device for improving the operation stability of an electronic recording work card, and relates to the technical field of communication. The electronic recording work card is powered on, the STM32 main control chip initializes the hardware module, and the running state of the electronic recording work card is detected; if any state has a fault, the indication module is red, and the electronic recording work card is in a shutdown state; if all the states are normal, the indication module turns on a green light, the electronic recording work card enters a normal working standby state, and a multi-task parallel processing mechanism is started; the multi-task parallel processing mechanism comprises a parallel processing data receiving and unpacking task, a recording task, a recording data sending task, a data sending task and a positioning task; a local and enterprise server dual-storage strategy is adopted to guarantee the integrity of recording data of the electronic recording work card, and a user-defined protocol is utilized to realize data retransmission when communication is interrupted. The problems of how to avoid data loss of the electronic recording work cards and how to enable the electronic recording work cards to efficiently process real-time tasks in parallel are solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of communication, in particular to a method and device for improving the running stability of an electronic recording badge. BACKGROUND

[0002] As an Internet of Things intelligent terminal device, the electronic recording badge is widely used in scenes requiring on-site audio collection, storage and remote transmission, and realizes real-time sensing and data conversion of voice interaction, location trajectory and device status in the working scene Although the existing electronic recording badge meets the basic management requirements in terms of function coverage, the existing electronic recording badge only supports local storage, and the device cannot timely alarm in the case of hardware failure or communication anomaly, which may cause data loss, and it is difficult to efficiently and parallelly process real-time tasks.

[0003] Therefore, how to avoid data loss of the electronic recording badge and make the electronic recording badge efficiently and parallelly process real-time tasks has become a problem to be solved. SUMMARY

[0004] In the embodiments of the present application, by providing a method for improving the running stability of an electronic recording badge, the problems of how to avoid data loss of the electronic recording badge and how to make the electronic recording badge efficiently and parallelly process real-time tasks are solved.

[0005] In the first aspect, the embodiments of the present application provide a method for improving the running stability of an electronic recording badge, which comprises: powering on the electronic recording badge, initializing the hardware module by the STM32 master chip, and detecting the running state of the electronic recording badge; wherein the running state comprises the connection state of the key resources in the hardware module, the network state of the communication module, and the connection state of the communication module and the enterprise server; the key resources include a TF card for local data storage and a SIM card for realizing mobile communication function; if any state of the running state has a fault in the detection process, the indicating module lights red, and the electronic recording badge is in a shutdown state; if all states of the running state are normal, the indicating module lights green, and the electronic recording badge enters a normal working standby state; when the electronic recording badge is in the normal working standby state, the STM32 master chip starts a multi-task parallel processing mechanism; the multi-task parallel processing mechanism comprises parallel processing of a data receiving and unpacking task, a recording task, a recording data sending task, a data sending task and a positioning task; the local and enterprise server dual storage strategy is adopted to guarantee the completeness of the recording data of the electronic recording badge, and the data retransmission is realized in the communication interruption by using the self-defined protocol.

[0006] In a possible implementation, the hardware modules include a power module, a GPS module, a communication module, a microphone module, a storage module, a key module, an indication module, and a debugging module; the power module is configured to supply power for the STM32 master chip and other modules, and is responsible for power collection and transmission of power information to the STM32 master chip; the GPS module is configured to perform GPS positioning and send positioning data to the communication module and the storage module; the communication module is configured to communicate with an external network, receive commands of an enterprise server and an LBS server, upload positioning data to the STM32 master chip, realize remote data transmission and instruction receiving, and realize LBS positioning; the communication module includes a SIM card and a data transmitter; the microphone module is configured to collect audio data and transmit the collected audio data to the STM32 master chip through an I2S protocol; the storage module is configured to store recording data and positioning data; the storage module includes a TF card; the key module is configured to provide a custom function for a user; the indication module is configured to indicate that the electronic recording badge is in a shutdown state or in a normal working standby state; and the debugging module is configured to communicate with an upper computer and receive debugging data.

[0007] In a possible implementation, the working process of the data receiving and unpacking task includes: checking whether there is data to be received; if there is no data to be received, continuing to check whether there is data to be received; if there is data to be received, performing an unpacking operation on the received data, checking whether the unpacked data is valid; if the unpacked data is invalid, continuing to check whether there is data to be received; if the unpacked data is valid, performing a corresponding command operation on the valid data; the checking whether the unpacked data is valid includes: when a data packet conforms to a format of a self-defined protocol and a check value obtained through a check sum algorithm matches a check value carried in the protocol, the unpacked data is valid, otherwise the unpacked data is invalid; the format of the self-defined protocol is: the total length of the data packet is L, the protocol header occupies 1 byte, the protocol length occupies 2 bytes, the frame end symbol occupies 2 bytes, and the protocol body length Lbody is Lbody=L-1-2-2; the command operation includes: starting recording, ending recording, reporting positioning, reporting power, and a response of the enterprise server to the electronic recording badge.

[0008] In a possible implementation, the working process of the recording task includes: receiving recording data from a microphone, judging whether the length of the received recording data reaches a preset compressed packet length; if the preset compressed packet length is not reached, performing compression processing on the recording data according to the obtained compression ratio, until the length of the compressed recording data reaches the preset compressed packet length, and storing the recording data; the expression of the compression ratio is: ; wherein, is the compression ratio, is a dynamic compression ratio adjustment coefficient, and respectively and weighting coefficients, , is a current network bandwidth, is a maximum network bandwidth, is a remaining space of a storage module, is a total space of the storage module; an expression of the compressed recording data is: ; wherein, is a length of the compressed recording data, is a length of the recording data before compression.

[0009] In a possible implementation, a workflow of the recording data sending task includes: judging whether a length of the currently stored recording data is greater than a preset sending length threshold; if less than or equal to the preset sending length threshold, continuing to judge whether the length of the currently stored recording data is greater than the preset sending length threshold; if greater than the preset sending length threshold, reading the recording data from the TF card; obtaining a probability prediction value of the recording data sending success based on a prediction function; if the probability prediction value is greater than a preset threshold, requesting the data sender to send the currently stored recording data until the sending request is successful; if the probability prediction value is less than or equal to the preset threshold, not requesting the data sender to send the currently stored recording data; an expression of the prediction function is: ; wherein, is the probability prediction value of the recording data sending success, is the length of the currently stored recording data, is a minimum data amount threshold triggering the sending operation, is the preset sending length threshold, is the current network bandwidth, is an ideal network bandwidth.

[0010] In a possible implementation, the method further includes: after the data sender receives the currently stored recording data, encapsulating the recording data and packing it into a recording data packet, and after the recording data packet enters a data space of the data sender, performing a data sending task; a workflow of the data sending task includes: obtaining a priority evaluation value of each recording data packet based on a data sending priority evaluation function, and determining a sending order of the recording data packet based on the priority evaluation value; wherein, the recording data packet with a high priority evaluation value is sent in priority; based on the determined sending order, sending the recording data packet to the enterprise server and the LBS server; an expression of the data sending priority evaluation function is: ; wherein, is the priority evaluation value of the recording data packet, , and are respectively , and a weight parameter of , a score of an importance degree of the audio data, a score of an urgency degree of the audio data, a time factor, , a difference between the generation time and the current time.

[0011] In a possible implementation, the workflow of the positioning task includes: using a data parsing package to parse a received audio data package, using a positioner to start a GPS positioning function when a protocol containing positioning trigger information is parsed and a preset positioning time interval is reached; after the GPS positioning is completed, a data transmitter and a data unpacker are closed, and an LBS positioning function is started; after the LBS positioning is completed, the data transmitter and the data unpacker are restarted, and a data transmission request is initiated to the data transmitter through a communication module; after the data transmitter receives the request, it is determined whether the request is successful; if the request is successful, the received audio data package is parsed using the data parsing package; if the request fails, the data transmission request is reinitiated until the request is successful.

[0012] In a second aspect, an apparatus for improving the running stability of an electronic audio worker card is provided. The apparatus includes a detection module configured to power on the electronic audio worker card, initialize hardware modules by an STM32 master control chip, and detect key resources in the hardware modules and connection states of the key resources in sequence; the key resources include a TF card configured to store local data and a SIM card configured to implement a mobile communication function, and the connection states include network states and enterprise server states; if any key resource or connection state thereof has a fault during the detection, an indication module is configured to light a red light, and the electronic audio worker card is in a shutdown state; if all the detections are passed, the indication module is configured to light a green light, and the electronic audio worker card enters a normal working standby state; a starting module is configured to start a multi-task parallel processing mechanism by the STM32 master control chip when the electronic audio worker card is in the normal working standby state; the multi-task parallel processing mechanism includes parallel processing of a data reception and unpacking task, an audio recording task, an audio data transmission task, a data transmission task, and a positioning task; and a guarantee module is configured to guarantee completeness of audio data of the electronic audio worker card by using a local and enterprise server dual storage strategy, and implement data retransmission when communication is interrupted by using a custom protocol.

[0013] In a third aspect, an apparatus for improving the running stability of an electronic audio worker card is provided. The apparatus includes a memory and a processor; the memory is configured to store computer executable instructions; and the processor is configured to execute the computer executable instructions to implement the method in the first aspect or any possible implementation manner of the first aspect.

[0014] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, which stores executable instructions, and a computer executes the executable instructions to implement the method in the first aspect or any possible implementation manner of the first aspect.

[0015] The one or more technical solutions provided in the embodiments of the present application have at least the following technical effects: the embodiments of the present application provide a method for improving the running stability of an electronic recording badge, which quickly locates hardware or communication faults by detecting the running state of the electronic recording badge. A multi-task parallel processing mechanism is started in a standby state to reduce the risk of task blocking and improve the response efficiency in a complex scenario. The local TF card and the enterprise server synchronously store recording data to ensure that the data is traceable when a single storage fails and to meet the long-term storage requirement. The problems of how to avoid data loss of the electronic recording badge and how to make the electronic recording badge efficiently and in parallel process real-time tasks are solved. BRIEF DESCRIPTION OF DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the description of the embodiments of the present application or the prior art. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort on the basis of these drawings.

[0017] Figure 1 A flowchart of a method for improving the running stability of an electronic recording badge is provided in the embodiments of the present application. Figure 2 A schematic diagram of an electronic recording badge system architecture is provided in the embodiments of the present application. Figure 3 A schematic diagram of a device for improving the running stability of an electronic recording badge is provided in the embodiments of the present application. Figure 4 A schematic diagram of a server for improving the running stability of an electronic recording badge is provided in the embodiments of the present application. DETAILED DESCRIPTION

[0018] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative effort fall within the scope of the present application.

[0019] The following description of the technology involved in the embodiments of the present application is provided to facilitate understanding, and should be considered merely as exemplary. Therefore, those skilled in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Also, in the following description, some descriptions of well-known functions and structures are omitted for clarity and conciseness.

[0020] The embodiments of the present application provide a method for improving the running stability of an electronic recording badge, as shown in the method comprising steps S101 to S105. Among them, Figure 1 Figure 1 The above-mentioned steps are only one execution sequence of the embodiments of the present application, and do not represent the only execution sequence of the method for improving the running stability of the electronic recording badge. As long as the final result can be achieved, Figure 1 The steps shown can be executed in parallel or in reverse.

[0021] S101: The electronic recording badge is powered on, and the STM32 master chip initializes the hardware module and detects the running state of the electronic recording badge. Among them, the running state includes the connection state of the key resources in the hardware module, the network state of the communication module, and the connection state of the communication module and the enterprise server. The key resources include the TF card for local data storage and the SIM card for realizing mobile communication function.

[0022] Figure 2 The schematic diagram of the electronic recording badge system architecture provided by the embodiments of the present application. The hardware module includes a power module, a GPS module, a communication module, a microphone module, a storage module, a key module, an indication module and a debugging module.

[0023] The power module is used to power the STM32 master chip and other modules, and is responsible for power collection and transmission of power information to the STM32 master chip.

[0024] The STM32 master chip in the present application is STM32F446RCT6, which has a perfect ecological environment and is convenient for development, is responsible for coordinating and managing the work of each module, and processing data transmission and task scheduling. The power module manages the charging and discharging of the lithium battery, and converts the 2.5V to 5V power provided by the lithium battery into stable 3.3V, which is used to power the STM32 master chip and other modules. In addition, the power collection and transmission of power information to the STM32 master chip are performed.

[0025] The GPS module is used for GPS positioning, and sends the positioning data to the communication module and the storage module.

[0026] ​The GPS module of the present application is GP02, which is used for receiving satellite positioning data and transmitting positioning information to the STM32 master chip through the UART interface, so as to realize the functions of electronic fence, position tracking and the like. In enterprise personnel management, it can be used to track the position of employees and ensure that employees move within the specified working area; in the logistics industry, it can be used to monitor the position of transport vehicles in real time.

[0027] The communication module is used for communicating with external networks, receiving commands of enterprise servers and LBS servers, uploading positioning data to the STM32 master chip, realizing remote data transmission and instruction receiving, and realizing LBS positioning at the same time. The communication module includes a SIM card and a data transmitter.

[0028] The communication module in the present application can be a 4G module with the model Air780EP, or can be replaced by the ML307R model.

[0029] The microphone module is used for collecting audio data and transmitting the collected audio data to the STM32 master chip through the I2S protocol.

[0030] The microphone module is MSM261S4030H0R, which adopts I2S transmission of 8KHz sampling data points of 24-bit audio data. The collected audio data is first compressed into 16-bit effective data by the reserved high significant bit method, and then compressed into 4-bit effective data by ADPCM, and finally transmitted to the STM32 master chip, which is used for real-time communication and recording.

[0031] The storage module is used for storing recording data and positioning data. The storage module includes a TF card.

[0032] The storage module is connected to the STM32 master chip through the SDIO interface, and stores the compressed audio data received by the STM32 master chip. The larger the capacity is, the longer the recording time is, and about 14MB of space is occupied per hour, which ensures the safe and reliable storage of important information such as recording data and positioning data.

[0033] The key module is used to provide custom functions for users.

[0034] The key module provides custom functions for users, such as power on / off, on / off duty and leave function. The key triggers external interruption and notifies the STM32 master chip to perform corresponding operation.

[0035] The indication module is used to indicate that the electronic recording badge of the user is in the shutdown state or in the normal working standby state.

[0036] The debugging module is used for communicating with the host computer and receiving debugging data.

[0037] The debugging module supports UART and SWD interfaces, and receives debugging data by communicating with the host computer, thereby providing convenience for system development and maintenance.

[0038] S102: If any state of the running state in the detection process has a fault, the indication module lights a red light, and the electronic recording badge is in a shutdown state.

[0039] It should be noted that for some recoverable faults, a retry mechanism is set. For example, when the network connection fails, multiple reconnections can be attempted; when the connection with the enterprise server fails, a period of time can be waited before reattempting.

[0040] S103: If all states of the running state are normal, the indication module lights a green light, and the electronic recording badge enters a normal working standby state.

[0041] Specifically, the insertion state of the TF card, the storage capacity, and whether the file system is normal are checked to ensure that it can normally store data. The insertion of the SIM card, whether it has been registered to the mobile network, whether the signal strength meets the requirements, and the like are verified. The network coverage of the environment where the device is located is detected, the mobile network is attempted to be connected, and the network connection quality is evaluated. The communication module establishes a connection with the enterprise server, verifies whether the communication link is normal, ensures that data can be normally uploaded and received, and attempts to establish a connection with the LBS server, checks whether the positioning service related communication link is normal, and ensures that the LBS positioning function can be normally used.

[0042] S104: When the electronic recording badge is in the normal working standby state, the STM32 master control chip starts a multi-task parallel processing mechanism. The multi-task parallel processing mechanism includes parallel processing of a data reception and unpacking task, a recording task, a recording data sending task, a data sending task, and a positioning task.

[0043] The working process of the data reception and unpacking task includes the following contents.

[0044] It is checked whether there is data to be received.

[0045] If there is no data to be received, it is continuously checked whether there is data to be received.

[0046] Specifically, if it is found that there is no data to be received, the task will not perform other operations, but will continue to return to the check of whether there is data to be received, and this check operation will be executed in a loop until it is detected that there is data to be received. This loop check mechanism ensures that no new arriving data is missed.

[0047] If there is data to be received, unpacking operation is performed on the received data, and it is checked whether the unpacked data is valid.

[0048] Specifically, the data to be received can be control instruction data, response data, configuration data, etc.

[0049] If the unpacked data is invalid, it is continuously checked whether there is data to be received.

[0050] If the unpacked data is valid, a corresponding command operation is performed on the valid data.

[0051] The checking of whether the unpacked data is valid includes the following.

[0052] The unpacked data is valid when the data packet conforms to the format of the self-defined protocol and the check value obtained through the check sum algorithm matches the check value carried in the protocol. Otherwise, the unpacked data is invalid. The format of the self-defined protocol is as follows: the total length of the data packet is L, the protocol header occupies 1 byte, the protocol length occupies 2 bytes, the frame end symbol occupies 2 bytes, and the protocol body length Lbody is Lbody = L-1-2-2.

[0053] Specifically, the check sum algorithm calculates part or all of the data in the data packet to obtain a check value. The calculated check value is matched with the check value carried in the data packet. If the two are consistent, the unpacked data is valid; otherwise, the data is invalid.

[0054] If the unpacked data is invalid, the task gives up the current batch of data and continues to return to the step of checking the data to be received, and starts to check again whether there is data to be received. In this way, further processing of invalid data can be avoided, and the efficiency of the system can be improved.

[0055] The command operation includes starting recording, ending recording, reporting positioning, reporting power, and the response of the enterprise server to the electronic recording badge.

[0056] Specifically, the response of the enterprise server to the electronic recording badge includes registration completion, on-duty completion, and leave completion.

[0057] The workflow of the recording task includes the following.

[0058] The recording data from the microphone is received, and it is judged whether the length of the received recording data reaches a preset compression packet length.

[0059] If the preset compression packet length is not reached, the recording data is compressed according to the obtained compression ratio until the length of the compressed recording data reaches the preset compression packet length, and the recording data is stored.

[0060] Specifically, the preset compression packet length is a fixed value set in advance according to the storage and transmission requirements of the system, which determines the size of the audio data amount stored and transmitted each time. The preset compression packet length can be 8192 Bytes.

[0061] The expression of the compression ratio is: wherein, is the compression ratio, is the dynamic compression ratio adjustment coefficient, and are the weight coefficients of and respectively, , is the current network bandwidth, is the maximum network bandwidth, is the remaining space of the storage module, is the total space of the storage module.

[0062] Specifically, the compression ratio is a dynamically adjusted parameter representing the proportional relationship of the data length before and after compression. The dynamic compression ratio adjustment coefficient is used to adjust the overall compression ratio according to the actual situation, so as to better adapt to different network and storage conditions. The values of and can be assigned priorities, and if the network condition is good, the values of , . The value range of is [1.2, 1.8], for example, taking as the initial value. When the current network bandwidth is much smaller than the maximum network bandwidth (such as ), and the remaining space of the storage module is sufficient, in order to adapt to the network condition, the compression ratio needs to be increased, and the dynamic compression ratio adjustment coefficient needs to be increased.

[0063] Specifically, the compression ratio calculated by the above formula comprehensively considers the current network bandwidth and the remaining space of the storage module. When the network bandwidth is narrow or the remaining space of the storage module is small, the compression ratio will increase accordingly, so as to compress more data to reduce the data volume and adapt to the needs of network transmission and storage; on the contrary, when the network bandwidth is wide or the remaining space of the storage module is large, the compression ratio will decrease to preserve more audio information.

[0064] The expression of the compressed recording data is: wherein, is the length of the compressed recording data, is the length of the recording data before compression.

[0065] Further, when the length of the compressed recording data reaches the compression package length, the compressed recording data is stored. For example, when the compressed recording data reaches 8192 Bytes, the compressed recording data is written into the TF card in the storage module by using the SDIO (Secure Digital Input Output) and DMA (Direct Memory Access) mode.

[0066] The workflow of the recording data sending task includes the following.

[0067] It is determined whether the length of the currently stored recording data is greater than a preset sending length threshold.

[0068] If the length of the currently stored recording data is less than or equal to the preset sending length threshold, it is determined whether the length of the currently stored recording data is greater than the preset sending length threshold.

[0069] Specifically, when the length of the currently stored recording data is less than or equal to the preset sending length threshold, it means that the data volume has not yet reached the standard that can be sent, and the system will not immediately perform the sending related operation, but will continue to maintain the monitoring state and determine the length of the currently stored recording data again, and repeat the comparison process. This continuous determination mechanism ensures that the subsequent sending process is triggered only when the data volume is sufficient, thereby avoiding unnecessary waste of resources. The preset sending length threshold can be flexibly set according to actual conditions. If the call duration is used as a measure, the preset sending length threshold can be set to 3-5 minutes, and assuming that the average data volume generated per minute of call is 1 MB, the preset sending length threshold can be set to 3-5 MB.

[0070] If the length of the currently stored recording data is greater than the preset sending length threshold, the recording data is read from the TF card.

[0071] A probability prediction value of the success of sending the recording data is obtained based on a prediction function.

[0072] Specifically, after the recording data is successfully read, the sending is not directly performed, but the prediction function is used to evaluate the probability of the success of sending the recording data. This step fully considers the influence of the data volume and the network condition on the success rate of sending, optimizes the sending strategy through scientific prediction, and improves the reliability of data sending.

[0073] If the probability prediction value is greater than a preset threshold, the sending of the currently stored recording data is requested from a data sender until the sending is successfully requested.

[0074] Specifically, the preset threshold can be flexibly set according to actual conditions. The preset threshold can be 0.7-0.8, which can ensure a high success rate of sending the recording data while avoiding excessive data backlog due to a too high preset threshold, thereby affecting the sending efficiency.

[0075] If the probability prediction value is less than or equal to the preset threshold, the data transmitter is not requested to send the currently stored recording data.

[0076] The expression of the prediction function is: wherein, the probability prediction value of the recording data sending success, the length of the currently stored recording data, the minimum data amount threshold triggering the sending operation, the preset sending length threshold, the current network bandwidth, the ideal network bandwidth.

[0077] Specifically, the change of the current network bandwidth may be continuously monitored, because the network condition is dynamically changed. The probability prediction value may be low due to network congestion and the like before, but the current network bandwidth may be restored or improved over time. Through continuous monitoring, once the network condition is improved and the probability prediction value is greater than the preset threshold, the data transmitter is requested to send the currently stored recording data.

[0078] The application also includes that after the data transmitter receives the currently stored recording data, the recording data is encapsulated and packaged into a recording data packet. After the recording data packet enters the data space of the data transmitter, the data sending task is executed.

[0079] The workflow of the data sending task includes the following contents.

[0080] Based on the data sending priority evaluation function, the priority evaluation value of each recording data packet is obtained, and the sending order of the recording data packet is determined based on the priority evaluation value. Wherein, the recording data packet with high priority evaluation value is sent in priority.

[0081] Based on the determined sending order, the recording data packet is sent to the enterprise server and the LBS server.

[0082] The enterprise server is mainly used for storing, managing and analyzing the recording data within the enterprise. The LBS server provides relevant location services such as positioning by using the location information in the recording data.

[0083] The expression of the data sending priority evaluation function is: wherein, the priority evaluation value of the recording data packet, , and are the weight parameters of , and respectively, , a score of importance of the recorded data, a score of urgency of the recorded data, a time factor, , a difference between the generation time and the current time.

[0084] Specifically, , and The values of the scores of importance and urgency of the recorded data can be set according to specific circumstances. In a medical emergency scenario, the urgency of the recorded data is more important, and the value of the score of urgency of the recorded data can be appropriately increased at this time. In an enterprise core decision-making conference recording scenario, the importance of the recorded data is higher, and the value of the score of importance of the recorded data can be increased. The score of importance of the recorded data can be assigned different scores according to the degree of influence of the recorded data on the enterprise. The score of urgency of the recorded data can be assigned different scores according to the urgency of timely processing of the recorded data. The time factor corresponding to newly generated data is usually higher because they contain the latest information. The workflow of the positioning task includes the following.

[0085] The received recorded data packet is parsed using the data parsing package. When a protocol containing positioning trigger information is parsed and the preset positioning time interval is reached, the GPS positioning function is started using the positioner.

[0086] After completing the GPS positioning, the data transmitter and the data unpacker are closed, and the LBS positioning function is started.

[0087] Specifically, closing the data transmitter and the data unpacker can avoid interference during the LBS positioning process. LBS (Location Based Service) positioning usually relies on mobile communication network infrastructure and is complementary to GPS positioning, which can provide location information in the case of poor GPS signal.

[0088] After completing the LBS positioning, the data transmitter and the data unpacker are restarted, and a data transmission request is initiated to the data transmitter through the communication module.

[0089] After receiving the request, the data transmitter determines whether the request is successful.

[0090] If the request is successful, the received recorded data packet is continuously parsed using the data parsing package.

[0091] If the request fails, a data transmission request is reinitiated until the request is successful.

[0092] If the request fails, a data transmission request is reinitiated until the request is successful.

[0093] ​Specifically, the communication module will usually return a status code after processing the data sending request. Different status codes represent different processing results. For example, a specific status code indicating success will be returned for successful data sending, while various error conditions (such as network connection failure, enterprise server unresponsive, etc.) will have corresponding error status codes (such as 404 indicating that the resource is not found, 500 indicating that the enterprise server has an internal error, etc.). The data sender can determine whether the request is successful according to these status codes.

[0094] Specifically, after the data sending request is successful, the data will be sent to the enterprise server.

[0095] S105: Adopting the local and enterprise server dual storage strategy to guarantee the completeness of the recording data of the electronic recording worker card, and using a custom protocol to realize data retransmission when communication is interrupted.

[0096] Specifically, the format of the custom protocol is: the total length of the data packet is L, the protocol header occupies 1 byte, the protocol length occupies 2 bytes, the frame end symbol occupies 2 bytes, and the protocol body length Lbody is Lbody=L-1-2-2. That is, the string VC (the starting identifier of the custom protocol) + the protocol header + the protocol length + the protocol body (the specific transmission content) + \r\n (the frame end symbol).

[0097] Specifically, the electronic recording worker card itself has a storage function, and the recorded data is first stored in the TF card of the storage module. Even if the communication network is unstable or interrupted, the recording data will not be lost, providing the first layer of guarantee for data integrity. When the communication is normal, the electronic recording worker card uploads the recording data stored in the TF card to the enterprise server for storage through the custom protocol. The enterprise server has larger storage capacity and more reliable data backup mechanism, which can long-term save the recording data and provide data query, analysis and other functions.

[0098] The embodiment of the application also provides a device 300 for improving the running stability of the electronic recording worker card, as shown in Figure 3 The device includes a detection module 301, a starting module 302 and a guarantee module 303.

[0099] The detection module 301 is used for powering on the electronic recording worker card, and the STM32 master control chip initializes the hardware module, detects the connection state of the key resources in the hardware module, the network state of the communication module and the connection state of the communication module and the enterprise server. Among them, the key resources include the TF card for local data storage and the SIM card for realizing mobile communication function. If there is any fault in the detection process, the indicating module lights red, and the electronic recording worker card is in the shutdown state. If all the detections are passed, the indicating module lights green, and the electronic recording worker card enters the normal working standby state.

[0100] The starting module 302 is configured to start a multi-task parallel processing mechanism when the electronic recording badge is in a normal working standby state. The multi-task parallel processing mechanism includes parallel processing of a data receiving and unpacking task, a recording task, a recording data sending task, a data sending task, and a positioning task.

[0101] The guarantee module 303 is configured to adopt a local and enterprise server dual storage strategy to guarantee the integrity of recording data of the electronic recording badge, and to use a self-defined protocol to realize data retransmission when communication is interrupted.

[0102] Some of the modules in the device described in the present application can be described in the general context of computer-executable instructions, such as program modules, executed by computers. Generally, program modules include routines, programs, objects, components, data structures, classes, and the like, which perform particular tasks or implement particular abstract data types. The present application can also be practiced in distributed computing environments where tasks are performed by remote processing devices that are connected through a communication network. In a distributed computing environment, program modules can be located in both local and remote computer storage media including storage devices.

[0103] The device or module described in the above application embodiment can be specifically implemented by a computer chip or an entity, or by a product with certain functions. For the convenience of description, the above device is described as various modules respectively described in terms of functions. In the implementation of the present application, the functions of each module can be implemented in the same or multiple software and / or hardware. Of course, the modules implementing certain functions can also be implemented by multiple sub-modules or sub-units.

[0104] The methods, apparatuses or modules described in the present application can be implemented in a computer readable program code manner. The controller can be implemented in any appropriate manner, for example, the controller can take the form of, for example, a microprocessor or processor and a computer readable medium storing computer readable program code (for example, software or firmware) executable by the (micro)processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller and an embedded microcontroller. Examples of the controller include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also know that, in addition to implementing the controller in a pure computer readable program code manner, the same function can also be implemented by logically programming the method steps in the form of logic gates, switches, ASICs, programmable logic controllers and embedded microcontrollers. Therefore, such a controller can be considered as a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can even be considered as both a software module implementing the method and a structure within the hardware component.

[0105] As shown in Figure 4 The embodiments of the present application also provide a server for improving the running stability of an electronic recording pass, which comprises a memory 401 and a processor 402; the memory 401 is used for storing computer executable instructions; and the processor 402 is used for executing the computer executable instructions to implement the method for improving the running stability of the electronic recording pass.

[0106] The embodiments of the present application also provide a computer readable storage medium, which stores executable instructions, and a computer executes the executable instructions to implement the method for improving the running stability of the electronic recording pass.

[0107] From the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software plus necessary hardware. Based on such an understanding, the technical solutions of the present application can be embodied in the form of a software product or can be embodied in the implementation process of data migration. The computer software product can be stored in a storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, and the like, and includes a plurality of instructions for causing a computer device (which can be a personal computer, a mobile terminal, a server, or a network device, etc.) to execute the methods described in the embodiments of the present application.

[0108] The various embodiments in the specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment mainly describes the difference from other embodiments. The whole or part of the present application can be used in a plurality of general or special computer system environments or configurations.

[0109] The above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the present application; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that the technical solutions recorded in the foregoing embodiments can still be modified, or some or all of the technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the present application.

Claims

1. A method for improving the stability of electronic cue card operation, characterized in that, The application relates to an electronic recording badge, and relates to an electronic recording badge and a working method thereof. The electronic recording badge comprises a hardware module and a software module; the hardware module comprises a power module, a GPS module, a communication module, a microphone module, a storage module, a key module, an indication module and a debugging module; the software module comprises a main control chip, a data receiving and unpacking task, a recording task, a recording data sending task, a data sending task and a positioning task. The power module is used for supplying power for the main control chip and other modules, and is responsible for power collection and power information transmission to the main control chip. The GPS module is used for GPS positioning, and sends positioning data to the communication module and the storage module. The communication module is used for communication with an external network, receives commands of an enterprise server and an LBS server, uploads positioning data to the main control chip, realizes remote data transmission and instruction receiving, and realizes LBS positioning; the communication module comprises a SIM card and a data transmitter. The microphone module is used for collecting audio data, and transmits the collected audio data to the main control chip through an I2S protocol.

2. The method for stabilizing the operation of an electronic slate as claimed in claim 1, wherein, The storage module is used for storing recording data and positioning data; the storage module comprises a TF card. The key module is used for providing self-defined functions for users. The indication module is used for indicating that the electronic recording badge is in a shutdown state or in a normal working standby state. The debugging module is used for communication with an upper computer and receiving debugging data. The working process of the data receiving and unpacking task comprises the following steps: checking whether there is data to be received; if there is no data to be received, continuously checking whether there is data to be received; if there is data to be received, performing unpacking operation on the received data, and checking whether the unpacked data is valid; if the unpacked data is invalid, continuously checking whether there is data to be received; 3. The method for stabilizing the operation of a teleprompter according to claim 2, wherein, if the unpacked data is valid, executing corresponding command operation on the valid data; checking whether the unpacked data is valid comprises the following steps: checking whether the data to be received is valid; if the data to be received is valid, executing corresponding command operation on the valid data; if the data to be received is invalid, continuously checking whether there is data to be received. ​ ​ The unpacked data is valid when the data packet conforms to the format of the custom protocol and the check value obtained through the check sum algorithm matches the check value carried in the protocol; the format of the custom protocol is that the total length of the data packet is L, the protocol header occupies 1 byte, the protocol length occupies 2 bytes, the frame end symbol occupies 2 bytes, and the protocol body length Lbody is Lbody=L-1-2-2; The command operation includes starting recording, ending recording, reporting positioning, reporting power, and a response of the enterprise server to the electronic recording badge.

4. The method for stabilizing the operation of a teleprompter according to claim 3, wherein, The workflow of the recording task includes: receiving recording data from the microphone, judging whether the length of the received recording data reaches a preset compression package length; if the preset compression package length is not reached, compressing the recording data according to the obtained compression ratio until the length of the compressed recording data reaches the preset compression package length, and storing the recording data; The expression of compression ratio is: ; wherein, is the compression ratio, is the dynamic compression ratio adjustment coefficient, and are respectively and weight coefficients of , is the current network bandwidth, is the maximum network bandwidth, is the remaining space of the storage module, is the total space of the storage module; The expression of the compressed recording data is: ; wherein is the length of the compressed recording data, is the length of the recording data before compression.

5. The method for stabilizing the operation of a teleprompter according to claim 4, wherein, The workflow of the recording data sending task includes: judging whether the length of the currently stored recording data is greater than a preset sending length threshold value; if it is less than or equal to the preset sending length threshold value, continuing to judge whether the length of the currently stored recording data is greater than the preset sending length threshold value; if it is greater than the preset sending length threshold value, reading the recording data from the TF card; obtaining a probability prediction value of the success of the recording data sending based on the prediction function; if the probability prediction value is greater than a preset threshold value, requesting the data sender to send the currently stored recording data until the sending request is successful; if the probability prediction value is less than or equal to the preset threshold value, not requesting the data sender to send the currently stored recording data; The expression of the prediction function is: ; wherein, is a probability prediction value of the success of the audio data transmission, is a current stored audio data length, is a minimum data amount threshold value triggering the transmission operation, is a preset transmission length threshold value, is a current network bandwidth, is an ideal network bandwidth.

6. The method for stabilizing the operation of the electronic recording slate according to claim 5, wherein, Further comprising: after the data sender receives the currently stored recording data, encapsulating the recording data and packaging it into a recording data package, and after the recording data package enters the data space of the data sender, executing the data sending task; The workflow of the data sending task includes: obtaining a priority evaluation value of each recording data package based on a data sending priority evaluation function, and determining the sending order of the recording data package based on the priority evaluation value; wherein the recording data package with a high priority evaluation value is sent first; based on the determined sending order, sending the recording data package to the enterprise server and the LBS server; The expression of the data sending priority evaluation function is: ; wherein, is a priority evaluation value of the audio data packet, , and are weight parameters of , and respectively, , is a score of the importance degree of the audio data, is a score of the urgency degree of the audio data, is a time factor, , is a difference between the generation time and the current time.

7. The method for stabilizing the operation of a teleprompter according to claim 6, wherein, The workflow of the positioning task includes: using the data analysis package to analyze the received recording data package, and when a protocol containing positioning trigger information is analyzed and a preset positioning time interval is reached, starting the GPS positioning function using the positioner; after completing the GPS positioning, closing the data sender and the data unpacker, and starting the LBS positioning function; after completing the LBS positioning, reopening the data sender and the data unpacker, and initiating a data sending request to the data sender through the communication module; after the data sender receives the request, judging whether the request is successful; if the request is successful, continuing to analyze the received recording data package using the data analysis package; if the request fails, reinitiating the data sending request until the request is successful.

8. A device for improving the stability of electronic cue card operation, characterized in that, ​ The detection module is configured to power on the electronic recording badge, and the STM32 master chip initializes the hardware module, detects the connection state of a key resource in the hardware module, the network state of a communication module, and the connection state of the communication module and an enterprise server; the key resource includes a TF card for local data storage and a SIM card for realizing mobile communication; if any state detection has a fault in the detection process, the indication module is red, and the electronic recording badge is in a shutdown state; if all detections pass, the indication module is green, and the electronic recording badge enters a normal working standby state; The starting module is configured to start a multi-task parallel processing mechanism when the electronic recording badge is in the normal working standby state; the multi-task parallel processing mechanism includes parallel processing of a data receiving and unpacking task, a recording task, a recording data sending task, a data sending task, and a positioning task; The guarantee module is configured to adopt a local and enterprise server dual storage strategy to guarantee the completeness of recording data of the electronic recording badge, and to realize data retransmission in communication interruption by using a self-defined protocol.

9. A server for improving the stability of electronic recording sheet operation, characterized by comprising: comprising a memory and a processor; the memory is configured to store computer executable instructions; the processor is configured to execute the computer executable instructions to implement the method of any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores executable instructions, and the computer executes the executable instructions to implement the method of any one of claims 1-7.

Citation Information

Patent Citations

  • Method and device for acquiring abnormal information of recording system, electronic equipment and storage medium

    CN113630504A

  • Intelligent work card information processing method, background management system and intelligent work card

    CN114780941A

  • Recording storage method and device, wearable equipment and readable storage medium

    CN118824299A

  • Unmanned aerial vehicle control system and method based on information collaboration

    CN119396005A

  • Intelligent AI voice work card and management system

    CN220796263U