Front-end large-screen data rolling display method and system capable of adapting to data volume
By setting the time window and preset data volume in the large-screen scrolling list, and dynamically adjusting the scrolling speed using AJAX communication and speed adjustment algorithm, the problem of not being able to adjust the scrolling speed according to the data density in the existing technology is solved, and better data display effect and user experience are achieved.
Patent Information
- Application Number
- CN202411947242.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-04-04
AI Technical Summary
The prior art cannot dynamically adjust the scrolling speed of the large-screen scrolling list based on changes in data density in online shooting range competitions, resulting in incomplete data display or wasted time and space, and cannot meet the game's real-time, accuracy and user-friendly needs of data display.
By setting the time window and preset data volume, the attack data in the network shooting range game is requested regularly using the AJAX communication method, the rolling speed multiple is calculated based on the ratio of the current data volume to the preset data volume, and the scrolling speed is dynamically adjusted according to the correction value of the reference speed and speed adjustment factor.
It achieves the best display effect under different data densities, avoids the problem of incomplete data display or wasting time and space, and improves the real-time, accuracy and user experience of data display.
Smart Images

Figure CN119766676A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing and front-end display, and in particular to a front-end large-screen data scrolling display method and system with adaptive data volume, which is suitable for network range data monitoring and display scenarios. Background Art
[0002] In the network shooting competition, it is crucial to display the attack data in real time through a list on the big screen, but the amount of data fluctuates greatly, and the fixed scrolling list speed display method has limitations. When the amount of data increases greatly, scrolling the list data at a fixed speed will result in incomplete data display. When the amount of data is small, using a fixed speed to scroll will result in blank data for a period of time. Therefore, the existing technology cannot dynamically adjust the scrolling speed according to the data density, and cannot fully meet the competition's requirements for real-time, accuracy, and user-friendliness of data display. A large-screen display technology that can intelligently adjust the scrolling speed according to the data density is needed. Summary of the invention
[0003] Purpose of the invention: In view of the problems existing in the above-mentioned prior art, the purpose of the present invention is to provide a front-end large-screen data scrolling display method and system with adaptive data volume, which can dynamically adjust the front-end large-screen data scrolling speed to adapt to the changes in the amount of data in the network shooting game.
[0004] Technical solution: To achieve the above-mentioned invention object, the present invention adopts the following technical solution:
[0005] A front-end large-screen data scrolling display method with adaptive data volume includes the following steps:
[0006] Setting a time window and a preset data volume; the preset data volume is set based on the maximum number of data items that can be displayed in the scrolling list within a fixed time;
[0007] The front end uses AJAX communication to periodically request attack data in the network target game according to the set polling time interval;
[0008] Determine the total time required for the current amount of data based on the amount of data requested in the current time window and the scrolling time of each piece of data, and divide the total time by the length of the time window to obtain the scrolling speed multiple; the scrolling time of each piece of data is determined based on the preset amount of data;
[0009] Multiply the scroll speed multiplier by the base speed to get the adjusted speed;
[0010] The adjusted speed is applied to the scrolling speed of the large-screen scrolling list to achieve dynamic adjustment.
[0011] Preferably, the preset data amount is the maximum number of data items determined within the set time window based on the height of the scrolling list and the height of each data item. When the polling time interval is the same as the set time window, if the amount of data obtained by the current polling is greater than the preset data amount, the scrolling speed is increased; if the amount of data obtained by the current polling is equal to the preset data amount, the original speed is maintained; if the amount of data obtained by the current polling is less than the preset data amount, the scrolling speed is slowed down.
[0012] Preferably, a maximum value and a minimum value of the scrolling speed are set, and if the adjusted speed exceeds the set maximum value or minimum value of the speed, the maximum value or the minimum value is taken.
[0013] Preferably, when the scroll speed multiple is multiplied by the reference speed to obtain the adjusted speed, a speed adjustment factor correction value is added. When the speed adjustment factor correction value is 1, no additional correction is performed. When it is less than 1, it is used to slow down the speed. When it is greater than 1, it is used to speed up the speed.
[0014] Preferably, after the maximum speed limit and the speed adjustment factor correction value slow down the speed, the amount of undisplayed data in the current time window is accumulated to the next time window, and the next time window dynamically adjusts the scrolling speed based on the accumulated data amount and the requested data amount.
[0015] Preferably, the data volume, basic scrolling speed and current scrolling speed of the current time window are displayed on the large-screen scrolling list.
[0016] Preferably, each piece of attack data includes the time when the attack occurred and the attack content, and occupies a line in the scrolling list on the large screen.
[0017] A front-end large-screen data scrolling display system with adaptive data volume, comprising:
[0018] A configuration module, used to set a time window and a preset data volume; the preset data volume is set based on the maximum number of data items that can be displayed in the scrolling list within a fixed time;
[0019] The data acquisition module is used for the front end to use AJAX communication to periodically request attack data in the network target game according to the set polling time interval;
[0020] A multiple calculation module is used to determine the total time required for the current data volume according to the data volume requested in the current time window and the scrolling time of each data, and to obtain the scrolling speed multiple by dividing the total time by the length of the time window; the scrolling time of each data is determined according to the preset data volume;
[0021] A speed calculation module, used for multiplying the scroll speed multiple with the reference speed to obtain an adjusted speed;
[0022] The dynamic adjustment module is used to apply the adjusted speed to the scrolling speed of the large-screen scrolling list to achieve dynamic adjustment.
[0023] A computer system includes a memory, a processor, and a computer program / instruction stored in the memory and executable on the processor. When the computer program / instruction is executed by the processor, the steps of a front-end large-screen data scrolling display method with adaptive data volume are implemented.
[0024] A computer program product includes a computer program / instruction, which, when executed by a processor, implements the steps of a method for scrolling data on a front-end large screen with adaptive data volume.
[0025] Beneficial effects: Compared with the prior art, the present invention has the following advantages:
[0026] 1. The present invention sets a time window and a preset data volume, calculates a scrolling speed multiple according to the ratio of the actual data volume to the preset data volume, sets a reference speed, and adjusts the scrolling speed according to the multiple, thereby ensuring that the best display effect can be provided under different data densities and avoiding the problem of incomplete data display or waste of time and space.
[0027] 2. The present invention introduces a speed adjustment factor correction value and sets the maximum and minimum speed values to prevent the speed from being too fast or too slow. Such a speed adjustment strategy and restriction mechanism ensures the user experience, and the data will not be difficult to see due to too fast speed, nor will the fluency be affected due to too slow speed.
[0028] 3. The front-end uses AJAX communication to dynamically adjust the polling time interval and respond to data changes in real time. The system parameters are configurable to meet the needs of different competition scenarios, improving the real-time, accuracy and user experience of data display. The configurable parameters and the characteristics of real-time response to data changes enhance the applicability and flexibility of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 The figure is a schematic diagram of a method flow of an embodiment of the present invention.
[0030] Figure 2 This is a schematic diagram of a large-screen scrolling list display in an embodiment of the present invention. DETAILED DESCRIPTION
[0031] The technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings and specific embodiments.
[0032] In order to solve the problem of large-screen data display in network shooting range competitions, the embodiment of the present invention discloses a front-end large-screen data scrolling display method with adaptive data volume, which is particularly suitable for the scene of large-screen scrolling list display in network shooting ranges. By intelligently analyzing the relationship between time range and data density, the speed of the scrolling list and the display content are dynamically adjusted. This can not only ensure that key data is displayed in a timely and sufficient manner, but also effectively utilize the large-screen space, significantly improving the effect and efficiency of data visualization.
[0033] like Figure 1 As shown, the method for scrolling display of front-end large-screen data based on adaptive data volume according to an embodiment of the present invention mainly includes the following steps:
[0034] Step S1: Set a time window and preset data volume.
[0035] Time window: The time window represents the time interval for data evaluation, such as 1 minute or 1 hour, which is determined according to the update time display requirements.
[0036] Preset data volume: It is set based on the maximum number of data that can be displayed in the scroll list within a fixed time, such as a maximum of 100 data items can be displayed in 1 minute. From this, we can calculate the average time required for each data item to scroll, that is, 1 minute divided by 100 items, which is equal to 0.01 minutes of display time for each data item.
[0037] Step S2: The front end uses AJAX communication to periodically request attack data in the network target game according to a set polling time interval.
[0038] In this step, the front end initiates a data request and requests the attack data in the network target game through the AJAX communication method. At the same time, a fixed polling time interval is set, such as once every second or every few seconds. This time can be configured in the background to facilitate dynamic adjustment of the time interval. The data returned by the server is the attack data of this time interval. Each piece of data in this data contains fields such as the time when the attack occurred and the attack content. When the game ends or there is no data, the server returns the data and gives the identification respectively. The large screen scrolls the list to show that the game is over or there is no attack data.
[0039] Step S3: Determine the total time required for the current amount of data based on the amount of data requested in the current time window and the scrolling time of each piece of data, and divide the total time by the length of the time window to obtain the scrolling speed multiple.
[0040] The core of scroll speed calculation is to evaluate the amount of data in a specific time period. The process starts with the setting of the time window and the preset data volume. In this example, we set the time window to 1 minute. The preset data volume is to display a maximum of 100 data in 1 minute.
[0041] Calculate the time required for each piece of data to scroll: If 100 pieces of data are displayed in 1 minute, then the time required for each piece of data to scroll is: each piece of data scrolling time = 1 minute / 100 = 0.01 minutes.
[0042] Calculate the total time required for the current data volume: Assuming that the current data volume is N, the total time required for the current data volume is: total time = N × 0.01 minutes.
[0043] Process the overall time and get the multiple: divide the overall time by the time window length (1 minute) to get the multiple: Multiple = (N*0.01 minutes) / 1 minute = N*0.01, which can be simplified to multiple = N / 100 (because the preset data volume is 100).
[0044] Example calculation: Assume that the time window is 1 minute and the preset maximum data volume is 100. The current data volume is 200. The scrolling time of each data: The scrolling time of each data = 100 / 1 minute = 0.01 minute. Overall time: Overall time = 200 × 0.01 minute = 2 minutes. Multiple density_ratio: Multiple = 2 minutes / 1 minute = 2.
[0045] The purpose of the multiple calculation here is to evaluate the "density" of the current data volume relative to the preset data volume, so as to decide whether the scrolling speed should be accelerated, maintained, or slowed down. If the multiple is greater than 1, it means that the current data volume is large and the scrolling speed needs to be accelerated; if the multiple is equal to 1, it means that the data volume is just right and the original speed is maintained; if the multiple is less than 1, it means that the data volume is small and the scrolling speed needs to be slowed down.
[0046] The time window in step S1 is greater than or equal to the polling time interval in step 2. If the time window and the polling time interval are inconsistent, for example, the time window of the large screen and the preset data volume are 100 items that can be displayed in 1 minute, for example, the interface polling time is 10s and the request is made once, and the server returns 10 items each time, then 60 items can be displayed in 1 minute. This requires the front end to accumulate data within this 1 minute and then adjust the speed. If the time window and the polling time interval are consistent, for example, the time window of the large screen and the preset data volume are 100 items that can be displayed in 1 minute, for example, the interface polling time is 1 minute and the request is made once, and the server directly returns 60 items, then 60 items can be displayed in 1 minute, and there is no need to accumulate data and then adjust the speed.
[0047] Step S4: multiplying the scroll speed multiple by the reference speed to obtain an adjusted speed.
[0048] Specifically, first, set a base scrolling speed, such as speed_base is 1, which represents the scrolling speed under standard conditions (that is, when the data density multiplier is 1). For example, if the speed of displaying 100 data items in 1 minute is the base speed, then speed_base is set to 1.
[0049] Then, the scrolling speed is adjusted according to the data density multiple density_ratio (ie, 0.01N, where N is the current data amount) calculated in step S3.
[0050] The adjusted speed speed_adjusted can be calculated by the following formula: speed_adjusted =
[0051] speed_base*density_ratio*speed_factor_modifier
[0052] Among them, speed_factor_modifier is a speed adjustment factor correction value, which is used to fine-tune the speed to ensure that the scrolling effect is neither too fast nor too slow. This value can be set according to actual needs, such as 1 (no additional correction), or adjusted appropriately according to test results. In actual tests, if the scrolling speed is found to be too fast or too slow, the value of speed_factor_modifier can be fine-tuned to optimize the scrolling effect. For example, if the scrolling speed is too fast, the speed_factor_modifier can be set to a value less than 1 (such as 0.8) to slow down the speed; if the scrolling speed is too slow, it can be set to a value greater than 1 (such as 1.2) to speed up the speed.
[0053] From the above, we can get the following speed adjustment strategy:
[0054] Acceleration strategy: If density_ratio is greater than 1, it means that the current data volume exceeds the preset maximum data volume, and the scrolling speed should be increased. In this case, speed_adjusted will be greater than speed_base.
[0055] Keep the original speed: If density_ratio is equal to 1, it means that the current data volume is exactly equal to the preset maximum data volume, and the scrolling speed remains unchanged, that is, speed_adjusted is equal to speed_base.
[0056] Slowdown strategy: If density_ratio is less than 1, it means that the current data volume is less than the preset maximum data volume, and the scrolling speed should be slowed down. In this case, speed_adjusted will be less than speed_base.
[0057] In order to prevent the scrolling speed from being too fast and causing the user to be unable to see the data clearly, or too slow and causing the data display to be unsmooth, set the maximum and minimum values of the speed, for example, the maximum is 2 and the minimum is 0.2. If the calculated speed_adjusted exceeds the maximum speed value, it is limited to the maximum speed; if it is lower than the minimum speed value, it is limited to the minimum speed to maintain the smoothness of data display. After the display is completed, there is no data to be displayed. When the speed reaches the maximum limit, or the speed adjustment factor correction value causes the speed to slow down, the data display in the current time period may be incomplete. In order to deal with this problem, we have adopted a dynamic adjustment strategy: accumulate the amount of data that is not fully displayed in the next data request, and dynamically adjust the scrolling speed based on the accumulated data to repeat the above calculation process.
[0058] Step S5: Apply the adjusted speed (i.e. speed_adjusted) to the scrolling speed of the large screen scrolling list to achieve dynamic adjustment. Figure 2 .
[0059] Based on the same inventive concept, an embodiment of the present invention discloses a front-end large-screen data scrolling display system with adaptive data volume, including: a configuration module, used to set a time window and a preset data volume; the preset data volume is set based on the maximum number of data items that can be displayed in the scrolling list within a fixed time; a data acquisition module, used for the front end to use the AJAX communication method to periodically request attack data in the network target game according to the set polling time interval; a multiple calculation module, used to determine the overall time required for the current data volume according to the data volume requested in the current time window and the scrolling time of each data, and divide the overall time by the length of the time window to obtain the scrolling speed multiple; the scrolling time of each data is determined according to the preset data volume; a speed calculation module, used to multiply the scrolling speed multiple by the reference speed to obtain an adjusted speed; a dynamic adjustment module, used to apply the adjusted speed to the scrolling speed of the large-screen scrolling list to achieve dynamic adjustment.
[0060] An embodiment of the present invention also discloses a computer system, including a memory, a processor, and a computer program / instruction stored in the memory and executable on the processor. When the computer program / instruction is executed by the processor, the steps of a front-end large-screen data scrolling display method with an adaptive data volume are implemented.
[0061] An embodiment of the present invention also discloses a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of a method for scrolling display of front-end large-screen data with adaptive data volume.
Claims
1. A method for scrolling display of front-end large-screen data with adaptive data volume, characterized in that: The steps include: Setting a time window and a preset data volume; the preset data volume is set based on the maximum number of data items that can be displayed in the scrolling list within a fixed time; The front end uses AJAX communication to periodically request attack data in the network target game according to the set polling time interval; Determine the total time required for the current amount of data based on the amount of data requested in the current time window and the scrolling time of each piece of data, and divide the total time by the length of the time window to obtain the scrolling speed multiple; the scrolling time of each piece of data is determined based on the preset amount of data; Multiply the scroll speed multiplier by the base speed to get the adjusted speed; Apply the adjusted speed to the scrolling speed of the large-screen scrolling list to achieve dynamic adjustment.
2. According to the method of scrolling display of front-end large-screen data with adaptive data volume according to claim 1, it is characterized in that: The preset data amount is the maximum number of data items determined within the set time window based on the height of the scrolling list and the height of each data item. When the polling time interval is the same as the set time window, if the amount of data obtained by the current polling is greater than the preset data amount, the scrolling speed is increased; if the amount of data obtained by the current polling is equal to the preset data amount, the original speed is maintained; if the amount of data obtained by the current polling is less than the preset data amount, the scrolling speed is slowed down.
3. According to the method of scrolling display of front-end large-screen data with adaptive data volume as described in claim 1, it is characterized in that: Set the maximum and minimum scroll speed. If the adjusted speed exceeds the maximum or minimum speed, the maximum or minimum value will be used.
4. According to the method of scrolling display of front-end large-screen data with adaptive data volume according to claim 1, it is characterized in that: When the scroll speed multiple is multiplied by the reference speed to obtain the adjusted speed, a speed adjustment factor correction value is added. When the speed adjustment factor correction value is 1, no additional correction is performed. When it is less than 1, it is used to slow down the speed. When it is greater than 1, it is used to speed up the speed.
5. According to the method of scrolling display of front-end large-screen data with adaptive data volume as claimed in claim 1, it is characterized in that: After the maximum speed limit and the speed adjustment factor correction value slow down the speed, the undisplayed data in the current time window is accumulated to the next time window, and the next time window dynamically adjusts the scrolling speed based on the accumulated data volume and the requested data volume.
6. The method for scrolling display of front-end large-screen data with adaptive data volume according to claim 1 is characterized in that: The data volume, basic scrolling speed and current scrolling speed of the current time window are displayed on the large-screen scrolling list.
7. The method for scrolling display of front-end large-screen data with adaptive data volume according to claim 1 is characterized in that: Each attack data contains the time and content of the attack, and occupies one line in the scrolling list on the large screen.
8. A front-end large-screen data scrolling display system with adaptive data volume, characterized in that: include: A configuration module, used to set a time window and a preset data volume; the preset data volume is set based on the maximum number of data items that can be displayed in the scrolling list within a fixed time; The data acquisition module is used for the front end to use AJAX communication to periodically request attack data in the network target game according to the set polling time interval; A multiple calculation module is used to determine the total time required for the current data volume according to the data volume requested in the current time window and the scrolling time of each data, and to obtain the scrolling speed multiple by dividing the total time by the length of the time window; the scrolling time of each data is determined according to the preset data volume; A speed calculation module, used for multiplying the scroll speed multiple with the reference speed to obtain an adjusted speed; The dynamic adjustment module is used to apply the adjusted speed to the scrolling speed of the large-screen scrolling list to achieve dynamic adjustment.
9. A computer system comprising a memory, a processor, and a computer program / instruction stored in the memory and executable on the processor, characterized in that: When the computer program / instructions are executed by the processor, the steps of a front-end large-screen data scrolling display method with adaptive data volume according to any one of claims 1-7 are implemented.
10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by the processor, the steps of a front-end large-screen data scrolling display method with adaptive data volume according to any one of claims 1-7 are implemented.