A data processing method, device, computer equipment and storage medium

By setting buffers in the front-end display thread and adopting different display strategies according to the data traffic status, the problem of poor display integrity when the data volume is small in the aerospace measurement and control field is solved, and the effect of frame loss at the display end is achieved under high traffic conditions is achieved. .

CN115801614BActive Publication Date: 2025-02-07XIAN ZHONGKE TIANTA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211463731.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-22
Publication Date
2025-02-07
Estimated Expiration
2042-11-22

AI Technical Summary

Technical Problem

In the field of aerospace measurement and control, the prior art can easily cause display end blockage when processing large amounts of real-time data, especially when the data volume is small or not processing peaks, and the front-end display is difficult to ensure the integrity of the data.

Method used

By setting buffers in the front-end display thread, monitoring the buffer status, and adopting different display strategies according to the data traffic status, including selecting single-frame data in the middle of the buffer in the high traffic state for display, and in the low traffic state, it is sequentially Select each frame of data to display.

Benefits of technology

It ensures the integrity of data display when the amount of data is small, and realizes the effect of frame loss on the display side without any sense when the amount of data is large, ensuring smooth front-end monitoring and display without affecting the back-end data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115801614B_ABST
    Figure CN115801614B_ABST
Patent Text Reader

Abstract

The present application belongs to the field of data processing technology, and discloses a data processing method, device, computer equipment and storage medium, the method comprising: sending received network data to a front-end display thread, and forwarding the network data to a back-end network processing thread, the network data comprising at least one frame of data; placing the network data into a preset buffer in the front-end display thread, and monitoring the buffer status of the buffer; determining the current data flow status according to the buffer status; and obtaining the data in the buffer for display based on the data flow status. The present application can achieve the effect of ensuring data display integrity when the amount of data is small, and achieving the effect of no sense of frame loss on the display end when the amount of data is large.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a data processing method, device, computer equipment and storage medium. Background Art

[0002] In the field of aerospace measurement and control, real-time monitoring of communication data is a conventional technical requirement. However, due to the time-consuming nature of data display, the display end is often blocked when a large amount of real-time data requires communication interaction. The current conventional processing method is to perform timed point selection display at the front end of the data display. However, although the current timed point selection display gives priority to the resource requirements of the back-end processing, when the amount of data is small or it is not processing the peak, the front end still selects points for display, which inevitably causes some data to be missing on the display end. It can be seen that the existing technology has the problem of poor display integrity when the amount of data is small. Summary of the invention

[0003] The present application provides a data processing method, apparatus, computer equipment and storage medium, which can adopt different display strategies according to different data flow states, so as to ensure the integrity of data display when the data volume is small, and achieve the effect of imperceptible frame loss on the display end when the data volume is large.

[0004] In a first aspect, an embodiment of the present application provides a data processing method, the method comprising:

[0005] Send the received network data to the front-end display thread, and forward the network data to the back-end network processing thread, the network data including at least one frame of data;

[0006] In the front-end display thread, the network data is placed into a preset buffer and the buffer status of the buffer is monitored;

[0007] Determine the current data flow status according to the buffer status;

[0008] Based on the data flow status, obtain the data in the buffer for display;

[0009] When the data flow state is a high flow state, a single frame of data located in the middle of the buffer is selected for display; when the data flow state is a low flow state, each frame of data in the buffer is selected in turn for display.

[0010] In one of the embodiments, the buffer stores the network data in a receiving order, and the length value of the buffer is configured not to exceed a preset first length threshold, and the length value of the buffer is the number of data frames stored in the buffer;

[0011] When the length value of the buffer exceeds the first length threshold, the tail data in the buffer squeezes the head data out of the buffer so that the length value of the buffer does not exceed the preset first length threshold.

[0012] In one embodiment, monitoring a buffer state of a buffer includes:

[0013] After putting the network data into the preset buffer, get the length value of the buffer;

[0014] When the length value is greater than a first length threshold, frame loss processing is performed on the data in the buffer, and a buffer state of the buffer is set to an overflow state;

[0015] When the current buffer length value is less than or equal to the first length threshold, setting the buffer state of the buffer to a non-overflow state;

[0016] The current data flow status is determined based on the buffer status, including:

[0017] When the buffer state is an overflow state and the current length value of the buffer exceeds the second length threshold, determining that the data flow state is a high flow state and the second length threshold is less than the first length threshold;

[0018] When the buffer state is a non-overflow state, it is determined that the data flow state is a low flow state.

[0019] In one of the embodiments, determining the current data flow state according to the buffer state further includes:

[0020] When the buffer state is an overflow state and the current length value of the buffer is less than a second length threshold, determining that the data flow state is a high flow fallback state;

[0021] Based on the data flow status, the data in the buffer is obtained for display, which also includes:

[0022] When the data traffic state is a high traffic fallback state, all frame data are taken out from the buffer at one time for display.

[0023] In one embodiment, the second length threshold is the difference between the first length threshold and the preset number of retained frames; when the data flow state is a high flow state, a single frame of data located in the middle of the buffer is selected for display, including:

[0024] When the data flow state is a high flow state, the kth frame of data in the buffer is selected for display;

[0025] Wherein, k=mn, k is the second length threshold, m is the first length threshold, and n is the preset number of retained frames.

[0026] In one of the embodiments, the front-end display thread includes a slot function;

[0027] Send the received network data to the front-end display thread, including:

[0028] The received network data is published in the form of a preset message, and the preset message is subscribed to through the slot function in the front-end display thread to obtain the network data.

[0029] In one embodiment, forwarding network data to a backend network processing thread includes:

[0030] Identify network data and obtain data source information of the network data;

[0031] According to the preset routing configuration table, the network data is sent to the back-end network processing thread corresponding to the data source information for processing.

[0032] In a second aspect, an embodiment of the present application provides a data processing device, the device comprising:

[0033] The front-end and back-end separation module is used to send the received network data to the front-end display thread and forward the network data to the back-end network processing thread at the same time, and the network data includes at least one frame of data;

[0034] A buffer monitoring module is used to put network data into a preset buffer in the front-end display thread and monitor the buffer status of the buffer;

[0035] A flow state determination module, used to determine the current data flow state according to the buffer state;

[0036] A data display module is used to obtain data in the buffer for display based on the data flow status;

[0037] When the data flow state is a high flow state, a single frame of data located in the middle of the buffer is selected for display; when the data flow state is a low flow state, each frame of data in the buffer is selected in turn for display.

[0038] In a third aspect, an embodiment of the present application provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the steps of the data processing method of any of the above embodiments when executing the computer program.

[0039] In a fourth aspect, an embodiment of the present application 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 data processing method as in any of the above embodiments are implemented.

[0040] In summary, compared with the prior art, the technical solution provided in the embodiment of the present application has at least the following beneficial effects:

[0041] A data processing method provided by an embodiment of the present application can send received network data to a front-end display thread, and forward the network data to a back-end network processing thread at the same time, so as to separate the front-end display from the back-end processing; wherein the network data includes at least one frame of data; in the front-end display thread, the network data is placed in a preset buffer to realize dynamic buffering of the data, and the buffer status of the buffer is monitored; the current data flow status is determined according to the buffer status; based on the data flow status, the data in the buffer is obtained for display; wherein, when the data flow status is a high flow status, a single frame of data located in the middle of the buffer is selected for display; when the data flow status is a low flow status, each frame of data in the buffer is selected in turn for display. The above method can separate the front-end display and back-end processing of data, and ensure that the display end is not blocked while the data processed at the back-end is not lost; at the same time, the current data flow state is judged by the buffer state, and the front-end display mode is controlled according to the data flow state. When the data flow is large, some frames are allowed to be visually lost, that is, the display end is not affected by frame loss, but when the data flow is reduced, the data can be displayed completely, that is, different display strategies are adopted for different data flow states to simultaneously meet the requirements of data display integrity and display end being not affected by frame loss, thereby ensuring that the user's front-end monitoring display is smooth and has no impact on the back-end data processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 An application scenario diagram of a data processing method provided for an exemplary embodiment of the present application.

[0043] Figure 2 A flowchart of a data processing method provided for an exemplary embodiment of the present application.

[0044] Figure 3 A structural diagram of a data processing device provided for an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0045] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part 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 ordinary technicians in this field without creative work are within the scope of protection of this application.

[0046] See also Figure 1 and Figure 2The embodiment of the present application provides a data processing method, which is described by taking a terminal with a routing forwarding and monitoring node as an execution subject, and is applied to Figure 1 In the application scenario, the routing forwarding and monitoring nodes receive data sent from the measurement and control processing center, multiple measurement stations and other data processing systems. In real-time data processing, the forwarding and monitoring nodes are often unable to predict the data flow in advance, making it difficult to meet the user's demand for displaying data frames as complete as possible while ensuring that the back-end data processing does not lose frames.

[0047] The method may include the following steps:

[0048] Step S1, sending the received network data to the front-end display thread, and forwarding the network data to the back-end network processing thread at the same time, the network data includes at least one frame of data.

[0049] Among them, network data can come from multiple different data sources. In the aerospace measurement and control application scenario, network data is mainly multi-directional measurement and control binary frame data encapsulated by a specific communication frame protocol, usually including external measurement and telemetry raw data sent by the measurement station to the measurement and control processing center, remote control command data sent by the measurement and control processing center to the measurement station, and processing result data sent by other data processing systems to the measurement and control processing center, etc. Therefore, it has the characteristics of uncertain traffic, diverse directions, and high real-time requirements.

[0050] In one embodiment, the front-end display thread includes a slot function. In step S1, the received network data is sent to the front-end display thread, including: publishing the received network data in the form of a preset message, and subscribing to the preset message through the slot function in the front-end display thread to obtain the network data.

[0051] The front-end display thread is a processing class instance that contains a slot function. The slot function inside it is associated with a preset message by subscription, and will be triggered when receiving the preset message to obtain network data. In specific implementation, the two operations of publishing network data in the form of a preset message and forwarding network data to the back-end network processing thread can be completed at the same time.

[0052] In this implementation, the subscription function of the slot function is used to achieve the separation of the processing flow and the display flow, that is, the back-end data routing thread and the front-end display thread are effectively separated. The front-end display thread only needs to perform corresponding processing on the display data without affecting the back-end work.

[0053] In one embodiment, in step S1, forwarding network data to a backend network processing thread includes: identifying the network data to obtain data source information of the network data; and sending the network data to a backend network processing thread corresponding to the data source information for processing according to a preset routing configuration table. The above embodiment can assign network data from different data sources to different backend network processing threads for processing, thereby realizing multi-threaded processing of the backend.

[0054] A routing configuration table is pre-established, in which network reception of different threads can be established according to different data source directions, so as to distribute network data from different directions to different back-end network processing threads.

[0055] In the specific implementation, in order to ensure that data processing does not lose frames, the signal-slot mechanism in the QT software can be used to decouple the network data forwarding processing and data display, and divide them into two processing flows for separate processing. Among them, QT software is an existing cross-platform C++ graphical user interface application development framework.

[0056] Step S2, putting the network data into a preset buffer in the front-end display thread, and monitoring the buffer status of the buffer.

[0057] In one embodiment, the buffer stores network data in a receiving order, and the length value of the buffer is configured not to exceed a preset first length threshold, and the length value of the buffer is the number of data frames stored in the buffer. When the length value of the buffer exceeds the first length threshold, the tail data in the buffer squeezes the head data out of the buffer so that the length value of the buffer does not exceed the preset first length threshold.

[0058] The first length threshold may be the number of data frames that the buffer can accommodate. When the buffer does not exceed the first length threshold, the length of the buffer increases or decreases dynamically, that is, when a frame of data is received, the length increases by 1, and when a frame of data is used, the length decreases by 1. Specifically, the buffer stores the received network data in the order in which the data is received, that is, the later data is placed at the end of the buffer, and the head of the buffer is the data placed previously. According to the first-in-first-out principle, when the number of data frames received in the buffer exceeds the first length threshold, the data stored in the buffer is subjected to frame loss processing, and the tail data in the buffer squeezes the head data out of the buffer.

[0059] In specific implementation, since the received data may come from different directions, there will be a need to process and display multiple data frames in a short time. If the front end performs frame skipping or full-frame display for all data, it is not appropriate. Frame skipping will cause obvious frame loss when the data volume is small, and full-frame display will cause the display front end to be blocked due to the problem of display resources. Both methods cannot meet the monitoring and display requirements. This implementation can have different display effects at the monitoring and display end according to different data flow rates. For example, there will be no frame loss when the data throughput is small, and no blocking when the data throughput is large. Therefore, this method establishes a buffer for display data to perform dynamic buffer storage of data.

[0060] Step S3, determining the current data flow state according to the buffer state.

[0061] Among them, the buffer state may include an overflow state and a non-overflow state; specifically, the current data flow state can be judged based on whether the buffer is in an overflow state; the current data flow state can also be judged by combining the buffer state and an auxiliary variable, and the auxiliary variable can be the number of data frames currently stored in the buffer.

[0062] Step S4, based on the data flow status, obtain the data in the buffer for display.

[0063] In step S4, when the data flow state is a high flow state, a single frame of data located in the middle position of the buffer is selected for display. At this time, by selecting the frame in the middle position of the buffer as the current display frame, the previous and next data of the current display frame can be retained; when the data flow state is a low flow state, each frame of data in the buffer is selected in turn for display to ensure the integrity of the display when the data is small.

[0064] The above embodiment provides a data processing method, which can send the received network data to the front-end display thread and forward the network data to the back-end network processing thread to separate the front-end display and the back-end processing; wherein the network data includes at least one frame of data; in the front-end display thread, the network data is placed in a preset buffer to realize dynamic buffering of data, and the buffer status of the buffer is monitored; the current data flow status is determined according to the buffer status; based on the data flow status, the data in the buffer is obtained for display; wherein, when the data flow status is a high flow status, a single frame of data located in the middle position of the buffer is selected for display; when the data flow status is a low flow status, each frame of data in the buffer is selected in turn for display. The above method can separate the front-end display and back-end processing of data, and ensure that the display end is not blocked while the data processed at the back-end is not lost; at the same time, the current data flow state is judged by the buffer state, and the front-end display mode is controlled according to the data flow state. When the data flow is large, some frames are allowed to be visually lost, that is, the display end is not affected by frame loss, but when the data flow is reduced, the data can be displayed completely, that is, different display strategies are adopted for different data flow states to simultaneously meet the requirements of data display integrity and display end being not affected by frame loss, thereby ensuring that the user's front-end monitoring display is smooth and has no impact on the back-end data processing.

[0065] In some embodiments, in step S2, monitoring the buffer state of the buffer specifically includes the following steps:

[0066] After putting the network data into the preset buffer, get the length value of the buffer.

[0067] When the length value is greater than the first length threshold, frame loss processing is performed on the data in the buffer, and the buffer state of the buffer is set to an overflow state.

[0068] When the current buffer length value is less than or equal to the first length threshold, the buffer state of the buffer is set to a non-overflow state.

[0069] In specific implementation, a Boolean variable rec_state can be established to mark whether the buffer overflows. True indicates that the buffer is in an overflow state, and false indicates that the buffer has not reached an overflow state, that is, the buffer is in a non-overflow state. After the network data to be displayed is placed in the buffer, it is determined whether the buffer is currently overflowing. Specifically, the buffer length value is compared with the first length threshold to determine the buffer state.

[0070] Then, when data is to be retrieved for display, the current data flow state is determined, and relevant display processing is performed according to the current data flow state. Step S3 specifically includes the following steps:

[0071] When the buffer state is an overflow state and the current length value of the buffer exceeds the second length threshold, it is determined that the data flow state is a high flow state, and the second length threshold is less than the first length threshold.

[0072] When the buffer state is a non-overflow state, it is determined that the data flow state is a low flow state.

[0073] In one embodiment, the second length threshold is the difference between the first length threshold and the preset number of retained frames. k can be set as the second length threshold, m as the first length threshold, and n as the preset number of retained frames, that is, the number of data frames that the user requires to be retained before and after the current display frame; then k=mn.

[0074] When the data flow state is a high flow state, a single frame of data located in the middle of the buffer is selected for display, including: when the data flow state is a high flow state, the kth frame of data in the buffer is selected for display.

[0075] The above implementation can obtain n frames of data before and after the current display frame when pausing, so that when the user has questions about the current display frame, the user can retrieve the data near it for further understanding of the data. For example, in order to ensure that 5 frames before and after the current display frame can be obtained when pausing, the first length threshold of the buffer can be set to any integer value greater than 10.

[0076] In some embodiments, step S3 further includes the following steps:

[0077] When the buffer state is in an overflow state and the current length value of the buffer is less than the second length threshold, it is determined that the data flow state is in a high flow fallback state.

[0078] Step S5 also includes the following steps: when the data flow state is a high flow fallback state, all frame data are taken out from the buffer at one time for display.

[0079] During the specific implementation, when the buffer receives network data, the terminal can determine its status:

[0080] When the data exceeds the first length threshold, it means that the data flow is too large and the buffer needs to perform frame drop processing, that is, the buffer header data is pushed out and the buffer state is set to true;

[0081] If the buffer state is true, and the buffer is greater than the second length threshold, it means that the data flow is too large and frames need to be dropped continuously. In order to ensure that the processing requirements of the 5 frames before and after the pause operation can be obtained, the number of retained frames is set to 5, and the display frame at this time is set to the data frame whose sorting is equal to the position of the second length threshold, so that the data of the 10 frames before and after can be supplemented in the pause state;

[0082] If the buffer status is true and the buffer is less than the second length threshold, it means that the data flow is reduced at this time, the current buffer has not overflowed, and there is no need to drop frames, but the data is in a state of falling back from high flow. At this time, display resources are still tight. Therefore, all data is taken out and displayed at one time, which can reduce the number of interactions and improve display efficiency.

[0083] If the buffer status is false, it means that the data flow is small and the display resources are sufficient, so one frame is displayed at a time.

[0084] In actual application scenarios, since users have high requirements for data accuracy, response speed, and display performance, when data throughput is low, users require that all frames must not be lost and must be displayed as timely as possible; when data throughput is large and resources are tight, users require that display must not be blocked and that overall smooth performance must be guaranteed; at the beginning of a task, users require that data be displayed in a timely manner without frame loss; when paused, in addition to the current frame, data within a certain range before and after is required to be obtained for subsequent analysis; at the end of a task, it is required that the last frame be observed from monitoring without abnormality or frame loss. Therefore, different display strategies need to be established for different data flows and states, as follows:

[0085] (1) Low-traffic display strategy: All frames received in the buffer are displayed one by one, and no frame loss or frame skipping can be observed from the front end;

[0086] (2) High-traffic display strategy: The front-end display and switching of the page are smooth without affecting the back-end processing. No obvious delay or blocking phenomenon is observed. When the page is paused, except for the current frame, the data frames within a certain interval before and after it are complete and reproducible.

[0087] (3) High-traffic fallback display strategy: All data in the buffer is taken out and displayed at once, which can reduce the number of interactions and improve display efficiency;

[0088] (4) Initial status display strategy: The received frames are displayed complete and timely, without frame loss or frame skipping;

[0089] (5) End state display strategy: A certain range of frames counting down from the last frame are displayed completely and reproducibly.

[0090] Among them, the low flow display strategy, high flow display strategy and high flow fallback display strategy correspond to the display modes adopted in the high flow state, low flow state and high flow fallback state respectively, which can be realized by the data processing method in this embodiment. In specific implementation, the initial state and the end state can be merged with the low flow display strategy, so theoretically as long as correct reception is guaranteed, the initial state display strategy and the end state display strategy should be realized, so as to ensure the integrity of the start and end frame data of the monitoring data, that is, to ensure the monitoring immediacy and monitoring integrity of data reception.

[0091] In the above embodiment, the method can identify the data traffic status and select different display strategies for different data traffic status to meet the user's needs for data display integrity and no sense of frame loss on the display end in different situations, thereby ensuring smooth front-end monitoring display and no impact on back-end data processing.

[0092] See also Figure 3 Another embodiment of the present application provides a data processing device, the device comprising:

[0093] The front-end and back-end separation module 101 is used to send the received network data to the front-end display thread and forward the network data to the back-end network processing thread at the same time. The network data includes at least one frame of data.

[0094] The buffer monitoring module 102 is used to put the network data into a preset buffer in the front-end display thread and monitor the buffer status of the buffer.

[0095] The flow state determination module 103 is used to determine the current data flow state according to the buffer state.

[0096] The data display module 104 is used to obtain the data in the buffer for display based on the data flow status; when the data flow status is a high flow status, a single frame of data located in the middle of the buffer is selected for display; when the data flow status is a low flow status, each frame of data in the buffer is selected in turn for display.

[0097] The specific definition of the data processing device provided in this embodiment can be found in the above embodiment of the data processing method, which will not be repeated here. Each module in the above data processing device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0098] The embodiment of the present application provides a computer device, which may include a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the processor executes the steps of the data processing method as in any of the above embodiments.

[0099] The working process, working details and technical effects of the computer device provided in this embodiment can be found in the above embodiments of the data processing method, and will not be described in detail here.

[0100] The embodiment of the present application 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 data processing method in any of the above embodiments are implemented. The computer-readable storage medium refers to a carrier for storing data, which may include but is not limited to a floppy disk, an optical disk, a hard disk, a flash memory, a USB flash drive and / or a memory stick, etc. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.

[0101] The working process, working details and technical effects of the computer-readable storage medium provided in this embodiment can be found in the above embodiments of the data processing method, and will not be described in detail here.

[0102] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0103] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0104] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A data processing method, characterized in that: The method comprises: Sending the received network data to the front-end display thread, and forwarding the network data to the back-end network processing thread, the network data including at least one frame of data; Putting the network data into a preset buffer in the front-end display thread, and monitoring the buffer status of the buffer; Determine the current data flow state according to the buffer state; Based on the data flow status, acquiring the data in the buffer for display; Among them, when the data flow state is a high flow state, a single frame of data located in the middle position of the buffer is selected for display; when the data flow state is a low flow state, each frame of data in the buffer is selected in turn for display.

2. The method according to claim 1, characterized in that The buffer stores the network data in a receiving order, and the length value of the buffer is configured not to exceed a preset first length threshold, and the length value of the buffer is the number of data frames stored in the buffer; When the length value of the buffer exceeds the first length threshold, the tail data in the buffer squeezes the head data out of the buffer so that the length value of the buffer does not exceed the preset first length threshold.

3. The method according to claim 2, characterized in that The monitoring of the buffer state of the buffer comprises: After placing the network data into a preset buffer, obtaining the length value of the buffer; When the length value is greater than the first length threshold, performing frame loss processing on the data in the buffer and setting the buffer state of the buffer to an overflow state; When the current buffer length value is less than or equal to the first length threshold, setting the buffer state of the buffer to a non-overflow state; The determining the current data flow state according to the buffer state includes: When the buffer state is an overflow state and the current length value of the buffer exceeds a second length threshold, determining that the data flow state is a high flow state, and the second length threshold is less than the first length threshold; When the buffer state is a non-overflow state, it is determined that the data flow state is a low flow state.

4. The method according to claim 3, characterized in that The determining of the current data flow state according to the buffer state further includes: When the buffer state is an overflow state and the current length value of the buffer is less than the second length threshold, determining that the data flow state is a high flow fallback state; The acquiring the data in the buffer for display based on the data flow state further includes: When the data flow state is a high flow fallback state, all frame data are taken out from the buffer at one time for display.

5. The method according to claim 4, characterized in that The second length threshold is the difference between the first length threshold and the preset number of retained frames; when the data flow state is a high flow state, selecting a single frame of data located in the middle of the buffer for display includes: When the data flow state is a high flow state, selecting the kth frame of data in the buffer for display; Among them, k=mn, k is the second length threshold, m is the first length threshold, and n is the preset number of retained frames.

6. The method according to any one of claims 1 to 5, characterized in that: The front-end display thread includes a slot function; The sending of the received network data to the front-end display thread comprises: The received network data is published in the form of a preset message, and the preset message is subscribed to through the slot function in the front-end display thread to obtain the network data.

7. The method according to claim 6, characterized in that The forwarding of the network data to a backend network processing thread includes: Identifying the network data to obtain data source information of the network data; The network data is sent to a back-end network processing thread corresponding to the data source information for processing according to a preset routing configuration table.

8. A data processing device, characterized in that: The device comprises: A front-end and back-end separation module, used to send the received network data to the front-end display thread and forward the network data to the back-end network processing thread, wherein the network data includes at least one frame of data; A buffer monitoring module, used for placing the network data into a preset buffer in the front-end display thread and monitoring the buffer status of the buffer; A flow state determination module, used to determine the current data flow state according to the buffer state; A data display module, used for acquiring the data in the buffer for display based on the data flow status; Among them, when the data flow state is a high flow state, a single frame of data located in the middle position of the buffer is selected for display; when the data flow state is a low flow state, each frame of data in the buffer is selected in turn for display.

9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Warehouse video monitoring system based on edge computing

    CN110913181A

  • Display device and display method

    CN111836104A