Data processing method, device, electronic device and storage medium
By using the memory sharing mechanism of data storage queues in embedded systems, the problems of frequent memory copies and low data processing efficiency in embedded systems are solved, real-time storage and efficient access are achieved, and computing resource consumption is reduced.
Patent Information
- Application Number
- CN202410301117.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-15
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2044-03-15
AI Technical Summary
Due to the limited memory space of embedded systems, frequent data updates require memory copies, which makes it difficult to meet the real-time needs of data processing and results in low data processing efficiency.
Obtain sampling data through data acquisition equipment, generate time slices and send them to data processing equipment. The memory sharing mechanism of the data storage queue is used to avoid frequent memory copies and improve data access efficiency.
While ensuring real-time storage of sampled data, it reduces computing resource consumption, improves data access efficiency, and solves the problems of frequent memory copies and low data processing efficiency.
Smart Images

Figure CN118034605B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a data processing method, device, electronic equipment and storage medium. Background Art
[0002] In-memory databases are databases that store data in memory and can directly operate on the data. The speed of data reading and writing in memory is much higher than that of disks. Therefore, storing data in memory for access can greatly improve data processing performance.
[0003] Embedded systems usually have a large transaction volume and require rapid transaction response and reliable data processing, which is suitable for using in-memory databases for data storage. The existing data processing methods configured in embedded systems can ensure the stability of data storage and maintain data integrity and consistency. However, due to limited memory space, for the sampled data continuously input by the embedded system, data updates require frequent memory copies, which is difficult to meet the real-time requirements of data processing.
[0004] Therefore, an improved data processing solution based on in-memory database is needed to adapt to the data processing requirements of embedded systems. Summary of the invention
[0005] The present invention provides a data processing method, device, equipment and storage medium to solve the problems of frequent memory copying and low data processing efficiency in embedded systems. It can reduce computing resource loss and improve data access efficiency while ensuring real-time storage of sampled data.
[0006] According to one aspect of the present invention, a data processing method is provided, the method being executed by an embedded system, the embedded system comprising a data acquisition device and a data processing device; the method comprising:
[0007] Acquire sampling data of the current sampling period through a data acquisition device;
[0008] Generate a time slice matching the current sampling period by using the sampled data through a data acquisition device according to the pre-acquired signal constraint information, and send the time slice to a data processing device;
[0009] The data processing device determines the queue position matching the time slice according to the data storage queue updated in the previous sampling cycle, stores the time slice in the storage space matching the queue position, and obtains the data storage queue updated in the current sampling cycle.
[0010] According to another aspect of the present invention, a data processing device is provided, wherein the device is configured in an embedded system, wherein the embedded system includes a data acquisition device and a data processing device; the device includes:
[0011] A sampling data acquisition module is used to acquire the sampling data of the current sampling period through a data acquisition device;
[0012] A time slice generation module, used to generate a time slice matching the current sampling period by using the sampled data through a data acquisition device according to the pre-acquired signal constraint information, and send the time slice to a data processing device;
[0013] The time slice storage module is used to determine the queue position matching the time slice according to the data storage queue updated in the previous sampling cycle through the data processing device, store the time slice in the storage space matching the queue position, and obtain the data storage queue updated in the current sampling cycle.
[0014] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0015] At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the data processing method described in any embodiment of the present invention.
[0016] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the data processing method described in any embodiment of the present invention when executed.
[0017] The technical solution of the embodiment of the present invention is to obtain the sampling data of the current sampling period through a data acquisition device; the data acquisition device generates a time slice matching the current sampling period by using the sampling data according to the pre-acquired signal constraint information, and sends the time slice to the data processing device; the data processing device determines the queue position matching the time slice according to the data storage queue updated in the previous sampling period, stores the time slice in the storage space matching the queue position, and obtains the data storage queue updated in the current sampling period. This technical solution solves the problems of frequent memory copying and low data processing efficiency in embedded systems through memory sharing of data storage queues, and can reduce computing resource loss and improve data access efficiency while ensuring real-time storage of sampling data.
[0018] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0020] Figure 1 is a flow chart of a data processing method provided according to Embodiment 1 of the present invention;
[0021] Figure 2A is a flow chart of a data processing method provided according to Embodiment 2 of the present invention;
[0022] Figure 2B is a schematic diagram of the distribution position of the sampling signal in the time slice provided by the second embodiment of the present invention;
[0023] Figure 2C This is a schematic diagram of a data storage queue provided according to Embodiment 2 of the present invention;
[0024] Figure 2D is a schematic diagram of another data storage queue provided according to the second embodiment of the present invention;
[0025] Figure 3 is a structural schematic diagram of a data processing device provided according to Embodiment 3 of the present invention;
[0026] Figure 4 It is a structural schematic diagram of an electronic device for implementing the data processing method of an embodiment of the present invention. DETAILED DESCRIPTION
[0027] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices. The acquisition, storage, use, processing, etc. of data in the technical solution of this application comply with the relevant provisions of national laws and regulations.
[0029] Embodiment 1
[0030] Figure 1 A flowchart of a data processing method is provided for the first embodiment of the present invention. This embodiment can be applied to data processing scenarios of embedded systems in environments such as smart grids and smart factories. The method can be executed by a data processing device, which can be implemented in the form of hardware and / or software, and can be configured in an electronic device. Figure 1 As shown, the method includes:
[0031] S110 . Acquire sampling data of the current sampling period through a data acquisition device.
[0032] This solution can be executed by an embedded system, and the embedded system may include a data acquisition device and a data processing device. The data acquisition device may be used to collect the operating status information of the production equipment, such as using a voltage sensor to collect the working voltage of the robot arm. The data acquisition device may be various types of data sensors, such as current sensors, pressure sensors, temperature sensors, humidity sensors, and image sensors. The data acquisition device may obtain the sampling data of the current sampling period according to a preset sampling period.
[0033] The sampled data may include one or more types of sampled signals, and the types of sampled signals may include voltage signals, current signals, temperature signals, humidity signals, pressure signals, etc. In the case where there are multiple data acquisition devices, the sampling period of each data acquisition device may be the same sampling period to ensure synchronous acquisition of each sampled signal.
[0034] It is understandable that the data acquisition device and the data processing device can communicate, and the data acquisition device can package the sampled data and send it to the data processing device. The data processing device can receive the sampled data from the data acquisition device and manage the sampled data, such as storing, editing, querying and analyzing the sampled data.
[0035] S120 , using the sampled data and the data acquisition device according to the pre-acquired signal constraint information, to generate a time slice matching the current sampling period, and sending the time slice to the data processing device.
[0036] The embedded system can pre-set signal constraint information, such as the data type, storage format, and arrangement order of the sampled signal. After completing the setting of the signal constraint information, the embedded system synchronizes the signal constraint information to the data acquisition device and the data processing device. The data acquisition device can process the sampled data according to the signal constraint information to generate a time slice corresponding to the current sampling period. It can be understood that the timestamp of the time slice can be the endpoint moment of the current sampling period, such as the starting moment of the current sampling period. After obtaining the time slice of the current sampling period, the data acquisition device can send the time slice to the data processing device for data storage through the data processing device.
[0037] S130, determining the queue position matching the time slice according to the data storage queue updated in the previous sampling period through a data processing device, storing the time slice in the storage space matching the queue position, and obtaining the data storage queue updated in the current sampling period.
[0038] It is understandable that a memory database may be configured in the data processing device to store sampled data that is smaller than the memory space tolerance. The data processing device may generate a memory pool in the memory database according to the amount of data in each time slice, and the memory pool may accommodate an integer number of time slices. According to the number of time slices accommodated in the memory pool, the data processing device may generate a data storage queue. Each time slice may correspond to a data element in the data storage queue, and each time slice may correspond to a fixed-capacity storage space in the memory pool. Therefore, each data element in the data storage queue may correspond to a fixed-capacity storage space, and each storage space may store a time slice of a sampling period.
[0039] The data processing device can receive the time slice of the current sampling cycle sent by the data acquisition device. Based on the data storage queue updated in the previous sampling cycle, the data processing device can determine the position of the earliest updated data element in the data storage queue, and use the position of the earliest updated data element as the queue position corresponding to the time slice of the current sampling cycle. The data processing device can store the time slice of the current sampling cycle in the storage space matched by the queue position to obtain the data storage queue updated in the current sampling cycle.
[0040] It is easy to understand that the existing memory database management is to perform a memory copy in the memory database according to the amount of data in the time slice after receiving the time slice of the current sampling period, and then store the time slice in the storage space of the new copy. After the memory database reaches the storage limit, the storage space where the time slice is located is released. Therefore, in the data management process, multiple memory copies are required, wasting a lot of computing resources. This solution can realize memory sharing by building a data storage queue in the memory database. There is no need to repeatedly copy the memory each time a new time slice is received, which greatly saves computing resources.
[0041] The technical solution of the embodiment of the present invention is to obtain the sampling data of the current sampling period through a data acquisition device; the data acquisition device generates a time slice matching the current sampling period by using the sampling data according to the pre-acquired signal constraint information, and sends the time slice to the data processing device; the data processing device determines the queue position matching the time slice according to the data storage queue updated in the previous sampling period, stores the time slice in the storage space matching the queue position, and obtains the data storage queue updated in the current sampling period. This technical solution solves the problems of frequent memory copying and low data processing efficiency in embedded systems through memory sharing of data storage queues, and can reduce computing resource loss and improve data access efficiency while ensuring real-time storage of sampling data.
[0042] Embodiment 2
[0043] Figure 2A This is a flow chart of a data processing method provided by Embodiment 2 of the present invention. This embodiment is based on the above embodiment and refines the page return process. Figure 2A As shown, the method includes:
[0044] S210: Acquire sampling data of the current sampling period through a data acquisition device.
[0045] In this solution, the sampled data includes at least two sampled signals; the signal constraint information includes the distribution position of each sampled signal and the data type of each sampled signal. The distribution position may be the distribution position of each sampled signal in a time slice, the data type may be determined based on the data range and data precision of each sampled signal, and the data type may include integer, floating point, enumeration, Boolean and other data types.
[0046] The embedded system can set the data type of each sampled signal in advance according to the signal acquisition accuracy of the data acquisition device and the accuracy requirements of the data processing device for each sampled signal. According to the data type of each sampled signal and the association relationship of each sampled signal, the distribution position of each sampled signal in the time slice is set. Among them, the association relationship of each sampled signal can include the calculation relationship, belonging relationship and attribute consistency relationship between the sampled signals. For example, signal 1 is the working voltage of the production equipment, signal 2 is the working current of the production equipment, and the data processing device needs to calculate the power of the production equipment according to signal 1 and signal 2, then signal 1 and signal 2 have a calculation relationship. Signal 3 is a temperature signal, signal 4 is a humidity signal, and signal 3 and signal 4 are both signals of the same production equipment, then signal 3 and signal 4 have the same belonging relationship. Signal 5 and signal 6 are both voltage signals, then the signal attributes of signal 5 and signal 6 are consistent.
[0047] S220 , using a data acquisition device to fill each sampling signal into a pre-acquired time slice template according to the distribution position of each sampling signal, to obtain a time slice matching the current sampling period.
[0048] The time slice template is generated based on the distribution position of each sampling signal and the data type of each sampling signal. Figure 2B FIG. 1 is a schematic diagram of the distribution position of the sampling signal in the time slice according to the second embodiment of the present invention. Figure 2B As shown, the time slice allocates a storage space for each sampled signal, and the size of the storage space can be determined according to the data type of the sampled signal.
[0049] The data acquisition device can generate a time slice template according to the distribution position of each sampling signal in the time slice, fill each sampling signal into the time slice template in turn, obtain the time slice outputted in the current sampling cycle, and send the time slice to the data processing device.
[0050] S230 , determining the tail position of the data storage queue according to the data storage queue updated in the previous sampling period by a data processing device.
[0051] It can be understood that a queue is a data structure in which data elements are first-in, first-out. The number of data elements in the data storage queue is limited, and the data elements in the data storage queue are updated once in each sampling period. The data processing device can obtain the data storage queue updated in the previous sampling period, and determine the tail position of the data storage queue updated in the previous sampling period, that is, the position of the most recent data element update.
[0052] S240: Determine the queue position that matches the time slice according to the queue tail position and the pre-acquired queue length.
[0053] The queue length indicates the number of data elements in the data storage queue. Based on the queue length and the tail position, the data processing device can determine whether the data storage queue updated in the previous sampling cycle is full. It can be understood that the tail position in the data storage queue marks the entry of the time slice, and the head position marks the exit of the time slice. The tail position of the data storage queue is the storage position of the time slice of the previous sampling cycle. Therefore, if the data storage queue updated in the previous sampling cycle is not full, the next position of the tail position is used as the queue position corresponding to the time slice of the current sampling cycle. If the data storage queue updated in the previous sampling cycle is full, based on the tail position and the queue length, the data processing device can locate the queue position where the data element is updated earliest in the data storage queue updated in the previous sampling cycle, and use the queue position as the queue position corresponding to the time slice of the current sampling cycle.
[0054] S250: Store the time slice into a storage space that matches the queue position, and obtain a data storage queue updated in the current sampling period.
[0055] If the data storage queue updated in the previous sampling period is not full, the data processing device can directly store the time slice of the current sampling period in the storage space corresponding to the queue position. If the data storage queue updated in the previous sampling period is full, the storage space corresponding to the queue position is released, and then the time slice of the current sampling period is stored in the storage space corresponding to the queue position. After storing the time slice of the current sampling period in the data storage queue, the data processing device can output the data storage queue updated in the current sampling period.
[0056] Figure 2C is a schematic diagram of a data storage queue provided according to Embodiment 2 of the present invention. Figure 2D FIG. 1 is another schematic diagram of a data storage queue provided according to Embodiment 2 of the present invention. Figure 2C and Figure 2D As shown, each data element in the data storage queue may correspond to a time slice of a sampling period. Figure 2DThe data storage queue shown is a circular queue connected end to end. When a data element in the circular queue is used up, the remaining data elements do not need to move their storage locations. Figure 2C In the ordinary queue shown, after one data element is used up, the remaining data elements need to be moved forward. Therefore, the circular queue can significantly improve the data storage efficiency.
[0057] In a specific example, the data storage queue includes 10,000 data elements in total. When the data storage queue updated in the previous sampling period is full, the data storage queue has stored the time slices of the previous 10,000 sampling periods. The current sampling period is the time slice of the 10001st sampling period, and the data processing device can release the storage space of the first data element, that is, delete the time slice of the first sampling period, and store the time slice of the 10001st sampling period in the storage space of the first data element.
[0058] Based on the above solution, optionally, after storing the time slice in the storage space matching the queue position, the method further includes:
[0059] The tail position of the data storage queue is updated according to the queue position matched by the time slice.
[0060] After storing the time slice of the current sampling cycle in the data storage queue, the data processing device may use the queue position corresponding to the time slice of the current sampling cycle as the new queue tail position to provide a positioning basis for storing the time slice of the next sampling cycle.
[0061] S260: In response to a data query request from a user terminal, determine a query target according to the data query request.
[0062] The data processing device can communicate with one or more user terminals, allowing each user terminal to obtain sampled data, and responding to various processing requests of each user terminal for the sampled data, such as editing requests, downloading requests, etc. The user terminal usually has a certain operating range for processing the sampled data, so it is necessary to continue to query the data in the memory database of the data processing device to obtain the target data and perform adaptive processing on the target data.
[0063] The user terminal may generate a data query request according to the user's data query operation, such as inputting the name of the data to be queried. The data query request may include information such as the request time, the requesting user identifier, the time range of the data to be queried, the signal type, and the device identifier. The data processing device may respond to the data query request and extract the query target from the data query request. The query target may be the description information of the data to be queried, such as the time range of the data to be queried, the signal type, and the device identifier.
[0064] S270: According to the query target, determine the target data in the data storage queue updated in the current sampling period, and feed back the target data to the user terminal.
[0065] According to the query target, the data processing device can perform data query in the data storage queue updated in the current sampling period, output the target data matching the query target, and feed it back to the user terminal.
[0066] In a feasible solution, the query target includes a target time and a target signal;
[0067] Determining target data in a data storage queue updated in a current sampling period according to the query target includes:
[0068] Determine the queryable time range based on the data storage queue updated in the current sampling period;
[0069] If the target time is within the queryable time range, determining a target time slice in the data storage queue updated in the current sampling period according to the target time;
[0070] Target data is determined in the target time slice according to the target signal.
[0071] In this solution, the target time may be a time point of the data to be queried or a time coverage range of the data to be queried; the target signal may be a signal identifier of the data to be queried, which may be one or may include multiple signals. The data processing device may obtain the timestamps of each time slice stored in the data storage queue updated in the current sampling period, and determine the time range available for query in the memory database at the current moment according to the timestamps of each time slice. The data processing device may compare the target time with the queryable time range. If the target time is within the queryable time range of the memory database at the current moment, the target time slice is determined in the data storage queue updated in the current sampling period according to the target time. After determining the target time slice, the data processing device may locate the target signal in the target time slice according to the distribution position of each sampling signal in the time slice, thereby obtaining the target data. If the target time is not within the queryable time range of the memory database at the current moment, it means that the target time has expired, and the time slice matching the target time in the memory database at the current moment has been released, and the target data cannot be queried.
[0072] This solution can realize fast data query and meet users' needs for obtaining sampling data.
[0073] In another feasible solution, the sampling signal is an offset of an initial sampling value; the signal constraint information also includes an initial sampling value of each sampling signal;
[0074] The step of determining target data in the target time slice according to the target signal includes:
[0075] Determining an offset of a target signal in the target time slice, and determining an initial sampling value of the target signal in the signal constraint information;
[0076] Target data is generated according to the offset and the initial sampling value.
[0077] It is easy to understand that storing the full value of some sampling signals requires a large storage space. If the full value of the sampling signal is only stored at the initial sampling, and the offset of the sampling signal relative to the initial sampling value is stored in the sampling after the first time, the storage capacity required for the sampling signal can be greatly saved and the storage utilization rate of the memory database can be improved.
[0078] In this scheme, the sampling signal can be the offset of the initial sampling value. The data processing device can locate the offset of the target signal in the target time slice, and needs to obtain the initial sampling value of the target signal in the signal constraint information. According to the offset and initial sampling value of the target signal, the full value of the target signal is calculated to obtain the target data.
[0079] The above scheme can effectively reduce the amount of data in a single sampling time slice, improve the memory utilization of the memory database, and save the sampling data of more sampling cycles.
[0080] The technical solution of the embodiment of the present invention obtains the model structure information of the task to be executed, determines the computing core division result and the storage resource division result according to the model structure information, and then determines the pipeline window division result according to the computing core division result and the storage resource division result, so as to schedule the task to be executed according to the pipeline window division result. This technical solution solves the problem that the task scheduling method oriented to computing power is not compatible with the storage and computing integrated chip, and can improve the hardware resource utilization of the storage and computing integrated chip while ensuring the task execution efficiency and reducing the power consumption of the hardware equipment.
[0081] Embodiment 3
[0082] Figure 3 The structure diagram of a data processing device provided in the third embodiment of the present invention is shown in FIG. The device is configured in an embedded system, and the embedded system includes a data acquisition device and a data processing device. Figure 3 As shown, the device comprises:
[0083] The sampling data acquisition module 310 is used to acquire the sampling data of the current sampling period through a data acquisition device;
[0084] The time slice generating module 320 is used to generate a time slice matching the current sampling period by using the sampled data according to the pre-acquired signal constraint information through the data acquisition device, and send the time slice to the data processing device;
[0085] The time slice storage module 330 is used to determine the queue position matching the time slice according to the data storage queue updated in the previous sampling cycle through the data processing device, store the time slice to the storage space matching the queue position, and obtain the data storage queue updated in the current sampling cycle.
[0086] In this solution, optionally, the sampled data includes at least two sampled signals; the signal constraint information includes the distribution position of each sampled signal and the data type of each sampled signal;
[0087] The time slice generating module 320 is specifically used for:
[0088] Through the data acquisition device, each sampling signal is filled into the pre-acquired time slice template according to the distribution position of each sampling signal, so as to obtain the time slice matching the current sampling period; wherein, the time slice template is generated based on the distribution position of each sampling signal and the data type of each sampling signal.
[0089] In this embodiment, the time slice storage module 330 includes a queue position determination unit, and the queue position determination unit is used to:
[0090] Determine the tail position of the data storage queue according to the data storage queue updated in the previous sampling period by a data processing device;
[0091] The queue position matching the time slice is determined according to the queue tail position and the pre-acquired queue length.
[0092] Based on the above solution, optionally, the time slice storage module 330 is further used for:
[0093] After the time slice is stored in the storage space matched with the queue position, the tail position of the data storage queue is updated according to the queue position matched with the time slice.
[0094] Optionally, the device further comprises:
[0095] A query target determination module, configured to determine a query target in response to a data query request from a user terminal after obtaining a data storage queue updated in a current sampling period, according to the data query request;
[0096] The target data determination module is used to determine the target data in the data storage queue updated in the current sampling period according to the query target, and feed back the target data to the user terminal.
[0097] In a feasible solution, the query target includes a target time and a target signal;
[0098] The target data determination module comprises:
[0099] A time range determination unit, used to determine a queryable time range according to a data storage queue updated in a current sampling period;
[0100] a target time slice determining unit, configured to determine the target time slice in the data storage queue updated in the current sampling period according to the target time if the target time is within the queryable time range;
[0101] A target data determination unit is used to determine target data in the target time slice according to the target signal.
[0102] In another feasible solution, the sampling signal is an offset of an initial sampling value; the signal constraint information also includes an initial sampling value of each sampling signal;
[0103] The target data determination unit is specifically used to:
[0104] Determining an offset of a target signal in the target time slice, and determining an initial sampling value of the target signal in the signal constraint information;
[0105] Target data is generated according to the offset and the initial sampling value.
[0106] The data processing device provided in the embodiment of the present invention can execute the data processing method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0107] Embodiment 4
[0108] Figure 4 A schematic diagram of an electronic device 410 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0109] like Figure 4As shown, the electronic device 410 includes at least one processor 411, and a memory connected to the at least one processor 411 in communication, such as a read-only memory (ROM) 412, a random access memory (RAM) 413, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 411 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 412 or the computer program loaded from the storage unit 418 to the random access memory (RAM) 413. In the RAM 413, various programs and data required for the operation of the electronic device 410 can also be stored. The processor 411, the ROM 412, and the RAM 413 are connected to each other via a bus 414. An input / output (I / O) interface 415 is also connected to the bus 414.
[0110] Multiple components in the electronic device 410 are connected to the I / O interface 415, including: an input unit 416, such as a keyboard, a mouse, etc.; an output unit 417, such as various types of displays, speakers, etc.; a storage unit 418, such as a disk, an optical disk, etc.; and a communication unit 419, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 419 allows the electronic device 410 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0111] The processor 411 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 411 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 411 performs the various methods and processes described above, such as a data processing method.
[0112] In some embodiments, the data processing method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 418. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 410 via the ROM 412 and / or the communication unit 419. When the computer program is loaded into the RAM 413 and executed by the processor 411, one or more steps of the data processing method described above may be performed. Alternatively, in other embodiments, the processor 411 may be configured to perform the data processing method in any other appropriate manner (e.g., by means of firmware).
[0113] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0114] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0115] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0116] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0117] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0118] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0119] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0120] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A data processing method, It is characterized in that The method is performed by an embedded system, which includes a data acquisition device and a data processing device; the method includes: Acquire sampling data of the current sampling period through a data acquisition device; Generate a time slice matching the current sampling period by using the sampled data through a data acquisition device according to the pre-acquired signal constraint information, and send the time slice to a data processing device; Determine the queue position matching the time slice by a data processing device according to the data storage queue updated in the previous sampling period, store the time slice in the storage space matching the queue position, and obtain the data storage queue updated in the current sampling period; Wherein, the sampling data includes at least two sampling signals; the signal constraint information includes the distribution position of each sampling signal and the data type of each sampling signal; The step of generating a time slice matching the current sampling period by using the sampled data according to the pre-acquired signal constraint information by the data acquisition device includes: Through the data acquisition device, each sampling signal is filled into the pre-acquired time slice template according to the distribution position of each sampling signal, so as to obtain the time slice matching the current sampling period; wherein, the time slice template is generated based on the distribution position of each sampling signal and the data type of each sampling signal.
2. The method according to claim 1, It is characterized in that Determining the queue position of the time slice matching by the data processing device according to the data storage queue updated in the previous sampling period includes: Determine the tail position of the data storage queue according to the data storage queue updated in the previous sampling period by a data processing device; The queue position matching the time slice is determined according to the queue tail position and the pre-acquired queue length.
3. The method according to claim 2, It is characterized in that After storing the time slice in the storage space matching the queue position, the method further includes: The tail position of the data storage queue is updated according to the queue position matched by the time slice.
4. The method according to claim 1, It is characterized in that After obtaining the data storage queue updated in the current sampling period, the method further includes: In response to a data query request from a user terminal, determining a query target according to the data query request; According to the query target, target data is determined in the data storage queue updated in the current sampling period and fed back to the user terminal.
5. The method according to claim 4, It is characterized in that The query target includes target time and target signal; Determining target data in a data storage queue updated in a current sampling period according to the query target includes: Determine the queryable time range based on the data storage queue updated in the current sampling period; If the target time is within the queryable time range, determining a target time slice in the data storage queue updated in the current sampling period according to the target time; Target data is determined in the target time slice according to the target signal.
6. The method according to claim 5, It is characterized in that The sampling signal is an offset of an initial sampling value; the signal constraint information also includes an initial sampling value of each sampling signal; The step of determining target data in the target time slice according to the target signal includes: Determining an offset of a target signal in the target time slice, and determining an initial sampling value of the target signal in the signal constraint information; Target data is generated according to the offset and the initial sampling value.
7. A data processing device, It is characterized in that The device is configured in an embedded system, and the embedded system includes a data acquisition device and a data processing device; including: A sampling data acquisition module is used to acquire the sampling data of the current sampling period through a data acquisition device; A time slice generation module, used to generate a time slice matching the current sampling period by using the sampled data through a data acquisition device according to the pre-acquired signal constraint information, and send the time slice to a data processing device; A time slice storage module is used to determine the queue position matching the time slice according to the data storage queue updated in the previous sampling period through a data processing device, store the time slice in a storage space matching the queue position, and obtain the data storage queue updated in the current sampling period; Wherein, the sampling data includes at least two sampling signals; the signal constraint information includes the distribution position of each sampling signal and the data type of each sampling signal; The time slice generation module is specifically used for: Through the data acquisition device, each sampling signal is filled into the pre-acquired time slice template according to the distribution position of each sampling signal, so as to obtain the time slice matching the current sampling period; wherein, the time slice template is generated based on the distribution position of each sampling signal and the data type of each sampling signal.
8. An electronic device, It is characterized in that The electronic device comprises: At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the data processing method described in any one of claims 1 to 6.
9. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the data processing method according to any one of claims 1 to 6 when executed.
Citation Information
Patent Citations
Method for preventing data overflow in data collecting system of ground penetrating radar
CN103309732A
Radar target track derivative system on the basis of information mining of real-equipment data and method thereof
CN105353644A
Method and device for acquiring data of fire-fighting equipment and fire-fighting management system
CN112671848A
Data acquisition method and device, electronic equipment and storage medium
CN115729765A
Data acquisition method and device, electronic equipment and storage medium
CN116541140A
