A method, device and storage medium for generating display data
By identifying the time period of missing data after the system startup event and obtaining the filling data from the backup data, the problem of data loss in the simulated display scenario was solved, and the data integrity and display effect were improved.
Patent Information
- Application Number
- CN202011238594.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-09
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2040-11-09
AI Technical Summary
In simulated demonstration scenarios, unexpected events such as system restarts or power outages can lead to the loss or absence of demonstration data, affecting the demonstration effect and user experience.
By responding to the system startup event, the current time and the update time of the local cache are determined, the time difference is compared to determine the time period of missing data, and the target filling data is obtained from the pre-stored backup simulation data to generate the target display data and fill in the missing data.
This avoids blank areas in the data display window, ensures the integrity of the displayed data, and improves the display effect and user experience.
Smart Images

Figure CN114461443B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and in particular to a method, apparatus and storage medium for generating display data. Background Technology
[0002] In simulated business system demonstrations, such as IT exhibition halls and technology trade shows, it's necessary to simulate dynamic data from these systems and visualize it. This allows for a direct and intuitive display of the operational status of relevant business data on the system's interface, including time-varying metrics like traffic, sales volume, attack frequency, and pageviews. However, unexpected events such as power outages or machine crashes during demonstrations are unavoidable. Since the displayed data is simulated, a system restart may result in data loss or incompleteness, leading to blank data areas in the display window and negatively impacting the presentation and user experience.
[0003] Therefore, there is a need to provide a reliable solution for generating display data to address the problems in the existing technologies mentioned above. Summary of the Invention
[0004] This disclosure provides a method, apparatus, and storage medium for generating display data, which can avoid the loss of display data due to unexpected situations and ensure the integrity of display data.
[0005] On the one hand, this disclosure provides a method for generating display data, the method comprising:
[0006] In response to the system startup event, determine the current time and the update time of the target simulation data in the local cache;
[0007] When the time difference between the current time and the update time is greater than or equal to the preset backup period, the target data filling time period corresponding to the missing simulation data is determined based on the information of the current time, the update time and the preset backup time. The target data filling time period is a preset time period before the time period in which the simulation data is missing.
[0008] Obtain the target backup simulation data corresponding to the target data filling time period from the pre-stored backup simulation data;
[0009] Target display data is generated based on the target simulation data and the target backup simulation data.
[0010] On the other hand, a data generation device is provided, the device comprising:
[0011] The first determination module is used to determine the current time and the update time of the target simulation data in the local cache in response to the system startup event.
[0012] The second determining module is used to determine the target data filling time period corresponding to the missing simulation data based on the information of the current time, the cache update time and the preset backup time when the time difference between the current time and the update time is greater than or equal to the preset backup period. The target data filling time period is a preset time period before the time period in which the simulation data is missing.
[0013] Acquisition module: used to acquire the target backup simulation data corresponding to the target filling data time period from the pre-stored backup simulation data;
[0014] Data generation module: used to generate target display data based on the target simulation data and the target backup simulation data.
[0015] On the other hand, a display data generation device is provided, the device including a processor and a memory, the memory storing at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by the processor to implement the display data generation method as described above.
[0016] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction or at least one program is stored therein, the at least one instruction or the at least one program being loaded and executed by a processor to implement the display data generation method as described above.
[0017] The data generation method, apparatus, equipment, and storage medium disclosed herein have the following technical effects:
[0018] This disclosure, in response to a system startup event, determines the current time and the update time of the target simulation data in the local cache. By comparing the time difference between the current time and the update time with a preset backup period, it determines the target data filling time period corresponding to the missing simulation data. Then, it retrieves the target backup simulation data corresponding to the target data filling time period from the pre-stored backup simulation data. Based on the target simulation data and the target backup simulation data, it generates target display data, which completes the display data missing caused by the missing simulation data after the system restart. This can avoid blank data areas in the data display window, ensure the integrity of the display data, and effectively improve the display effect and enhance the viewing experience. Attached Figure Description
[0019] To more clearly illustrate the technical solutions and advantages in the embodiments of this disclosure or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a schematic flowchart illustrating a data generation method provided in an embodiment of this disclosure;
[0021] Figure 2 This is a flowchart illustrating a process for determining the target data time period corresponding to the missing simulation data based on the current time, update time, and preset backup time information provided in this embodiment of the disclosure.
[0022] Figure 3 This is a schematic diagram of the target display window provided in an embodiment of this disclosure;
[0023] Figure 4 This is a schematic diagram of a target display window with blank data areas provided in an embodiment of this disclosure;
[0024] Figure 5 This is a schematic diagram of a process for generating target display data based on target simulation data and target backup simulation data, provided by an embodiment of this disclosure;
[0025] Figure 6 This is a schematic flowchart illustrating a data generation method provided in an embodiment of this disclosure;
[0026] Figure 7 This is a schematic diagram of the structure of a data generation device provided in an embodiment of this disclosure;
[0027] Figure 8 This is a hardware structure block diagram of a device for executing a display data generation method provided in an embodiment of this disclosure. Detailed Implementation
[0028] The technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0029] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.
[0030] Before providing a further detailed description of the embodiments of this disclosure, the nouns and terms involved in the embodiments of this disclosure will be explained, and the nouns and terms involved in the embodiments of this disclosure shall be interpreted as follows.
[0031] Local storage: A data local storage technology that can persistently store data on the machine without time limits, and can be stored for a long time without manual deletion or overwriting.
[0032] Data disaster recovery system: In IT, this refers to providing a safe environment for computer information systems to cope with various disasters. When computer systems suffer from natural disasters such as fire, flood, earthquake, and war, as well as man-made disasters such as computer crime, computer viruses, power outages, network / communication failures, hardware / software errors, and human error, the data disaster recovery system will ensure the security of user data.
[0033] This disclosure provides a data generation system for data display scenarios. The application environment of the system may include terminal devices and / or servers. When the application environment includes terminal devices and servers, the terminal devices and servers can be directly or indirectly connected through wired or wireless communication. This disclosure does not impose any limitations on this.
[0034] Specifically, terminal devices can be electronic devices with data generation and display capabilities, such as in-vehicle terminals, smartphones, tablets, laptops, desktop computers, digital assistants, augmented reality (AR) / virtual reality (VR) devices, and smart wearable devices.
[0035] In practical applications, the displayed data can be simulated data related to the displayed business, such as sales volume in sales operations, attack volume and attack blocking volume in security defense operations, and passenger volume in transportation operations. Typically, the system startup event is a data generation trigger event. Here, the system startup event refers to the data display system startup event, which can be set up in the aforementioned data generation terminal device or in other devices that are communicatively connected to the aforementioned terminal device.
[0036] Specifically, a server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.
[0037] In this embodiment of the disclosure, the display data generation system can run on a terminal device and / or a server. Taking the display data generation system running on a server as an example, the server stores the simulated data corresponding to the display data, as well as the backup simulated data that is periodically backed up. In response to a system startup event, the server determines whether there is missing display data, generates target display data that completes the missing display data according to a preset method, and sends the target display data to the terminal device that implements the data display.
[0038] The following describes a data generation method disclosed herein. This method can be applied to data display scenarios including but not limited to business systems. The generated display data can be simulated data related to business operations in the business system. The display data can include, but is not limited to, data related to time coefficients, such as traffic, attack volume, sales volume, access volume, traffic volume, traffic occupancy, and hourly increment / decrement. Figure 1 This is a flowchart illustrating a data generation method provided by an embodiment of this disclosure. This specification provides method operation steps as shown in the embodiments or flowcharts, but based on conventional or non-inventive labor, more or fewer operation steps may be included. The order of steps listed in the embodiments is merely one possible execution order among many and does not represent the only execution order. In actual system or server products, the method can be executed sequentially according to the embodiments or drawings, or in parallel (e.g., in a parallel processor or multi-threaded processing environment). Specifically, as shown... Figure 1 As shown, the method may include:
[0039] S210: In response to the system startup event, determine the current time and the update time of the target simulation data in the local cache.
[0040] In this embodiment of the disclosure, the system startup event represents the startup event of the data display system. Specifically, the data display system has a system interface including at least one display window. Specifically, the content displayed in the display window includes visualized display data. Specifically, the visualization forms of the displayed data include, but are not limited to, bar charts, change curves, and dynamic numbers.
[0041] In practical applications, the local cache stores the simulated data corresponding to the display window. When the data display system is running normally, it generates the simulated data corresponding to the displayed data in real time. Simultaneously, it updates the local cache with the newly generated simulated data and stores the corresponding cache time. Specifically, the target simulated data is the simulated data corresponding to the target display window stored in the local cache. Specifically, the update time here represents the cache time of the most recent update of the target simulated data in the local cache.
[0042] S230: When the time difference between the current time and the update time is greater than or equal to the preset backup period, determine the target data filling time period corresponding to the missing simulation data based on the information of the current time, the update time and the preset backup time. The target data filling time period is the preset time period before the time period in which the simulation data is missing.
[0043] In this embodiment of the disclosure, when the data display system is running normally, it periodically backs up the simulated data updated in real time in the local cache to backup simulated data. Specifically, the timing period for this periodic backup is a preset backup period. The time granularity of this preset backup period can be the time difference between adjacent preset backup times. Specifically, the time granularity corresponding to the preset backup period is the time granularity of a unit of backup simulated data in the backup simulated data. In some embodiments, the time granularity corresponding to the preset backup period can be consistent with the time granularity of a unit of displayed data in the target display window.
[0044] Furthermore, the preset backup time information represents the information of each preset backup time corresponding to the backup operation. The preset backup time is the time set in advance for the above-mentioned timed backup. In some embodiments, the preset backup time can be consistent with the display time of the unit display data in the target display window. The unit display data can be, for example, the single bar data in the bar chart. In some embodiments, the preset backup time in the preset backup time information can be periodically cyclical. For example, the cycle period of the preset backup time information can be 1 day, the time granularity corresponding to the preset backup cycle is 1 hour, and each preset backup time can be each hour in 1 day.
[0045] It should be noted that the display time period corresponding to the target display window can also be cyclical. The display time period can be the same as or different from the cycle period of the preset backup time information mentioned above.
[0046] In some embodiments, please refer to Figure 2 The target data filling time period corresponding to the missing simulation data is determined based on the current time, update time, and preset backup time information, including:
[0047] S231: Obtain the first preset backup time corresponding to the update time from the preset backup time information. The first preset backup time is the preset backup time corresponding to the backup operation before the update time.
[0048] Specifically, in some cases, if the update time is inconsistent with any of the preset backup times in the preset backup time information, then the preset backup time corresponding to the backup operation before the update time is obtained as the first preset backup time.
[0049] It should be noted that in some cases, if the update time is consistent with one of the preset backup times in the preset backup time information, the preset backup time corresponding to the backup operation that is consistent with the update time will be used as the first preset backup time.
[0050] S232: Obtain the second preset backup time corresponding to the current time from the preset backup time information. The second preset backup time is the preset backup time corresponding to the backup operation before the current time or the preset backup time corresponding to the backup operation after the current time.
[0051] Specifically, in some cases, the current time is inconsistent with any of the preset backup times in the preset backup time information. In such cases, the preset backup time corresponding to the backup operation before the current time or the preset backup time corresponding to the backup operation after the current time is obtained as the second preset backup time.
[0052] It should be noted that in some cases, if the current time is consistent with one of the preset backup times in the preset backup time information, the preset backup time corresponding to the backup operation that is consistent with the current time will be used as the second preset backup time.
[0053] S233: Determine the time period between the first preset backup time and the second preset backup time as the target data filling time period.
[0054] Specifically, the target data filling time period includes an integer number of preset backup cycles corresponding to time granularity.
[0055] Furthermore, the target data filling time period is a preset time period corresponding to the backup operation prior to the time period where simulated data is missing. Here, the time period where simulated data is missing is the period from the update time to the current time, which is the time period within the current cycle of the preset backup time information; the target data filling time period is the time period in other cycles prior to the current cycle, and it corresponds to the time node of the time period where simulated data is missing.
[0056] Specifically, the target data filling time period is the time period between the first preset backup time and the second preset backup time in other cycles preceding the current cycle. Preferably, the target data filling time period is the time period between the first preset backup time and the second preset backup time in the cycle preceding the current cycle.
[0057] In one embodiment, please refer to Figure 3 and Figure 4 The preset backup time information has a cycle of 1 day, and each preset backup time in the preset backup time information is a specific hour within a day. The preset backup cycle is 1 hour. The target display window displays the data in the form of a bar chart, such as... Figure 3 The diagram shows a target display window.
[0058] Furthermore, if the update time is 6:10 and the current time is 8:20, then the period with missing simulation data is from 6:10 to 8:20 today. Figure 4 As shown, the target display window (bar chart window) shows a blank data area (the area enclosed by the dashed box).
[0059] Furthermore, based on the update time and the current time, the first preset backup time can be determined to be 6:00, and the second preset backup time can be determined to be 8:00 or 9:00. Then, the target data filling time period is determined to be 6:00 to 8:00, including the time granularity corresponding to the two preset backup cycles, or the target data filling time period is determined to be 6:00 to 9:00, including the time granularity corresponding to the three preset backup cycles. Thus, the target data filling time period is determined to be 6:00 to 8:00 or 6:00 to 9:00 of the previous day.
[0060] S250: Retrieve the target backup simulation data corresponding to the target filling data time period from the pre-stored backup simulation data.
[0061] In this embodiment of the disclosure, the backup simulation data can be stored in local storage, such as Storage local storage; it can also be stored on a server or a cloud server. The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. In some embodiments, the storage format of the backup simulation data may include, but is not limited to, arrays.
[0062] Furthermore, the pre-stored backup simulation data may include at least one periodic backup simulation data. Specifically, the period length of the periodic backup simulation data is the cycle period of the aforementioned preset backup time information. For example, if the cycle period is 1 day, then the period length of the periodic backup simulation data is 1 day. Specifically, the periodic backup simulation data includes at least one unit backup simulation data. The unit backup simulation data uses a preset backup cycle as the time granularity and backs up the simulation data stored in the local cache at a preset backup time to obtain one unit backup simulation data.
[0063] In practical applications, the target backup simulation data is obtained by retrieving the simulation data corresponding to the target data filling time period from the pre-stored backup simulation data of the period before the current period backup simulation data.
[0064] In this way, simulated data is backed up and stored in time periods according to a preset backup cycle. It can be read or retrieved according to the required time period, effectively improving the flexibility and efficiency of data use while achieving data disaster recovery. Furthermore, by reading the preset backup simulated data for the corresponding time period, missing simulated data can be restored, enhancing the realism of the displayed data.
[0065] In one embodiment, as described above, the target data filling time period is 6:00 to 8:00 or 6:00 to 9:00 of the previous day, and the target backup simulation data is the simulation data from 6:00 to 8:00 of the previous day's periodic backup simulation data or the simulation data from 6:00 to 9:00 of the previous day's periodic backup simulation data.
[0066] In this embodiment of the disclosure, before step S250: obtaining the target backup simulation data corresponding to the target filling data time period from the pre-stored backup simulation data, the demonstration data generation method of this disclosure may further include:
[0067] S241: Determine whether there is simulation data corresponding to the target data filling time period in the pre-stored backup simulation data;
[0068] S242: If it exists, execute the step of obtaining the target backup simulation data corresponding to the target filling data time period from the pre-stored backup simulation data;
[0069] S243: If it does not exist, generate the first target dynamic simulation data in real time corresponding to the time period where the simulation data is missing. The time period where the simulation data is missing is the time period from the update time to the current time.
[0070] S244: Generate target display data based on target simulation data and first target dynamic simulation data.
[0071] In practical applications, it can be determined whether there is simulation data corresponding to the target data filling time period in the pre-stored backup simulation data for each period. If it exists, the corresponding target backup simulation data is directly read. If it does not exist, dynamic simulation data required for the time period with missing simulation data is generated in real time to obtain the first target dynamic simulation data. In some cases, this can be specifically achieved by increasing the use of computing resources to accelerate the real-time generation of simulation data required for the time period with missing simulation data to obtain the first target dynamic simulation data.
[0072] Furthermore, based on the cache time information of the target simulation data and the time periods where simulation data is missing, the target simulation data and the first target dynamic simulation data are integrated to obtain the target display data.
[0073] S270: Generate target display data based on target simulation data and target backup simulation data.
[0074] In this embodiment of the disclosure, the target display data is the simulated data that the target display window needs to display.
[0075] In some embodiments, please refer to Figure 5 Step S270 above: generating target display data based on target simulation data and target backup simulation data may include:
[0076] S2711: Obtain target cache data from target simulation data, where the target cache data is simulation data generated before the first preset backup time;
[0077] S2712: Based on the cache time information of the target cache data and the target filling data time period, integrate the target cache data and the target backup simulation data into the target display data.
[0078] In practical applications, the timing information of the target cached data and the target backup simulation data can be obtained based on the cache time information of the target cached data and the target data filling time period. The target cached data and the target backup simulation data can then be integrated based on this timing information. Specifically, the target cached data and the target backup simulation data can be integrated using a first preset backup time point.
[0079] In other embodiments, the second preset backup time is the preset backup time corresponding to the backup operation prior to the current time, and step S270 above: generating target display data based on target simulation data and target backup simulation data may include:
[0080] S2721: Obtain target cache data from target simulation data, where the target cache data is simulation data generated before the first preset backup time;
[0081] S2722: Real-time generation of dynamic simulation data of the third target corresponding to the time period from the second preset backup time to the current time;
[0082] S2723: Based on the cache time information of the target cache data, the target filling data time period, and the time information of the third target dynamic simulation data, integrate the target cache data, target backup simulation data, and third target dynamic simulation data into target display data.
[0083] In other embodiments, the second preset backup time is the preset backup time corresponding to the backup operation after the current time, and step S270 above: generating target display data based on target simulation data and target backup simulation data may include:
[0084] S2731: Obtain target cache data from target simulation data, where the target cache data is simulation data generated before the first preset backup time;
[0085] S2732: Obtain first backup simulation data from the target backup simulation data. The first backup simulation data is simulation data generated before the third preset backup time. The third preset backup time is the preset backup time corresponding to a backup operation before the second preset backup time.
[0086] S2733: Obtain second backup simulation data from the target backup simulation data. The second backup simulation data is the simulation data corresponding to the second preset backup time. Specifically, the second backup simulation data is the simulation data generated during the time period from the third preset backup time to the second preset backup time.
[0087] S2734: Determine the proportion of the time difference between the third preset backup time and the current time in the preset backup cycle;
[0088] S2735: Based on the above proportions, correct each data parameter of the second backup simulation data;
[0089] S2736: Generate third backup simulation data corresponding to the time period from the third preset backup time to the current time based on the corrected data parameters;
[0090] S2737: Based on the cache time information of the target cache data, the time information of the first backup simulation data, and the time information of the third backup simulation data, integrate the target cache data, the first backup simulation data, and the third backup simulation data into the target display data.
[0091] In this embodiment of the disclosure, after step S270, the data generation method of the present disclosure may further include:
[0092] S281: Real-time simulation data of the target dynamic data display moment is generated in real time. The target dynamic data display moment is the moment after the end of the target display data display moment.
[0093] In practical applications, the time when the target dynamic data is displayed is the next moment after the end time of the target data display. As mentioned above, the end time of the target data display is the preset backup time corresponding to the backup operation before the current time, the preset backup time corresponding to the backup operation after the current time, or the current time.
[0094] Furthermore, the real-time simulation data is generated in the same way that the data display system generates simulation data during normal operation, without the need to increase the computational resource consumption to improve the data generation speed.
[0095] In some embodiments, step S281: generating real-time simulation data for the target dynamic data display moment may include:
[0096] S2811: Generate several target simulation instances at the moment of displaying the target dynamic data in real time. The number of target simulation instances is a random number within a preset range.
[0097] S2812: Obtain the preset correction factor corresponding to the time period to which the target dynamic data is displayed;
[0098] S2813: Correct the dynamic simulation data of several target simulation instances based on a preset correction factor, and use the corrected dynamic simulation data of several target simulation instances as the real-time simulation data at the time of target dynamic data display.
[0099] In practical applications, the target simulation instance can be the simulation instance corresponding to the business displayed in the target display window. Specifically, the target simulation instance includes dynamic simulation data corresponding to the displayed business data. In some cases, the number of target simulation instances is a random integer within a preset range. Specifically, the time period to which the target dynamic data is displayed can be divided according to the business time period, and the preset correction factor for different business time periods can be different; for example, each time node dividing the business time period can be each preset backup time in the preset backup time information. Specifically, the minimum time granularity of the real-time simulation data can be 1 second.
[0100] In some embodiments, the display service may be, for example, a network attack defense service, such as... Figure 3 The services shown in the document correspond to the target simulation instance, which can be a simulated attack instance. The dynamic simulation data of the simulated attack instance can include the total attack volume, the attack volume from different attack sources, the attack volume from different attack methods, the attack volume from different attack types, and the attack blocking volume, etc. The minimum time granularity of the dynamic simulation data of the simulated attack instance is 1 second.
[0101] In one embodiment, the specific implementation of generating dynamic simulation data corresponding to simulated attack instances can be as follows: creating an attack class corresponding to the simulated attack instance, including attributes such as attack source (randomly obtaining at least one source location), attack type, attack method, and whether it was successfully blocked. The attack type, attack method, attack source, and corresponding quantity, as well as the simulation data such as whether it was successfully blocked, in each simulated attack instance are all automatically generated random results.
[0102] Furthermore, during a simulated attack, a random number of simulated attack instances within a preset range are instantiated every second, for example, the preset range can be 2-10; then, a preset correction factor is determined for the time interval between the preset backup time corresponding to the backup operation before the target dynamic data display time and the preset backup time corresponding to the backup operation after the target dynamic data display time; the dynamic simulation data of the simulated attack instances is corrected based on the preset correction factor to obtain the real-time simulated data of the target dynamic data display time.
[0103] In some cases, if the data volume peaks at 12:00 and troughs at 24:00, and the data volume is twice that at 24:00 when the system is running, then the preset correction factor for the time period to which 24:00 belongs can be set to 1, and the preset correction factor for the time period to which 12:00 belongs can be set to 2. The preset correction factors for other time periods can be set in a similar manner.
[0104] Furthermore, the real-time simulation data for the target dynamic data display moment can be obtained by modifying the dynamic simulation data of the simulated attack instance based on the preset correction factor: multiply the random number of instances within the preset range per second by the preset correction factor to obtain the correction number per second, and use the dynamic simulation data obtained from the simulated attack instance based on the correction number as the real-time simulation data for the target dynamic data display moment.
[0105] Furthermore, the real-time simulation data at the moment of target dynamic data display can also be obtained by correcting the dynamic simulation data of the simulated attack instance based on the preset correction factor: obtain the dynamic simulation data of a random number of simulated attack instances instantiated every second within a preset range, multiply the dynamic simulation data of the random number of simulated attack instances by the preset correction factor, and obtain the real-time simulation data at the moment of target dynamic data display.
[0106] S282: Store real-time simulation data in a local cache;
[0107] S283: Based on preset backup time information, the real-time simulation data in the local cache is backed up as backup simulation data on a regular basis.
[0108] In practical applications, the generated real-time simulation data is updated to the local cache in real time, and the corresponding caching time is recorded to obtain the target simulation data. Further, after the target dynamic data is displayed, the real-time simulation data in the local cache is backed up periodically based on a preset backup time, and the corresponding backup time is recorded to obtain backup simulation data with a time granularity of a preset backup period. At the next system startup event, the update time of the target simulation data in the local cache is obtained to determine the time period where data is missing; this update time can be the most recent caching time of the target simulation data.
[0109] Furthermore, it may also include step S284: using real-time simulation data as real-time display data at the target dynamic data display moment;
[0110] In practical applications, during the operation of the data display system, the real-time simulated data generated at the target dynamic data display moment is used as the real-time display data. After visualization processing, it is displayed in the target display window to show the real-time dynamic changes of the corresponding business data.
[0111] In this embodiment of the disclosure, the data generation method may further include:
[0112] S291: When the time difference between the current time and the update time is less than the preset backup period, the time period from the current time to the update time is determined to be the time period in which simulated data is missing;
[0113] S292: Generate dynamic simulation data of the second target in real time corresponding to the time period in which simulation data is missing;
[0114] In practical applications, increasing the utilization of computing resources can accelerate the real-time generation of dynamic simulation data for the second target corresponding to the time period where simulation data is missing.
[0115] S293: Generate target display data based on target simulation data and second target dynamic simulation data.
[0116] In practical applications, the target simulation data and the second target dynamic simulation data can be integrated into target display data based on the cache time information of the target simulation data and the time periods in which the simulation data is missing.
[0117] In this embodiment of the disclosure, the system startup event may specifically include the initial deployment startup of the system and a system restart. In one embodiment, such as Figure 6 As shown, before determining the current time and the update time of the target simulation data in the local cache, the demonstration data generation method of this disclosure may further include:
[0118] S201: Determine if the target simulation data exists in the local cache;
[0119] S202: If it exists, perform the steps to determine the current time and the update time of the target simulation data in the local cache.
[0120] In practical applications, if the target simulation data exists in the local cache, the system startup event is determined to be a system restart, and the steps to determine the current time and update time are executed.
[0121] S203: If not present, determine the current time and the start display time;
[0122] In practical applications, the starting display time is the starting time at which the data to be displayed in the current target display window begins. For example, if the starting time of the current timeline of the target display window is 1:00 AM, then the starting display time is 1:00 AM.
[0123] S204: Determine the time period to be displayed based on the current time and the start time of the display;
[0124] In practical applications, the time period to be displayed is the period from the start display time to the current time.
[0125] S205: Obtain the target backup simulation template data corresponding to the time period to be displayed from the pre-stored backup template simulation data, wherein the backup template simulation data is template simulation data with a preset backup period as the time granularity;
[0126] S206: Generate target display data based on target backup template simulation data.
[0127] In practical applications, the data structure of backup template simulation data can be similar to that of backup simulation data described above. Backup template simulation data includes unit backup template simulation data with a preset backup time as the time node and a preset backup cycle as the time granularity. In one embodiment, the backup template simulation data can be simulation data obtained through testing before the system's initial deployment. Template simulation data is generated in real-time during testing and backed up at a preset backup cycle (which can be set as needed, such as hourly granularity, minute granularity, or daily granularity) to generate complete backup template simulation data. This ensures that the target display data generated after the initial deployment has realistic dynamic changes.
[0128] Accordingly, step S204: determining the time period to be displayed based on the current time and the start display time can be specifically as follows: the time period between the preset backup time corresponding to the current time and the preset backup time corresponding to the start display time is taken as the time period to be displayed. Specifically, if the current time is inconsistent with any preset backup time, the preset backup time corresponding to the current time is the preset backup time corresponding to the backup operation preceding the current time; if the current time is consistent with a preset backup time, the preset backup time corresponding to the current time is the preset backup time consistent with the current time. Similarly, if the start display time is inconsistent with any preset backup time, the preset backup time corresponding to the start display time is the preset backup time corresponding to the backup operation preceding or following the start display time; if the start display time is consistent with a preset backup time, the preset backup time corresponding to the start display time is the preset backup time consistent with the start display time.
[0129] Further, step S205: obtaining the target backup simulation template data corresponding to the time period to be displayed from the pre-stored backup template simulation data can be specifically as follows: obtaining the target backup simulation template data from the pre-stored backup simulation template data, wherein the target backup simulation template data is the simulation template data corresponding to the time period between the current time and the preset backup time corresponding to the start display time.
[0130] As can be seen from the technical solutions provided by the embodiments of this disclosure above, after responding to a system startup event, this disclosure determines the current time and the update time of the target simulation data in the local cache. By comparing the time difference between the current time and the update time with a preset backup period, the target filling data time period corresponding to the missing simulation data is determined. Then, the target backup simulation data corresponding to the target filling data time period is obtained from the pre-stored backup simulation data. Target display data is generated based on the target simulation data and the target backup simulation data, which completes the display data missing caused by the missing simulation data after the system restart. This can avoid blank data areas in the data display window, ensure the integrity of the display data, and effectively improve the display effect and enhance the viewing experience.
[0131] This disclosure also provides a data generation apparatus, such as... Figure 7 As shown, the device includes:
[0132] First determining module 10: used to determine the current time and the update time of the target simulation data in the local cache in response to the system startup event;
[0133] The second determining module 20 is used to determine the target filling data time period corresponding to the missing simulation data based on the information of the current time, cache update time and preset backup time when the time difference between the current time and the update time is greater than or equal to the preset backup period. The target filling data time period is a preset time period before the time period in which the simulation data is missing.
[0134] Acquisition module 30: used to acquire the target backup simulation data corresponding to the target filling data time period from the pre-stored backup simulation data;
[0135] Data generation module 40: Used to generate target display data based on target simulation data and target backup simulation data.
[0136] In some embodiments, the second determining module 20 may include:
[0137] First preset backup time acquisition unit: used to obtain the first preset backup time corresponding to the update time from the preset backup time information. The first preset backup time is the preset backup time corresponding to the backup operation before the update time.
[0138] Second preset backup time acquisition unit: used to obtain the second preset backup time corresponding to the current time from the preset backup time information. The second preset backup time is the preset backup time corresponding to the backup operation before the current time or the preset backup time corresponding to the backup operation after the current time.
[0139] Target data filling time period determination unit: used to determine the time period between the first preset backup time and the second preset backup time as the target data filling time period.
[0140] In some embodiments, the data generation module 40 may include:
[0141] Target cache data reading unit: used to obtain target cache data from target simulation data, where the target cache data is simulation data generated before the first preset backup time;
[0142] Target Display Data Integration Unit: Based on the cache time information of the target cache data and the target filling data time period, it integrates the target cache data and the target backup simulation data into target display data.
[0143] In some embodiments, the data generation apparatus may further include:
[0144] First judgment module: used to determine whether there is simulation data corresponding to the target filling data time period in the pre-stored backup simulation data before obtaining the target backup simulation data corresponding to the target filling data time period from the pre-stored backup simulation data;
[0145] The first dynamic simulation data generation module is used to: if it exists, execute the step of obtaining the target backup simulation data corresponding to the target filling data time period from the pre-stored backup simulation data; and if it does not exist, generate the first target dynamic simulation data corresponding to the time period where there is missing simulation data in real time, wherein the time period where there is missing simulation data is the time period from the update time to the current time.
[0146] The second data generation module is used to generate target display data based on the target simulation data and the first target dynamic simulation data.
[0147] In some embodiments, the data generation apparatus may further include:
[0148] The second judgment module is used to determine whether the target simulation data exists in the local cache before determining the current time and the update time of the target simulation data in the local cache.
[0149] Time determination module: If it exists, it is used to perform the steps of determining the current time and the update time of the target simulation data in the local cache; and if it does not exist, it is used to determine the current time and the start display time.
[0150] The module for determining the time period to be displayed is used to determine the time period to be displayed based on the current time and the start time of the display.
[0151] Backup simulation template data acquisition module: used to acquire the target backup simulation template data corresponding to the time period to be displayed from the pre-stored backup template simulation data. The backup template simulation data is template simulation data with a preset backup period as the time granularity.
[0152] The third data generation module is used to generate target display data based on simulated data from the target backup template.
[0153] In some embodiments, the data generation apparatus may further include:
[0154] Real-time simulation data generation module: After generating target display data based on target simulation data and target backup simulation data, it generates real-time simulation data for the target dynamic data display moment. The target dynamic data display moment is the next moment after the end of the target display data display moment.
[0155] Real-time simulation data storage module: used to store real-time simulation data in a local cache;
[0156] Simulated data backup module: Used to periodically back up real-time simulated data in the local cache into backup simulated data based on preset backup time information.
[0157] Current display data determination module: used to use real-time simulation data as the real-time display data at the target dynamic data display moment;
[0158] In some embodiments, the real-time simulation data generation module may include:
[0159] Target simulation instance generation unit: used to generate several target simulation instances in real time for the display of target dynamic data. The number of target simulation instances is a random number within a preset range.
[0160] Preset correction factor acquisition unit: used to acquire the preset correction factor corresponding to the time period to which the target dynamic data is displayed;
[0161] Dynamic simulation data correction unit: used to correct the dynamic simulation data of several target simulation instances based on a preset correction factor, and use the corrected dynamic simulation data of several target simulation instances as the real-time simulation data at the time of target dynamic data display.
[0162] In some embodiments, the data generation apparatus may further include:
[0163] The module for determining the time period with missing simulated data is used to determine the time period between the current time and the update time as the time period with missing simulated data when the time difference between the current time and the update time is less than the preset backup period.
[0164] Second Target Dynamic Simulation Data Generation Module: Used to generate second target dynamic simulation data in real time corresponding to the time period where simulation data is missing;
[0165] The fourth data generation module is used to generate target display data based on the target simulation data and the second target dynamic simulation data.
[0166] The apparatus and method embodiments in the device embodiments are based on the same application concept.
[0167] This disclosure provides a display data generation device, which includes a processor and a memory. The memory stores at least one instruction or at least one program, which is loaded and executed by the processor to implement the display data generation method provided in the above method embodiments.
[0168] Memory is used to store software programs and modules. The processor executes these stored software programs and modules to perform various functional applications and data processing. Memory can primarily consist of a program storage area and a data storage area. The program storage area stores the operating system, application programs required for functionality, etc.; the data storage area stores data created based on device usage, etc. Furthermore, memory can include high-speed random access memory (RAM) and non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, memory can also include a memory controller to provide the processor with access to the memory.
[0169] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various alternative implementations described above.
[0170] The method embodiments provided in this disclosure can be executed in a mobile terminal, computer terminal, server or similar computing device. Figure 8 This is a hardware structure block diagram of a device for implementing a data generation method, as provided in an embodiment of this application. For example... Figure 8As shown, the device 800 can vary significantly due to different configurations or performance. It may include one or more central processing units (CPUs) 810 (CPUs 810 may include, but are not limited to, microprocessors (MCUs) or programmable logic devices (FPGAs), a memory 830 for storing data, and one or more storage media 820 (e.g., one or more mass storage devices) for storing application programs 823 or data 822. The memory 830 and storage media 820 may be temporary or persistent storage. The program stored in the storage media 820 may include one or more modules, each module may include a series of instruction operations on a server. Furthermore, the CPU 810 may be configured to communicate with the storage media 820 and execute the series of instruction operations in the storage media 820 on the device 800. Device 800 may also include one or more power supplies 860, one or more wired or wireless network interfaces 850, one or more input / output interfaces 840, and / or one or more operating systems 821, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.
[0171] The input / output interface 840 can be used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of device 800. In one example, the input / output interface 840 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the input / output interface 840 may be a radio frequency (RF) module for wireless communication with the Internet.
[0172] Those skilled in the art will understand that Figure 8 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, device 800 may also include... Figure 8 The more or fewer components shown, or having the same Figure 8 The different configurations shown.
[0173] Embodiments of this disclosure also provide a computer-readable storage medium, which may be disposed in a device to store at least one instruction or at least one program related to implementing a display data generation method in the method embodiments, wherein the at least one instruction or the at least one program is loaded and executed by the processor to implement the display data generation method provided in the above method embodiments.
[0174] Optionally, in this embodiment, the storage medium may be located at at least one of the multiple network servers in a computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0175] As can be seen from the embodiments of the display data generation method, apparatus, device, or storage medium provided in this disclosure above, after responding to a system startup event, this disclosure determines the current time and the update time of the target simulation data in the local cache. By comparing the time difference between the current time and the update time with a preset backup period, the target filling data time period corresponding to the missing simulation data is determined. Then, the target backup simulation data corresponding to the target filling data time period is obtained from the pre-stored backup simulation data. The target display data is generated based on the target simulation data and the target backup simulation data, which completes the display data missing caused by the missing simulation data after the system restart. This can avoid blank data areas in the data display window, ensure the integrity of the display data, and effectively improve the display effect and enhance the viewing experience.
[0176] It should be noted that the order of the embodiments described above is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. Furthermore, the above description focuses on specific embodiments. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims can be performed in a different order than those shown in the embodiments and still achieve the desired results. Additionally, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired results. In some implementations, multitasking and parallel processing are also possible or may be advantageous.
[0177] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments of apparatus, devices, servers, and storage media are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0178] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware, or by a program instructing the relevant hardware to implement them. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0179] The above are merely preferred embodiments of this disclosure and are not intended to limit this disclosure. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this disclosure should be included within the protection scope of this disclosure.
Claims
1. A method for generating display data, characterized in that, The method includes: In response to the system startup event, determine the current time and the update time of the target simulation data in the local cache; When the time difference between the current time and the update time is greater than or equal to the preset backup period, the first preset backup time corresponding to the update time is obtained from the preset backup time information. The first preset backup time is the preset backup time corresponding to the backup operation before the update time. Obtain a second preset backup time corresponding to the current time from the preset backup time information. The second preset backup time is either the preset backup time corresponding to the backup operation before the current time or the preset backup time corresponding to the backup operation after the current time. The time period between the first preset backup time and the second preset backup time is determined as the target data filling time period, which is a preset time period before the time period in which simulated data is missing; Obtain the target backup simulation data corresponding to the target data filling time period from the pre-stored backup simulation data; Target display data is generated based on the target simulation data and the target backup simulation data.
2. The method according to claim 1, characterized in that, The generation of target display data based on the target simulation data and the target backup simulation data includes: Obtain target cache data from the target simulation data, wherein the target cache data is simulation data generated before the first preset backup time. Based on the cache time information of the target cache data and the time period of the target filling data, the target cache data and the target backup simulation data are integrated into the target display data.
3. The method according to any one of claims 1 to 2, characterized in that, Before retrieving the target backup simulation data corresponding to the target filling data time period from the pre-stored backup simulation data, the method further includes: Determine whether there is simulated data corresponding to the target data filling time period in the pre-stored backup simulation data; If it exists, execute the step of retrieving the target backup simulation data corresponding to the target filling data time period from the pre-stored backup simulation data; If it does not exist, first target dynamic simulation data corresponding to the time period in which the simulation data is missing is generated in real time, and the time period in which the simulation data is missing is the time period from the update time to the current time. The target display data is generated based on the target simulation data and the first target dynamic simulation data.
4. The method according to any one of claims 1 to 2, characterized in that, Before determining the current time and the update time of the target simulation data in the local cache, the method further includes: Determine whether the target simulation data exists in the local cache; If it exists, execute the step of determining the current time and the update time of the target simulation data in the local cache; If not, determine the current time and the start display time; The time period to be displayed is determined based on the current time and the start display time; Obtain the target backup template simulation data corresponding to the time period to be displayed from the pre-stored backup template simulation data, wherein the backup template simulation data is template simulation data with the preset backup period as the time granularity; The target display data is generated based on the target backup template simulation data.
5. The method according to any one of claims 1 to 2, characterized in that, After generating target display data based on the target simulation data and the target backup simulation data, the method further includes: Real-time simulation data of the target dynamic data display moment is generated in real time, and the target dynamic data display moment is the moment after the end of the target display data display moment; Store the real-time simulation data in a local cache; Based on preset backup time information, the real-time simulation data in the local cache is periodically backed up as backup simulation data.
6. The method according to claim 5, characterized in that, The real-time simulation data for the moment when the target dynamic data is displayed includes: Several target simulation instances are generated in real time at the moment of display of the target dynamic data, and the number of target simulation instances is a random number within a preset range; Obtain the preset correction factor corresponding to the time period to which the target dynamic data is displayed; The dynamic simulation data of the plurality of target simulation instances are corrected based on the preset correction factor, and the corrected dynamic simulation data of the plurality of target simulation instances is used as the real-time simulation data at the time of display of the target dynamic data.
7. The method according to any one of claims 1 to 2, characterized in that, The method further includes: When the time difference between the current time and the update time is less than the preset backup period, the time period between the current time and the update time is determined to be the time period in which simulated data is missing. Real-time generation of second target dynamic simulation data corresponding to the time period in which simulation data is missing; The target display data is generated based on the target simulation data and the second target dynamic simulation data.
8. A data generation device for display, characterized in that, The device includes: The first determination module is used to determine the current time and the update time of the target simulation data in the local cache in response to the system startup event. The second determining module is used to: obtain a first preset backup time corresponding to the update time from the preset backup time information when the time difference between the current time and the update time is greater than or equal to a preset backup period; obtain a second preset backup time corresponding to the current time from the preset backup time information, where the second preset backup time is either the preset backup time corresponding to the backup operation before the update time or the preset backup time corresponding to the backup operation after the current time; and determine the time period between the first preset backup time and the second preset backup time as the target data filling time period, where the target data filling time period is a preset time period before the time period in which simulated data is missing. Acquisition module: used to acquire the target backup simulation data corresponding to the target filling data time period from the pre-stored backup simulation data; First data generation module: used to generate target display data based on the target simulation data and the target backup simulation data.
9. The apparatus according to claim 8, characterized in that, The data generation module includes: Target cache data reading unit: used to obtain target cache data from the target simulation data, wherein the target cache data is simulation data generated before the first preset backup time; Target display data integration unit: used to integrate the target cache data and the target backup simulation data into the target display data based on the cache time information of the target cache data and the target filling data time period.
10. The apparatus according to any one of claims 8-9, characterized in that, The device further includes: First judgment module: used to determine whether there is simulation data corresponding to the target filling data time period in the pre-stored backup simulation data before obtaining the target backup simulation data corresponding to the target filling data time period from the pre-stored backup simulation data; First dynamic simulation data generation module: if it exists, executes the step of obtaining the target backup simulation data corresponding to the target filling data time period from the pre-stored backup simulation data; and if it does not exist, generates first target dynamic simulation data in real time corresponding to the time period where simulation data is missing, wherein the time period where simulation data is missing is the time period from the update time to the current time. The second data generation module is used to generate the target display data based on the target simulation data and the first target dynamic simulation data.
11. The apparatus according to any one of claims 8-9, characterized in that, Before determining the current time and the update time of the target simulation data in the local cache, the apparatus further includes: The second judgment module is used to determine whether the target simulation data exists in the local cache. Time determination module: if it exists, executes the step of determining the current time and the update time of the target simulation data in the local cache; and if it does not exist, determines the current time and the start display time; The module for determining the time period to be displayed is used to determine the time period to be displayed based on the current time and the start time of the display. Backup simulation template data acquisition module: used to acquire target backup template simulation data corresponding to the time period to be displayed from pre-stored backup template simulation data, wherein the backup template simulation data is template simulation data with the preset backup period as the time granularity; The third data generation module is used to generate the target display data based on the simulated data of the target backup template.
12. The apparatus according to any one of claims 8-9, characterized in that, The device further includes: Real-time simulation data generation module: After generating target display data based on the target simulation data and the target backup simulation data, it generates real-time simulation data of the target dynamic data display moment in real time, wherein the target dynamic data display moment is the moment after the end of the target display data display moment; Real-time simulation data storage module: used to store the real-time simulation data in a local cache; Simulated data backup module: used to periodically back up the real-time simulated data in the local cache into backup simulated data based on preset backup time information.
13. The apparatus according to claim 12, characterized in that, The real-time simulation data generation module includes: Target simulation instance generation unit: used to generate several target simulation instances in real time at the moment of display of the target dynamic data, wherein the number of target simulation instances is a random number within a preset range; Preset correction factor acquisition unit: used to acquire the preset correction factor corresponding to the time period to which the target dynamic data is displayed; Dynamic simulation data correction unit: used to correct the dynamic simulation data of the plurality of target simulation instances based on the preset correction factor, and use the corrected dynamic simulation data of the plurality of target simulation instances as the real-time simulation data at the time of display of the target dynamic data.
14. The apparatus according to any one of claims 8-9, characterized in that, The device further includes: The module for determining the time period with missing simulated data is used to determine the time period from the current time to the update time as the time period with missing simulated data when the time difference between the current time and the update time is less than a preset backup period. Second target dynamic simulation data generation module: used to generate second target dynamic simulation data in real time corresponding to the time period in which simulation data is missing; The fourth data generation module is used to generate the target display data based on the target simulation data and the second target dynamic simulation data.
15. A computer-readable storage medium, characterized in that, The storage medium stores at least one instruction or at least one program segment, which is loaded and executed by a processor to implement the display data generation method as described in any one of claims 1 to 7.
16. A data generation device for display, characterized in that, The device includes a processor and a memory, the memory storing at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by the processor to implement the display data generation method as described in any one of claims 1 to 7.
17. A computer program product, characterized in that, The computer program product or computer program includes computer instructions stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the display data generation method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Data processing method and device
CN104965815A
Data processing method and related equipment
CN111338624A