Data display method, device, computer equipment and storage medium

By using a random function prediction interface to refresh the random values ​​in the period when slicing data, and displaying data in combination with actual numerical values, the problem of the illusion that data display is prone to uniform changes in the prior art is solved, and the display effect and authenticity of the data are improved.

CN114510668BActive Publication Date: 2025-04-18PINGAN INT SMART CITY TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210145272.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-17
Publication Date
2025-04-18
Estimated Expiration
2042-02-17

AI Technical Summary

Technical Problem

When performing data slicing, the prior art usually adopts an even distribution method, which leads to the illusion of uniform changes in the data display and lacks authenticity.

Method used

By receiving a real-time data display request for the target data, the numerical value of the target data is obtained, and the random value in the refresh period based on the random function prediction interface corresponding to the previous value and the current value is displayed in combination with the actual value and the predicted random value.

Benefits of technology

The display effect and authenticity of the data are improved. By combining actual numerical values ​​and predicting random values, the illusion of uniform changes is avoided, and the authenticity of real-time display of data is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114510668B_ABST
    Figure CN114510668B_ABST
Patent Text Reader

Abstract

The present application relates to the field of data processing technology, and provides a data display method, device, computer equipment and storage medium, wherein the method comprises: receiving a data real-time display request for target data; when a first moment arrives, obtaining a first value of the target data; based on the random function corresponding to the first value and the second value, predicting at least two first random values ​​in a period from a second moment to the first moment, the second value is the value of the target data obtained when the second moment arrives, and the time difference between the first moment and the second moment is the interface refresh duration; based on the first value, the first random value and the second value, displaying the target data from the second moment to the first moment. The present application can improve the display effect of data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] Web applications generally adopt a front-end and back-end separation design, where the front-end is responsible for interacting with users and the back-end is responsible for business logic processing (such as data verification, database reading and writing, etc.). When the back-end performance pressure is high, the front-end can display data in the form of data slicing to alleviate the performance pressure of the back-end. At present, data slicing is usually performed by evenly distributing sliced ​​data, so the sliced ​​data changes evenly, which easily creates the illusion that the data changes evenly. Therefore, how to slice data to improve the display effect of data is a technical problem to be solved by those skilled in the art. Summary of the invention

[0003] The embodiments of the present application provide a data display method, apparatus, computer equipment and storage medium, which can improve the display effect of data.

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

[0005] receiving a data real-time display request for target data;

[0006] When a first moment arrives, obtaining a first value of the target data;

[0007] Based on the random function corresponding to the first value and the second value, predict at least two first random values ​​in a period from a second moment to the first moment, where the second value is a value of the target data acquired when the second moment arrives, and the time difference between the first moment and the second moment is the interface refresh duration;

[0008] Based on the first numerical value, the first random value, and the second numerical value, target data from the second moment to the first moment is displayed.

[0009] In a second aspect, an embodiment of the present application provides a data display device, wherein:

[0010] A communication unit, used for receiving a data real-time display request for target data;

[0011] a processing unit, configured to obtain a first value of the target data when a first moment arrives; and predict at least two first random values ​​in a period from a second moment to the first moment based on a random function corresponding to the first value and the second value, wherein the second value is a value of the target data obtained when the second moment arrives, and a time difference between the first moment and the second moment is an interface refresh duration;

[0012] A display unit is used to display target data from the second moment to the first moment based on the first numerical value, the first random value and the second numerical value.

[0013] In a third aspect, an embodiment of the present application provides a computer device, comprising a processor, a memory, a communication interface, and a computer program, wherein the computer program is stored in the memory, the computer program is configured to be executed by the processor, and the computer program includes instructions for some or all of the steps described in the first aspect.

[0014] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program enables a computer to execute to implement some or all of the steps described in the first aspect.

[0015] Implementing the embodiments of the present application will have the following beneficial effects:

[0016] After adopting the above-mentioned data display method, device, computer equipment and storage medium, if a data real-time display request for target data is received, the time to obtain the target data is determined based on the interface refresh duration. When the time to obtain the target data arrives, the value of the target data at that moment is obtained. For the value of the target data in the time period between this moment and the last moment of obtaining the target data, it can be predicted based on the random function corresponding to the first value obtained at the current moment and the second value obtained at the last moment of obtaining the target data. Then, the target data in the above-mentioned time period is displayed based on the first value, the second value and the predicted random value. In this way, the target data is displayed by the actual value of the target data and the predicted random value, which improves the display effect of the data and is conducive to improving the authenticity of the real-time display of the data. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0018] in:

[0019] Figure 1 A schematic diagram of a data display method provided in an embodiment of the present application;

[0020] Figure 2 A schematic diagram of the structure of a data display device provided in an embodiment of the present application;

[0021] Figure 3 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0022] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. According to the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0023] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.

[0024] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0025] The network architecture used in the embodiment of the present application includes a server and an electronic device. The embodiment of the present application does not limit the number of electronic devices and servers, and the server can provide services for multiple electronic devices at the same time. The server can be an independent server, or it can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. The server may be implemented by a server cluster consisting of multiple servers.

[0026] The electronic device may be a personal computer (PC), a laptop or a smart phone, or an all-in-one machine, a handheld computer, a tablet computer (pad), a smart TV player terminal, a vehicle-mounted terminal or a portable device. The operating system of the electronic device on the PC side, such as an all-in-one machine, may include but is not limited to Linux system, Unix system, Windows series system (such as Windows XP, Windows 7, etc.), Mac OS X system (Apple computer operating system) and other operating systems. The operating system of the electronic device on the mobile side, such as a smart phone, may include but is not limited to Android system, IOS (Apple mobile phone operating system), Window system and other operating systems.

[0027] The electronic device can install and run the application, and the server can be a server corresponding to the application installed in the electronic device, providing application services for the application. The application can be a separately integrated application software, or a small program embedded in other applications, or a system on a web page, etc., which is not limited here.

[0028] In an embodiment of the present application, the server may include a front-end server and a back-end server. Among them, the front-end server may be referred to as the front-end, which is used to interact with the user. The back-end server may be referred to as the back-end, which is used for business logic processing, such as data verification, database reading and writing, etc. Exemplarily, a user sends a business request on a page displayed by the front-end server through an electronic device, and the front-end server forwards the business request to the back-end server. The back-end server then processes the business request, returns the business result, and sends it to the front-end server. The business result is displayed by the front-end server to inform the user.

[0029] The embodiment of the present application provides a data display method, which can be executed by a data display device. The device can be implemented by software and / or hardware, and can generally be integrated in an electronic device or a server, which can improve the display effect of data.

[0030] Please refer to Figure 1 , Figure 1 This is a flow chart of a data display method provided by the present application. Taking the method applied in a front-end server as an example, it includes the following steps S101 to S104, wherein:

[0031] S101: Receive a data real-time display request for target data.

[0032] In the embodiment of the present application, the data real-time display request is used to request the real-time display of target data. The number of target data can be 1 or more. It should be noted that the target data is a variable value, such as user browsing volume, active days, number of added users, number of registered users, etc.

[0033] The request for real-time data display can be sent by the user. For example, if the leader of a company wants to view the real-time data of user views in the application released by the company, he can send a request for real-time data display of user views. The request for real-time data display can also be automatically triggered by satisfying a condition, which refers to the condition for data analysis. For example, the amount of target data received by the backend server is greater than a preset threshold, or the preset analysis time of the target data is reached. In this way, information such as user views and user active days can be analyzed based on big data.

[0034] In a possible example, after step S101, the following steps may be further included: determining the performance pressure of the backend server; if the performance pressure is greater than the pressure threshold, executing step S102.

[0035] In the embodiment of the present application, performance pressure is used to describe the tolerance of the back-end server to display the target data in real time. It can be understood that the business of displaying data in real time has high performance requirements for the back-end server and has a high priority. The greater the performance pressure of the back-end server, the lower the probability of giving priority to the real-time display of the target data, and the target data can be displayed through the front-end server to achieve the effect of data display.

[0036] The present application does not limit the method for determining the performance pressure of the back-end server. In a possible example, the following steps may be included: obtaining the performance parameters of the back-end server and the attribute information of the target data; determining the performance evaluation value of the back-end server based on the performance parameters; determining the performance requirements of the target data based on the attribute information; and determining the performance pressure of the back-end server based on the performance evaluation value and the performance requirements.

[0037] Among them, the performance parameters may include the remaining memory, memory size, network rate, etc. of the backend server. The performance evaluation value is used to evaluate the current processing performance of the backend server. The attribute information of the target data includes the data capacity, data volume, data type, etc. of the target data. The performance requirements are used to describe the hardware requirements for processing the target data. The performance evaluation value can be evaluated based on the dimensions corresponding to the performance requirements to obtain the performance evaluation sub-values ​​of the dimensions corresponding to each performance requirement, and the performance evaluation sub-values ​​of each dimension can be weighted calculated to obtain the performance evaluation value of the backend server, and the performance evaluation value is used as the performance pressure.

[0038] It is understandable that a large data capacity or a large amount of data requires a stronger processing capability for data processing. And the processing steps for different data are different. In this example, the performance pressure of the backend server is determined based on the performance evaluation value determined by the performance parameters of the backend server and the performance requirements determined by the attribute information of the target data, which can improve the accuracy of determining the performance pressure.

[0039] The present application does not limit the pressure threshold, which can be determined based on the amount of target data, or based on the remaining memory of the backend, etc. It is understandable that if the performance pressure of the backend server is greater than the pressure threshold, the data is displayed through the front-end server, thereby alleviating the performance pressure of the backend server.

[0040] In a possible example, if the performance pressure is greater than the pressure threshold, the following steps may also be included: determining the real-time processing duration of the back-end server based on the performance evaluation value and the task list of the back-end server; when the real-time processing duration is reached, obtaining real-time target data based on the back-end server; displaying data based on the real-time target data; or when the real-time processing duration has not been reached, executing step S102 through the front-end server.

[0041] The task list of the backend server is used to describe the information of the tasks to be processed by the backend server, such as the task type, data type, processing priority, etc. of each task to be processed. The real-time processing time of the backend server is used to describe the waiting time for the backend server to display the target data in real time.

[0042] It can be understood that determining the real-time processing duration of the back-end server based on the performance evaluation value and task list of the back-end server can improve the accuracy of determining the real-time processing duration. When the real-time processing duration is reached, the back-end server is used to display the target data in real time. Before the real-time processing duration is reached, the front-end server is used to perform slicing processing to achieve the effect of dynamic data display.

[0043] S102: When a first moment arrives, obtain a first value of the target data.

[0044] In an embodiment of the present application, the first moment is the moment of acquiring the target data. The moment of acquiring the target data is determined based on the interface refresh duration, that is, the time difference between the moment of acquiring the value of the target data last time and the moment of acquiring the value of the target data this time is the interface refresh duration. The moment of acquiring the value of the target data last time before the first moment is called the second moment, and the time difference between the first moment and the second moment is the interface refresh duration. In other words, the time difference obtained by subtracting the second moment from the first moment is the interface refresh duration. Exemplarily, if the interface refresh duration is 5 minutes, when the second moment is 8:45, the first moment is 8:50. When the moment of acquiring the target data arrives, the value of the target data at the current moment will be acquired. In other words, the first value is the value acquired when the first moment arrives, and the second value is the value acquired when the second moment arrives.

[0045] It should be noted that the second time may be a time corresponding to any interface refresh duration after step S101, or may be a time for determining to execute step S102. The first value may be equal to the second value, or may be greater than the second value, or may be less than the first value, etc., which is not limited here.

[0046] It is understandable that the front-end server will not obtain each data in real time, but obtains the data within the period of time through the interface at intervals. In the embodiment of the present application, the interface refresh time refers to the interval time preset by the front-end server to obtain the target data. The interface refresh time is a value greater than 0, which can be a fixed value, or can be determined based on the operating status of the front-end server, or can be determined based on the update frequency of the target data, etc., which is not limited here.

[0047] In a possible example, the following steps may also be included: obtaining performance parameters of the front-end server and attribute information of the target data; determining a performance evaluation value of the front-end server based on the performance parameters and attribute information; and determining an interface refresh duration based on the performance evaluation value of the front-end server.

[0048] Among them, the performance parameters of the front-end server can refer to the description of the performance parameters of the back-end server, and the attribute information of the target data can also refer to the above. The performance evaluation value of the front-end server is used to describe the current processing performance of the front-end server. The performance parameters of the front-end server can be evaluated based on the attribute information of the target data to obtain the performance evaluation value of the front-end server. Alternatively, the performance requirements of the target data for each dimension can be determined based on the attribute information of the target data, and then the performance evaluation sub-value of each dimension can be determined based on the performance parameters of the front-end server; then the performance evaluation sub-values ​​of each dimension are weighted and calculated to obtain the performance evaluation value of the front-end server.

[0049] It can be understood that the greater the performance evaluation value of the front-end server, the greater the success rate of obtaining data, so a smaller interface refresh time can be selected to improve the real-time performance of the data. In this example, the performance evaluation value of the front-end server is determined based on the performance parameters and attribute information of the front-end server, and the interface refresh time is determined based on the performance evaluation value, which can improve the accuracy of setting the interface refresh time, which is conducive to improving the real-time performance of the data.

[0050] S103: predict at least two first random values ​​within a period from the second moment to the first moment based on a random function corresponding to the first value and the second value.

[0051] In the embodiment of the present application, the first random value refers to a preset value in the period from the second moment to the first moment, which can be understood as a random value between the first value and the second value. When the first value is greater than the second value, the first random value can be greater than the second value, and can be less than the first value. The random function corresponding to the first value and the second value is used to predict the first random value, so that the predicted data of the target data in the period from the second moment to the first moment can be displayed through the first random value.

[0052] The present application does not limit the number of the first random values, which can be a value greater than or equal to 2. The present application does not limit the random function corresponding to the first value and the second value, and the random function is used to randomly generate data to determine the value of the target data displayed in the form of slices. The random function can be a random function corresponding to the first value and the second value, for example, Math.random(num1, num2). Among them, num1 represents the first value, num2 represents the second value, and Math.random(num1, num2) is used to represent a random number between num1 and num2.

[0053] In a possible example, before step S103, the following steps A1 to A4 may be further included, wherein:

[0054] A1. Calculate the ratio between the interface refresh time and the preset refresh time of the target data to obtain the number of slices.

[0055] In the embodiment of the present application, the preset refresh time refers to the update time interval of the target data on the page. The preset refresh time can be a fixed value specified by the user or the front end, and is carried in the real-time data display request or other instructions. Or it can be determined based on the attribute information of the target data. For example, if the amount of data is large, the preset refresh time is small; if the average update frequency is 5s, the preset refresh time is 5s, etc.

[0056] In a possible example, before step A1, the following steps may also be included: acquiring historical data of the target data; determining a numerical variation pattern of the target data based on the historical data; and determining a preset refresh duration of the target data based on the numerical variation pattern.

[0057] The historical data includes the target data obtained previously, which can be the target data pre-stored in the background server. The numerical variation law of the target data is used to describe the variation amplitude characteristics of the target data in each time period. It can be understood that in this example, the numerical variation rule of the target data is determined based on the historical data of the target data, and the preset refresh time of the target data is determined based on the numerical variation law, which can improve the accuracy of setting the preset refresh time.

[0058] In an embodiment of the present application, the number of slices is equal to the ratio between the interface refresh duration and the preset refresh duration of the target data. Exemplarily, if the interface refresh duration is 5 minutes and the preset refresh duration of the target data is 5 seconds, the number of slices is 60 (5*60 / 5). Optionally, the number of random values ​​in the time period corresponding to the interface refresh duration is equal to the slice data. In other words, the number of first random values ​​between the second moment and the first moment can be equal to the number of slices. When the first moment is the last moment of acquiring the target data before the third moment, the number of second random values ​​between the second moment and the third moment can also be equal to the number of slices.

[0059] A2. Calculate the absolute value of the difference between the first value and the second value to obtain the target value.

[0060] A3. Calculate the ratio between the target value and the number of slices to obtain the average value.

[0061] In the embodiment of the present application, the target value is the absolute value of the difference between the first value and the second value. The average value is the ratio between the target value and the number of slices. For example, if the first value is 150 and the second value is 50, the difference between the first value and the second value is 100 (150-50). If the difference is greater than 0, the absolute value of the difference is 100, that is, the target value is 100. If the number of slices is 50, the average value is 2 (100 / 50).

[0062] It should be noted that if the target data has multiple values ​​at one moment, the multiple values ​​can be classified to obtain the value of each type of target data at each moment. Then the absolute value of the difference between the value at the first moment and the value at the second moment in each category is calculated to obtain the target sub-value of each category, and then the target sub-value of each category is weighted averaged to obtain the target value. Alternatively, the average value of the target data at each moment can be obtained, and then the absolute value of the difference between the average value at the first moment and the average value at the second moment can be calculated to obtain the target value, etc.

[0063] A4. Construct a random function corresponding to the first value and the second value based on the target value, the average value and the number of slices.

[0064] The present application does not limit the form of the random function corresponding to the first value and the second value. It can be understood that the random function corresponding to the first value and the second value is set based on the target value, the number of slices, and the average value obtained by the target value and the number of slices. This can avoid the random function from generating extremely large or extremely small numbers, and can also avoid generating no values. It can make the dynamic changes of the target data show a smooth trend, which is conducive to further improving the display effect of the data.

[0065] In a possible example, step A4 may include the following steps A41 to A43, wherein:

[0066] A41. Determine the change type of target data based on the law of numerical change.

[0067] A42. Obtain the random function formula corresponding to the change type.

[0068] A43. Substitute the target value, the average value, and the number of slices into the random function formula to obtain a random function corresponding to the first value and the second value.

[0069] In an embodiment of the present application, the change type of the target data may include a growth type or a reduction type, or may be further divided into a linear growth type, a logarithmic growth type, a random growth type, etc., which are not limited here. It can be understood that the change types of different data changes are different. In this example, the random function formula corresponding to various change types is first preset, and then the change type of the target data is determined. The target value, average value and number of slices determined in the time period from the second moment to the first moment of the target data are substituted into the random function formula to obtain the random function corresponding to the time period, that is, the random function corresponding to the first value and the second value. In this way, the efficiency and accuracy of setting the random function corresponding to the first value and the second value can be improved. And the change type of the target data is determined based on the numerical change law of the historical data of the target data, which can further improve the accuracy of setting the random function.

[0070] Optionally, the formula of the random function is: Math.floor(Math.random()*(target-(num-i-1)*average)).

[0071] Where target is the target value, num is the number of slices, and average is the average value. Math.random() is used to get a random number, and Math.floor(x) returns the largest integer less than the parameter x, that is, the floating point number corresponding to Math.random()*(target-(num-i-1)*average) is rounded down.

[0072] S104 , displaying target data from the second moment to the first moment based on the first numerical value, the first random value, and the second numerical value.

[0073] In an embodiment of the present application, the target data can be displayed in chronological order by connecting the values ​​of the target data from the second moment to the first moment with a line segment. That is, the left side of the line segment is the second value, the right side is the first value, and the middle is the randomly generated first random value. The present application does not limit the chronological order of the first random value, and the numerical change of the first random value can satisfy the numerical change law of the target data. For example, if the numerical change law of the target data is linear growth, the first random value on the left side will be smaller than the first random value on the back side.

[0074] In addition to the target data line segment from the second moment to the first moment, the target data may also display a historical line segment of part of the target data. The historical line segment of the part of the target data may be determined based on the indication information in the real-time data display request. Exemplarily, if the indication information specifies that the display duration is the same day, the historical line segment of the part of the target data includes the real-time data of the same day. The historical line segment of the part of the target data may be determined based on the parameter information of the display page (e.g., display interval, etc.), etc., which is not limited here.

[0075] exist Figure 1 In the method shown, if a request for real-time display of data for target data is received, the time to obtain the target data is determined based on the interface refresh duration. When the time to obtain the target data arrives, the value of the target data at that moment is obtained. For the value of the target data in the time period between this moment and the last moment of obtaining the target data, it can be predicted based on the random function corresponding to the first value obtained at the current moment and the second value obtained at the last moment of obtaining the target data. Then, the target data in the above time period is displayed based on the first value, the second value and the predicted random value. In this way, the target data is displayed by the actual value of the target data and the predicted random value, which improves the display effect of the data and is conducive to improving the authenticity of the real-time display of the data.

[0076] In a possible example, after step S104, the following steps B1 and B2 may be further included, wherein:

[0077] B1. Before the third moment arrives, predict the second random value in the period from the first moment to the current moment based on the historical data of the target data and the first random value.

[0078] In the embodiment of the present application, the time difference between the third moment and the first moment is the interface refresh duration. That is, the first moment is the moment when the target data was acquired before the third moment, and the time difference obtained by subtracting the first moment from the third moment is the interface refresh duration. For example, if the interface refresh duration is 5 minutes, the first moment is 8:50 and the third moment is 8:55.

[0079] The second random value refers to a value preset in the period from the first moment to the third moment, which can be understood as a random value preset after the second value. The present application does not limit the number of second random values, which can be a value greater than or equal to 1. Optionally, the number of second random values ​​is less than the number of first random values ​​and is equal to the number of slices.

[0080] The present application does not limit the method for predicting the second random value. In a possible example, the method may include the following steps B11 to B13, wherein:

[0081] B11. Determine a first numerical value variation characteristic of the first random value.

[0082] The first numerical variation feature refers to the data variation feature of the first random value, which can be determined based on the first random value and the numerical value adjacent to the first random value, or the numerical relationship between the N numerical values ​​before and after. For example, a mathematical expression determined based on the magnitude of the numerical value is used as the first numerical variation feature. N is not limited and can be greater than 1 and less than half the number of slices. For example, the number of slices is 60, and N can be 5.

[0083] B12. Predicting a second numerical value change feature after the first moment based on the numerical value change rule of the target data and the first numerical value change feature.

[0084] The numerical variation law of the target data can be referred to above and will not be described here. The second numerical variation feature refers to the numerical variation law determined from the perspective of the target data as a whole, combined with the first numerical variation feature of the first random value obtained in the previous prediction, to make a prediction, and obtain the second numerical variation feature after the first moment. The first numerical variation feature can be adjusted based on the numerical variation law to obtain the second numerical variation feature. This is conducive to improving the accuracy of the predicted value.

[0085] B13. Obtain a second random value within a period from the first moment to the current moment based on the second numerical value change characteristic and the first random value.

[0086] In an embodiment of the present application, the second random value can be generated synchronously based on the second numerical value change characteristic and all the first random values, or the second random value can be generated based on the second numerical value change characteristic and all the first random values, and the generated second random value, or the second random value can be generated based on the second numerical value change characteristic and the first random value in the same sequence as the second random value, etc., which are not limited here. Among them, the first random value in the same sequence as the second random value means that the order in the time period corresponding to the second random value is the same as the order in the time period corresponding to the first random value. Exemplarily, the first random value is the third value in the time period from the second moment to the first moment, and the second random value is the third value in the time period from the first moment to the third moment.

[0087] It can be understood that in steps B11 to B13, the numerical variation law of the historical data of the target data and the first numerical variation characteristics of the first random value are first determined. Then, based on the numerical variation law and the first numerical variation characteristics, the second numerical variation characteristics after the first moment are predicted. Then, based on the second numerical variation characteristics and the first random value, the second random value in the period from the first moment to the current moment is obtained. In this way, the second random value is predicted in combination with the numerical variation characteristics, which can improve the accuracy of the prediction.

[0088] B2. Display target data from the first moment to the current moment based on the first numerical value and the second random value.

[0089] In an embodiment of the present application, the target data from the first moment to the current moment can be displayed in chronological order by connecting the numerical values ​​of the target data from the first moment to the current moment. That is, the left side of the line segment is the first numerical value, the right side is the second random value at the current moment or earlier than the current moment, and the middle is another second random value. The time sequence of the second random value can be determined based on the second numerical value change characteristics. The line segment can also be displayed together with the historical line segment of part of the target data, and the description of the part of the target data can refer to the above, which will not be repeated here.

[0090] It can be understood that in step B1 and step B2, before the third moment arrives, the second random value from the first moment to the current moment can be predicted. In this way, it can be avoided that there is no data displayed at the current moment. And the prediction based on the historical data of the target data and the first random value can improve the authenticity of the real-time display.

[0091] In a possible example, after step B2, the following steps B3 to B5 may be further included, wherein:

[0092] B3. Before the third moment arrives, obtain the third value of the target data.

[0093] B4. Predict at least two third random values ​​within a period from the first moment to the third moment based on the random functions corresponding to the first value and the third value.

[0094] In the embodiment of the present application, the third value refers to the value of the target data obtained when the third moment arrives. The random function corresponding to the first value and the third value can be used to generate a third random value, and then the predicted data of the target data in the period from the first moment to the third moment can be displayed by the third random value, so as to display the target data in the form of slices.

[0095] The random function corresponding to the first value and the third value can refer to the description of the random function corresponding to the first value and the second value, and the random function can be obtained based on the first value and the third value. Or it can be constructed based on the number of slices obtained by calculating the ratio between the refresh time of the interface and the preset refresh time of the target data, the target value obtained by calculating the absolute value of the difference between the third value and the first value, and the average value obtained by the ratio between the target value and the number of slices, which will not be repeated here. In this way, after constructing the random function corresponding to the first value and the third value, the third random value can be randomly generated so that the number of third random values ​​between the first value and the third value is the number of slices.

[0096] B5. Display target data from the first moment to the third moment based on the first numerical value, the third random value and the third numerical value.

[0097] In an embodiment of the present application, the line segment of the target data from the first moment to the third moment can be displayed in chronological order by connecting the values ​​of the target data from the first moment to the third moment. That is, the left side of the line segment is the first value, the right side is the third value, and the middle is the third random value. The time sequence of the third random value can be determined based on the value change law of the target data. The line segment can also be displayed together with the historical line segment of part of the target data. The description of the part of the target data can refer to the above, and will not be repeated here.

[0098] It can be understood that in steps B3 to B5, when the third moment arrives, the third value of the target data is first obtained. Then, at least two third random values ​​in the period from the first moment to the third moment are predicted based on the random function corresponding to the first value and the third value. Then, the target data from the first moment to the third moment is displayed based on the first value, the third random value and the third value. In this way, the target data that has not been obtained between the first moment and the third moment is displayed, which improves the display effect of the data and is conducive to improving the authenticity of the real-time display of the data.

[0099] The method of the embodiment of the present application is described in detail above, and the device of the embodiment of the present application is provided below.

[0100] and Figure 1The embodiment shown is consistent with that shown in FIG. Figure 2 , Figure 2 This is a schematic diagram of the structure of a data display device proposed in this application. Figure 2 As shown, the data display device 200 includes:

[0101] The communication unit 201 is used to receive a data real-time display request for target data;

[0102] The processing unit 202 is used to obtain a first value of the target data when a first moment arrives; based on a random function corresponding to the first value and the second value, predict at least two first random values ​​in a period from a second moment to the first moment, the second value is a value of the target data obtained when the second moment arrives, and the time difference between the first moment and the second moment is the interface refresh duration;

[0103] The display unit 203 is used to display the target data from the second moment to the first moment based on the first numerical value, the first random value and the second numerical value.

[0104] In a possible example, the processing unit 202 is also used to calculate the ratio between the interface refresh duration and the preset refresh duration of the target data to obtain the number of slices, and the number of the first random values ​​is the number of slices; calculate the absolute value of the difference between the first value and the second value to obtain the target value; calculate the ratio between the target value and the number of slices to obtain the average value; and construct a random function corresponding to the first value and the second value based on the target value, the average value and the number of slices.

[0105] In a possible example, the processing unit 202 is also used to obtain performance parameters of the front-end server and attribute information of the target data; determine a performance evaluation value of the front-end server based on the performance parameters and the attribute information; and determine the interface refresh duration based on the performance evaluation value.

[0106] In a possible example, the processing unit 202 is further used to obtain historical data of the target data; determine a numerical variation rule of the target data based on the historical data; and determine a preset refresh duration of the target data based on the numerical variation rule.

[0107] In a possible example, the processing unit 202 is specifically used to determine the change type of the target data based on the numerical change law; obtain the random function formula corresponding to the change type; substitute the target value, the average value and the number of slices into the random function formula to obtain the random function corresponding to the first numerical value and the second numerical value.

[0108] In a possible example, the processing unit 202 is also used to predict a second random value within a period from the first moment to the current moment based on the historical data of the target data and the first random value before the third moment arrives, and the time difference between the third moment and the first moment is the interface refresh duration; the display unit 203 is also used to display the target data from the first moment to the current moment based on the first numerical value and the second random value.

[0109] In a possible example, the processing unit 202 is also used to obtain a third value of the target data when the third moment arrives; based on the random functions corresponding to the first value and the third value, predict at least two third random values ​​in the time period from the first moment to the third moment; the display unit 203 is also used to display the target data from the first moment to the third moment based on the first value, the third random value and the third value.

[0110] In a possible example, the processing unit 202 is specifically used to determine a first numerical change characteristic of the first random value; based on the numerical change law of the target data and the first numerical change characteristic, predict a second numerical change characteristic after the first moment; based on the second numerical change characteristic and the first random value, obtain a second random value in a period from the first moment to the current moment.

[0111] The detailed execution process of each unit in the data display device 200 can refer to the execution steps in the aforementioned method embodiment, which will not be repeated here.

[0112] and Figure 1 For details, please refer to Figure 3 , Figure 3 Schematic diagram of the structure of a computer device provided in an embodiment of the present application. Figure 3 As shown, the computer device 300 includes a processor 310, a memory 320 and a communication interface 330. The processor 310, the memory 320 and the communication interface 330 are connected to each other via a bus 350. Figure 2 The related functions implemented by the communication unit 201 shown can be implemented through the communication interface 330. Figure 2 The related functions implemented by the processing unit 202 and the display unit 203 shown can be implemented by the processor 310.

[0113] The memory 320 stores a computer program 340, which is configured to be executed by the processor 310. The computer program 340 includes instructions for executing the following steps:

[0114] receiving a data real-time display request for target data;

[0115] When a first moment arrives, obtaining a first value of the target data;

[0116] Based on the random functions corresponding to the first value and the second value, predict at least two first random values ​​in a period from the second moment to the first moment, the second value is the value of the target data obtained when the second moment arrives, and the time difference between the first moment and the second moment is the interface refresh duration;

[0117] Based on the first numerical value, the first random value, and the second numerical value, target data from the second moment to the first moment is displayed.

[0118] In a possible example, before predicting at least two first random values ​​in a period from the second moment to the first moment based on the random function corresponding to the first value and the second value, the computer program 340 includes instructions specifically for performing the following steps:

[0119] Calculate the ratio between the interface refresh time and the preset refresh time of the target data to obtain the number of slices, where the number of the first random values ​​is the number of slices;

[0120] Calculate the absolute value of the difference between the first value and the second value to obtain a target value;

[0121] Calculating the ratio between the target value and the number of slices to obtain an average value;

[0122] A random function corresponding to the first value and the second value is constructed based on the target value, the average value and the number of slices.

[0123] In a possible example, before calculating the ratio between the interface refresh time and the preset refresh time of the target data to obtain the number of slices, the computer program 340 further includes instructions for performing the following steps:

[0124] Acquire performance parameters of the front-end server and attribute information of the target data;

[0125] Determine a performance evaluation value of the front-end server based on the performance parameter and the attribute information;

[0126] The interface refresh duration is determined based on the performance evaluation value.

[0127] In a possible example, before calculating the ratio between the interface refresh time and the preset refresh time of the target data to obtain the number of slices, the computer program 340 further includes instructions for performing the following steps:

[0128] Acquire historical data of the target data;

[0129] Determine a numerical change rule of the target data based on the historical data;

[0130] A preset refresh duration of the target data is determined based on the value variation rule.

[0131] In a possible example, in terms of constructing the random function corresponding to the first value and the second value based on the target value, the average value and the number of slices, the computer program 340 specifically includes instructions for performing the following steps:

[0132] Determining a change type of the target data based on the value change rule;

[0133] Obtaining a random function formula corresponding to the change type;

[0134] Substitute the target value, the average value, and the number of slices into the random function formula to obtain a random function corresponding to the first value and the second value.

[0135] In a possible example, after displaying the target data from the second moment to the first moment based on the first numerical value, the first random value, and the second numerical value, the computer program 340 further includes instructions for performing the following steps:

[0136] Before the third moment arrives, based on the historical data of the target data and the first random value, predict the second random value in the period from the first moment to the current moment, and the time difference between the third moment and the first moment is the interface refresh duration;

[0137] displaying target data from the first moment to the current moment based on the first numerical value and the second random value;

[0138] When the third moment arrives, obtaining a third value of the target data;

[0139] Predicting at least two third random values ​​within a period from the first moment to the third moment based on the random functions corresponding to the first value and the third value;

[0140] Based on the first numerical value, the third random value, and the third numerical value, target data from the first moment to the third moment is displayed.

[0141] In a possible example, in predicting the second random value within a period from the first moment to the current moment based on the historical data of the target data and the first random value, the computer program 340 specifically includes instructions for performing the following steps:

[0142] Determining a first numerical variation characteristic of the first random value;

[0143] Predicting a second value change feature after the first moment based on the value change rule of the target data and the first value change feature;

[0144] Based on the second numerical value variation characteristic and the first random value, a second random value within a time period from the first moment to the current moment is acquired.

[0145] An embodiment of the present application also provides a computer storage medium, wherein the computer storage medium stores a computer program, which enables a computer to execute part or all of the steps of any method recorded in the method embodiment, and the computer includes an electronic device or a server.

[0146] The present application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute to implement some or all steps of any method described in the method embodiment. The computer program product can be a software installation package, and the computer includes an electronic device or a server.

[0147] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modes involved are not necessarily required by this application.

[0148] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0149] In the several embodiments provided in the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of units, which is only a logical function division. There may be other division methods in actual implementation, such as at least one unit or component can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.

[0150] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on at least one network unit. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0151] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software program mode.

[0152] If the integrated unit is implemented in the form of a software program model and sold or used as an independent product, it can be stored in a computer-readable memory. According to this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a memory and includes several instructions for a computer (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned memory includes: U disk, read-only memory (ROM), random access memory (RAM), mobile hard disk, magnetic disk or optical disk, etc., and other media that can store program codes.

[0153] The embodiments of the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A data display method, characterized in that: include: receiving a data real-time display request for target data; When a first moment arrives, obtaining a first value of the target data; Based on the random function corresponding to the first value and the second value, predict at least two first random values ​​in a period from a second moment to the first moment, where the second value is a value of the target data acquired when the second moment arrives, and the time difference between the first moment and the second moment is the interface refresh duration; Based on the first numerical value, the first random value, and the second numerical value, displaying target data from the second moment to the first moment; Before the third moment arrives, based on the historical data of the target data and the first random value, predict the second random value in the period from the first moment to the current moment, and the time difference between the third moment and the first moment is the interface refresh duration; The step of predicting a second random value within a period from the first moment to the current moment based on the historical data of the target data and the first random value comprises: Determining a first numerical variation characteristic of the first random value; Predicting a second value change feature after the first moment based on the value change rule of the target data and the first value change feature; Based on the second numerical value variation characteristic and the first random value, obtaining a second random value within a period from the first moment to the current moment; displaying target data from the first moment to the current moment based on the first numerical value and the second random value; When the third moment arrives, obtaining a third value of the target data; Predicting at least two third random values ​​within a period from the first moment to the third moment based on the random functions corresponding to the first value and the third value; Based on the first numerical value, the third random value, and the third numerical value, target data from the first moment to the third moment is displayed.

2. The method according to claim 1, characterized in that Before predicting at least two first random values ​​in a period from a second moment to the first moment based on the random function corresponding to the first value and the second value, the method further includes: Calculate the ratio between the interface refresh time and the preset refresh time of the target data to obtain the number of slices, where the number of the first random values ​​is the number of slices; Calculate the absolute value of the difference between the first value and the second value to obtain a target value; Calculating the ratio between the target value and the number of slices to obtain an average value; A random function corresponding to the first value and the second value is constructed based on the target value, the average value and the number of slices.

3. The method according to claim 2, characterized in that Before calculating the ratio between the interface refresh time and the preset refresh time of the target data to obtain the number of slices, the method further includes: Acquire performance parameters of the front-end server and attribute information of the target data; Determine a performance evaluation value of the front-end server based on the performance parameter and the attribute information; The interface refresh duration is determined based on the performance evaluation value.

4. The method according to claim 2, characterized in that: Before calculating the ratio between the interface refresh time and the preset refresh time of the target data to obtain the number of slices, the method further includes: Acquire historical data of the target data; Determine a numerical change rule of the target data based on the historical data; A preset refresh duration of the target data is determined based on the value variation rule.

5. The method according to claim 4, characterized in that The constructing a random function corresponding to the first value and the second value based on the target value, the average value and the number of slices includes: Determining a change type of the target data based on the value change rule; Obtaining a random function formula corresponding to the change type; Substitute the target value, the average value, and the number of slices into the random function formula to obtain a random function corresponding to the first value and the second value.

6. A data display device, characterized in that: include: A communication unit, used for receiving a data real-time display request for target data; A processing unit, configured to obtain a first value of the target data when a first moment arrives; Based on the random function corresponding to the first value and the second value, predict at least two first random values ​​in a period from a second moment to the first moment, where the second value is a value of the target data acquired when the second moment arrives, and the time difference between the first moment and the second moment is the interface refresh duration; A display unit, configured to display target data from the second moment to the first moment based on the first numerical value, the first random value, and the second numerical value; The processing unit is further configured to predict, before a third moment arrives, a second random value within a period from the first moment to the current moment based on the historical data of the target data and the first random value, wherein the time difference between the third moment and the first moment is the interface refresh duration; The processing unit predicts a second random value within a period from the first moment to the current moment based on the historical data of the target data and the first random value, including: Determine a first numerical variation characteristic of the first random value; predict a second numerical variation characteristic after the first moment based on the numerical variation law of the target data and the first numerical variation characteristic; obtain a second random value within a period from the first moment to the current moment based on the second numerical variation characteristic and the first random value; The display unit is further configured to display target data from the first moment to the current moment based on the first numerical value and the second random value; The processing unit is further configured to obtain a third value of the target data when the third moment arrives; and predict at least two third random values ​​in a period from the first moment to the third moment based on a random function corresponding to the first value and the third value; The display unit is further used to display the target data from the first moment to the third moment based on the first numerical value, the third random value and the third numerical value.

7. A computer device, characterized in that: The method comprises a processor, a memory and a communication interface, wherein the memory stores a computer program, the computer program is configured to be executed by the processor, and the computer program comprises instructions for executing the steps in any one of the methods of claims 1 to 5.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which enables a computer to execute to implement the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Online video stream play method, device and system

    CN105898376A

  • Business data statistical prediction method and device, computer equipment and storage medium

    CN112541635A