A time ring-based historical data simulation method, system, device and medium
By using a time-loop structure to cyclically cache historical data and retrieving data using the loop number attribute, the problems of high memory consumption and long search time in traditional historical data simulation are solved, achieving efficient and accurate simulation results.
Patent Information
- Application Number
- CN202411428529.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-14
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2044-10-14
AI Technical Summary
In traditional historical data simulation, the increased length of the linked list leads to high memory consumption and long search time, which affects simulation efficiency.
A time-loop structure is adopted, in which historical data is cyclically cached into multiple time slots, and the position of the data in the time loop is determined by the loop number attribute. The data is then read and simulated using the loop number attribute.
It improves data caching efficiency and simulation accuracy, reduces data loss, and enhances simulation efficiency.
Smart Images

Figure CN119377131B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data simulation technology, and in particular to a method, system, device and medium for simulating historical data based on a time loop. Background Technology
[0002] Traditional historical data simulation typically involves collecting historical data at a set sampling frequency, caching all historical data in a designated location, and retrieving the specified historical data only when the simulation task is executed. However, current data caching usually uses ordered linked lists or ordered doubly linked lists to represent the passage of time. Assuming the historical data time range is larger, the linked list length will be longer, and the memory consumption will be relatively higher. Furthermore, the time required to search for and retrieve the specified historical data in the ordered linked list will also increase with the increase in linked list length, thus affecting simulation efficiency. Summary of the Invention
[0003] This invention provides a method, system, device, and medium for simulating historical data based on a time loop, to address the problems existing in related technologies. The technical solution is as follows:
[0004] In a first aspect, embodiments of the present invention provide a historical data simulation method based on a time loop, comprising:
[0005] Historical data is acquired and cached sequentially in time slots within the time ring; the time slots are connected end-to-end within the time ring to form a closed loop.
[0006] Calculate the number of loops corresponding to each historical data when it is cached in the time loop, and determine the loop number attribute corresponding to each historical data based on the number of loops;
[0007] Upon receiving a simulation request, the target time slot is determined based on the simulation request. Starting from the target time slot, each time slot is traversed sequentially in the specified direction, and the corresponding historical data in each time slot is read according to the circle number attribute for simulation.
[0008] In one implementation, it further includes:
[0009] Create a time ring and divide the cache space of the time ring according to the preset number of slots to obtain multiple time slots;
[0010] Initialize the cache space for each time slot with data, and initialize the circle number attribute corresponding to each historical data to zero.
[0011] In one implementation, acquiring historical data includes:
[0012] Acquire the data acquisition conditions, including the acquisition frequency and the acquisition time range;
[0013] Historical data is retrieved from the specified data source according to the collection criteria.
[0014] In one implementation, sequentially cyclically caching each piece of historical data into each time slot within the time ring includes:
[0015] Obtain the preset simulation accuracy, and group the historical data continuously according to the simulation accuracy to obtain multiple time groups;
[0016] Iterate through each time group and cache each time group in turn into each time slot.
[0017] In one implementation, sequentially cyclically caching each time group into each time slot includes:
[0018] Iterate through each time group, obtain the data time corresponding to the historical data in the time group, calculate the difference between the data time and the initial time to obtain the time difference; where the initial time is the time when the first historical data is cached to the time ring;
[0019] The time slot number of the current time slot is calculated based on the time difference, simulation accuracy, and the specified number of slots in the time loop;
[0020] The position of the current time slot within the time ring is determined based on the time slot number, and the time group corresponding to the data time is cached in the current time slot.
[0021] In one implementation, calculating the number of cycles corresponding to each historical data loop cached to the time loop includes:
[0022] Divide the time difference by the simulation accuracy to obtain the span ratio;
[0023] The number of cycles is obtained by dividing the span ratio by the specified number of slots in the time loop and rounding the result down.
[0024] In one implementation, the simulation process involves reading the corresponding historical data within each time slot based on the circle number attribute, including:
[0025] Starting from the target time slot, read the historical data with a circle number attribute of zero in the target time slot and enqueue it into the specified queue, and decrement the circle number attribute of other historical data in the target time slot by 1;
[0026] Read other time slots in the time loop sequentially in the specified direction, and assign all historical data enqueued in the specified queue to the specified simulation interface to complete the historical data simulation presentation.
[0027] Secondly, embodiments of the present invention provide a historical data simulation system based on a time loop, which executes the historical data simulation method based on a time loop as described above.
[0028] Thirdly, embodiments of the present invention provide an electronic device comprising a memory and a processor. The memory and the processor communicate with each other via an internal connection path. The memory stores instructions, and the processor executes the instructions stored in the memory. When the processor executes the instructions stored in the memory, it causes the processor to perform the method described in any of the above embodiments.
[0029] Fourthly, embodiments of the present invention provide a computer-readable storage medium that stores a computer program, wherein when the computer program is run on a computer, the methods in any of the embodiments described above are executed.
[0030] The advantages or beneficial effects of the above technical solutions include at least the following:
[0031] This invention stores historical data using a time ring with multiple time slots. Since the cache space within the time ring is divided into multiple time slots, and the time slots are connected end-to-end, historical data can be cyclically cached into each time slot. The ring number attribute represents the number of cycles when historical data is stored in the time ring. The relevant historical data in the time slot is retrieved using the ring number attribute for simulation. Compared with the traditional ordered linked list, the caching and retrieval method based on the time ring of this invention is more efficient and accurate, thereby improving simulation efficiency.
[0032] The above overview is for illustrative purposes only and is not intended to be limiting in any way. In addition to the illustrative aspects, embodiments, and features described above, further aspects, embodiments, and features of the invention will become readily apparent from the accompanying drawings and the following detailed description. Attached Figure Description
[0033] In the accompanying drawings, unless otherwise specified, the same reference numerals throughout the various drawings denote the same or similar parts or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings depict only some embodiments disclosed in the invention and should not be construed as limiting the scope of the invention.
[0034] Figure 1 This is a flowchart illustrating the historical data simulation method based on time loops of the present invention.
[0035] Figure 2 This is a schematic diagram of the process for obtaining historical data according to the present invention;
[0036] Figure 3 This is a flowchart illustrating the historical data simulation process of this invention.
[0037] Figure 4 This is a schematic diagram of the time loop and time slot of the present invention;
[0038] Figure 5 This is a structural block diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0039] In the following description, only certain exemplary embodiments are briefly described. As those skilled in the art will recognize, the described embodiments can be modified in various ways without departing from the spirit or scope of the invention. Therefore, the drawings and description are considered to be exemplary in nature and not restrictive.
[0040] Traditional historical data simulation typically involves collecting historical data by setting a sampling frequency. However, because the sampling frequency is fixed, some simulation data may be missing due to excessively long sampling intervals, making it impossible for the simulation to fully reproduce the historical scene. When equipment failure occurs, historical data simulation cannot restore the complete scene at the moment of failure.
[0041] This invention proposes a historical data simulation method based on a time loop, which can improve the integrity of simulation data and further improve the efficiency and accuracy of data caching, thereby improving simulation efficiency.
[0042] like Figure 1 As shown, the historical data simulation method based on time loops specifically includes the following steps:
[0043] Step S1: Obtain historical data and sequentially cache each historical data in a loop into each time slot within the time ring; wherein, each time slot is connected end to end within the time ring to form a closed loop.
[0044] Before acquiring historical data, data configuration is required. This configuration includes data source configuration, data subscription, data subscription time range settings, data time precision settings, and data presentation method settings.
[0045] Specifically, users select a data source based on their actual needs. The data source can be from databases such as MySQL, Oracle, SQL Server, PostgreSQL, InfluxDB, TDengine, Hive, ClickHouse, and Doris. During the data source configuration process, users enter information such as host address, port, database name, data table, username, and password. Based on this information, the corresponding data source is obtained from the specified database as historical data for simulation.
[0046] Meanwhile, it supports selecting different API data sources. Users can enter the API's Uniform Resource Locator (URL) and corresponding request parameters to obtain the appropriate data source. It also supports selecting Excel files as data sources. Users can upload Excel files and use the data in the Excel files as historical data for simulation.
[0047] Furthermore, the user inputs the devices and measurement points to be collected for simulation data, and inputs the data collection time range as a condition for data collection. This is equivalent to subscribing to data and setting the data subscription time range, so that the system can receive updates from the specified data source periodically or in real time according to the user-set rules, thereby obtaining the required data source.
[0048] It should be noted that the purpose of setting the data time precision is to set the collection frequency of historical data and determine the time interval between the collected historical data. In addition, the user also needs to input the simulation precision. Simulation precision refers to how closely the output of the simulation system approximates the actual situation when simulating real-world objects or processes. The unit of simulation precision is milliseconds, and the setting range for simulation precision is 100 to 10000. The lower the simulation precision value, the closer the simulation effect is to the historical data.
[0049] Once the above configuration is completed, you can start a series of operations such as data acquisition, data simulation, and data presentation.
[0050] Specifically, such as Figure 2 As shown, the appropriate collector is automatically selected based on the data source chosen above, and the collection conditions are determined according to the above configuration. The collection conditions include information such as data source, collection frequency, and collection time range. All pre-configured collection conditions are passed into the collector, and the collector is executed to collect multiple historical data arranged in chronological order from the specified data source.
[0051] It should be noted that before starting data collection, a time ring needs to be created in advance to cache historical data. The time ring can be regarded as a complete cache space. A fixed number of time slots are evenly divided within the time ring. The division of time slots can be regarded as dividing the complete cache space into multiple independent small cache spaces. Each time slot can store a certain amount of data.
[0052] When creating a time ring, the overall cache space of the time ring is divided according to a preset number of slots to obtain multiple time slots. In this embodiment, the time slots are divided evenly, each time slot has the same cache space, and the time slots are arranged according to a circular distribution pattern. The time slots are connected end to end to form a closed loop structure. Each time slot can also be pre-marked with its corresponding time slot number according to its sorting position in the time ring, so as to facilitate the subsequent positioning of the specified time slot according to the time slot number.
[0053] After creating the time ring, the cache space for each time slot is initialized with data, such as... Figure 3As shown, this ensures that no other irrelevant data is left in the time loop, and initializes the loop number attribute corresponding to each historical data to zero, so that the loop number attribute can be used to determine the number of times the historical data is stored in the time slot.
[0054] In this embodiment, the data caching method for the time ring is cyclical. Starting from a specified time slot in the time ring, one or more historical data points are stored, and then one or more historical data points are stored in the next time slot in the specified direction, and so on. Furthermore, the data caching within the time ring is cyclical; after completing the data caching of the first time slot, the process continues to traverse the second time slot, caching data in the second time slot, and so on, until a caching stop condition is met. The cyclical caching operation stops only when all historical data has been stored, all time slots are full, or caching is manually stopped.
[0055] For example, such as Figure 4 As shown, assuming the time ring is evenly divided into 60 time slots, the time slot numbers of the 60 time slots are incremented from 0 to 59. Historical data is stored starting from time slot 0, then to time slot 1, then to time slot 2, and so on. When time slot 59 has finished caching data, historical data is stored back to time slot 0. This caching process continues until the caching stop condition is met.
[0056] Furthermore, each time slot uses an array to store historical data. Specifically, before cyclically caching each historical data point to its respective time slot, the historical data can be pre-grouped, and the resulting time groups are sequentially consecutive. The grouping pattern can be determined based on a preset simulation precision. For example, if there are four historical data points, each 1 second apart, and assuming a simulation precision of 2 seconds, the first two historical data points are grouped together and stored in the same time slot, while the last two are grouped separately and stored in the next time slot, thus improving data caching efficiency.
[0057] Step S2: Calculate the number of loops corresponding to each historical data when it is cyclically cached to the time loop, and determine the loop number attribute corresponding to each historical data based on the number of loops.
[0058] Specifically, during the data caching process, the time slot number of the time slot in which data caching is being performed is recorded in real time and marked as the current time slot number. The change pattern of the current time slot number is analyzed. If the current time slot number gradually increases from 0 to 59, it means that the caching cycle is still the first cycle. When the current time slot number changes from 59 to 0 for the first time, it means that the caching cycle has entered the second cycle. And so on.
[0059] When the cache count is the first cycle, the cycle number attribute of all historical data stored in the first cycle time slot is assigned a value of 0; when the cache count is the second cycle, the cycle number attribute of all historical data stored in the second cycle time slot is assigned a value of 1, and so on, until the caching stop condition is met and the assignment of the cycle number attribute is stopped.
[0060] In this embodiment, during the process of traversing each time group and caching each practice group to the corresponding time slot, the data group being traversed is determined as the current time group, and the data time corresponding to the historical data in the current time group is determined. This data time is the collection time of the historical data.
[0061] The calculation method for the circle number attribute of each historical data in the current time group is as follows:
[0062] The time difference is obtained by subtracting the initial time of the time ring from the data time of the current time group; where the initial time of the time ring is the time when the first historical data is cached into the time ring.
[0063] Divide the time difference by the simulation accuracy to obtain the span ratio;
[0064] The loop number is obtained by dividing the span ratio by the specified number of slots and rounding the result down. This loop number is the loop number attribute of each historical data in the current time group.
[0065] The expression for calculating the round attribute is:
[0066]
[0067] Where E represents the data span time, which is the time difference obtained by subtracting the initial time of the time loop from the data time of the current time group, and the time difference is accurate to milliseconds;
[0068] P represents the simulation accuracy;
[0069] 60 represents the number of time slots within the time loop;
[0070] This represents rounding down;
[0071] When the circle number attribute is less than or equal to 0, it means that this time group should be moved out and processed when the current time pointer reaches the current slot.
[0072] The method for calculating the time slot number N of the current time group cached into the time slot is as follows:
[0073]
[0074] Where E represents the time span of the data;
[0075] P represents the simulation accuracy;
[0076] % represents the modulus;
[0077] This represents rounding down to the nearest integer.
[0078] After calculating the round number attribute and the time slot number N, the position of the time slot in the time ring is determined according to the time slot number N. The current time group is cached in the time slot with time slot number N, and the round number attribute of each historical data in the current time group is marked as round.
[0079] like Figure 4 As shown, Figure 4 The time slot with time slot number 1 stores three time groups. Each time group consists of multiple historical data. According to the number of cycles of the circular cache, the circle number attribute of the historical data in the first time group is round=0, the circle number attribute of the historical data in the second time group is round=1, and the circle number attribute of the historical data in the third time group is round=2.
[0080] Step S3: Upon receiving a simulation request, determine the target time slot based on the simulation request. Starting from the target time slot, traverse each time slot sequentially in the specified direction, and read the corresponding historical data in each time slot according to the circle number attribute for simulation.
[0081] It should be noted that the simulation request is initiated manually or automatically after the aforementioned data configuration and historical data caching are completed.
[0082] Upon receiving a simulation request, the time loop is started. The pointer in the time loop moves through a time slot each time it moves. The current time of the time loop = the previous time + the simulation accuracy.
[0083] In this embodiment, when starting the time loop, the pointer on the time loop begins from the target time slot corresponding to the initial time, that is, from the target time slot with time slot number 0. It reads historical data with a circle number attribute of zero within the target time slot and enqueues this historical data into the blocking queue. At the same time, the circle number attribute values of historical data in other time groups within the target time slot are decremented by one to update the circle number attribute of each historical data. Subsequently, the pointer jumps to the next time slot in a specified direction (the pointer moves clockwise from time slot number 0 to time slot number 59), reads historical data with a circle number attribute of zero within the next time slot, and enqueues it into the blocking queue. This process continues until the simulation stop condition is met.
[0084] The simulation can be stopped when all historical data has been read, manually stopped, or under other conditions. Historical data reading can be paused at any point during the simulation, depending on actual needs; during the pause, the time loop pointer also stops moving.
[0085] Combination Figure 3 As shown, another thread sequentially retrieves queue elements from the blocking queue and assigns them to the current simulation interface. The current simulation interface then presents historical data based on these assigned values. Since the data collected in this embodiment is completed under specified conditions, the collected historical data is continuous and complete, and the data cached in the time loop is also complete. Therefore, the complete data at any given time can be viewed.
[0086] Furthermore, at any given moment, the time loop pointer will point to a time slot. Within this time slot, the time error of all historical data where round=0 is necessarily less than the simulation accuracy. Therefore, when the simulation is paused, the error between the time of all historical data on the simulation interface and the pause time of the historical simulation will necessarily be less than the simulation accuracy, thereby improving simulation accuracy.
[0087] Furthermore, when it is necessary to find historical data at any specified time point within the collection time range, a corresponding simulation request can be initiated. Upon receiving the simulation request, the time slot number N1 and the circle number attribute round1 corresponding to the specified time point are calculated based on the specified time point. The time slot containing the historical data of the specified time point is determined based on the time slot number N1, and this time slot is designated as the target time slot. Starting from the target time slot, the historical data with the circle number attribute round1 in the time slot and subsequent time slots are read. After reading the historical data, the circle number attribute of the remaining historical data in the time slot is updated, and so on. This satisfies the requirement to start historical data simulation from any time point within the complete collection time range, thereby improving the flexibility of historical data simulation.
[0088] This embodiment reduces the loss of simulation data due to insufficient sampling frequency or technical limitations by employing a more efficient data acquisition mechanism. Historical data is stored in a time ring with multiple time slots. Since the cache space within the time ring is divided into multiple time slots, and these time slots are interconnected, historical data can be cyclically cached into each time slot. A ring number attribute represents the number of cycles when historical data is stored in the time ring. The relevant historical data within the time slot is retrieved using the ring number attribute for simulation. Compared to traditional ordered linked lists, the caching and retrieval method of the time ring in this invention is more efficient and accurate, thereby improving simulation efficiency.
[0089] Another embodiment of the present invention provides a historical data simulation system based on a time cycle, which performs the historical data simulation method based on a time cycle as described above.
[0090] It should be noted that the functions of each module of the system in this embodiment of the invention can be found in the corresponding descriptions in the above methods, and will not be repeated here.
[0091] Another embodiment of the present invention provides an electronic device, Figure 5 A block diagram of the electronic device is shown. (Example) Figure 5 As shown, the electronic device includes a memory 100 and a processor 200. The memory 100 stores a computer program that can run on the processor 200. When the processor 200 executes the computer program, it implements the time-loop-based historical data simulation method described in the above embodiments. The number of memories 100 and processors 200 can be one or more.
[0092] The electronic device also includes:
[0093] The communication interface 300 is used to communicate with external devices and perform data exchange and transmission.
[0094] If the memory 100, processor 200, and communication interface 300 are implemented independently, they can be interconnected via a bus to communicate with each other. This bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. This bus can be divided into an address bus, a data bus, a control bus, etc.
[0095] Optionally, in a specific implementation, if the memory 100, processor 200, and communication interface 300 are integrated on a single chip, then the memory 100, processor 200, and communication interface 300 can communicate with each other through an internal interface.
[0096] This invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method provided in this invention.
[0097] This invention also provides a chip, which includes a processor for calling and executing instructions stored in a memory, causing a communication device on which the chip is installed to perform the method provided in this invention.
[0098] This invention also provides a chip, including: an input interface, an output interface, a processor, and a memory. The input interface, output interface, processor, and memory are connected through an internal connection path. The processor is used to execute code in the memory. When the code is executed, the processor is used to execute the method provided in this invention.
[0099] It should be understood that the aforementioned processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. General-purpose processors can be microprocessors or any conventional processor. It is worth noting that the processor can be a processor supporting the Advanced Reduced Instruction Set Computing (RISC) machine (ARM) architecture.
[0100] Further, optionally, the aforementioned memory may include read-only memory and random access memory, and may also include non-volatile random access memory. The memory may be volatile or non-volatile, or may include both. Non-volatile memory may include read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory may include random access memory (RAM), which serves as an external cache. Many forms of RAM are available by way of example, but not limitation. Examples include static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).
[0101] In the above embodiments, implementation can be achieved, in whole or in part, by software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the present invention is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another.
[0102] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of those different embodiments or examples.
[0103] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0104] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various variations or substitutions within the technical scope disclosed in the present invention, and these should all be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A time -ring based historical data simulation method, characterized in that, The method comprises the following steps: a time ring is created, and a cache space of the time ring is divided according to a preset specified slot number to obtain a plurality of time slots; historical data and a preset simulation accuracy are obtained, each of the historical data is continuously grouped according to the simulation accuracy to obtain a plurality of time groups, each of the time groups is iterated, and each of the time groups is cyclically cached into each of the time slots; wherein each of the time slots is connected at the head and tail to form a closed loop in the time ring; a cycle number corresponding to each of the historical data when cyclically cached into the time ring is calculated, that is, a data time corresponding to the historical data in the time group is obtained, a difference between the data time and an initial time is calculated to obtain a time difference; wherein the initial time is a time when the first historical data is cached into the time ring; the time difference is divided by the simulation accuracy to obtain a span ratio; the span ratio is divided by the specified slot number, and a result is rounded down to obtain the cycle number; a turn number attribute corresponding to each of the historical data is determined according to the cycle number; in the case of obtaining a simulation request, a target time slot is determined according to the simulation request, each of the time slots is iterated in a specified direction starting from the target time slot, and each of the historical data corresponding to the time slots is read according to the turn number attribute to simulate.
2. The time ring based historical data simulation method of claim 1, wherein, Further comprising: the cache space of each of the time slots is initialized, and the turn number attribute corresponding to each of the historical data is initialized to zero.
3. The time ring based historical data simulation method of claim 1, wherein, The historical data is obtained by: obtaining a collection condition, the collection condition including a collection frequency and a collection time range; the corresponding historical data is obtained from a specified data source according to the collection condition.
4. The time ring based historical data simulation method of claim 1, wherein, The cyclic caching of each of the time groups into each of the time slots comprises: the time slot number of the current time slot is calculated according to the time difference, the simulation accuracy and the specified slot number of the time ring; the position of the current time slot in the time ring is determined according to the time slot number, and the time group corresponding to the data time is cached into the current time slot.
5. The time ring based historical data simulation method of claim 1, wherein, The simulation of each of the historical data corresponding to each of the time slots according to the turn number attribute comprises: starting from the target time slot, the historical data with the turn number attribute of zero in the target time slot is read into a specified queue, and the turn number attribute of other historical data in the target time slot is reduced by 1; other time slots in the time ring are cyclically read in the specified direction, and all the historical data read into the specified queue is sequentially assigned to a specified simulation interface to complete the historical data simulation presentation.
6. A time-loop based historical data simulation system, characterized in that, The method for simulating historical data based on a time ring is executed as claimed in any one of claims 1-5.
7. An electronic device, comprising: Comprising: a processor and a memory, the memory storing instructions, the instructions being loaded and executed by the processor to implement the method for simulating historical data based on a time ring as claimed in any one of claims 1-5.
8. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the time ring based historical data simulation method according to any one of claims 1-5.
Citation Information
Patent Citations
Processing a data array with a meandering scanning order using a circular buffer memory
CN101147396A
Traffic control strategy hardware-in-loop simulation system and method based on multi-sensors
CN106056905A