CN114510668A - Data display method and device, computer equipment and storage medium - Google Patents

Data display method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN114510668A
CN114510668A CN202210145272.5A CN202210145272A CN114510668A CN 114510668 A CN114510668 A CN 114510668A CN 202210145272 A CN202210145272 A CN 202210145272A CN 114510668 A CN114510668 A CN 114510668A
Authority
CN
China
Prior art keywords
time
value
numerical value
target data
random
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210145272.5A
Other languages
Chinese (zh)
Inventor
石磊锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An International Smart City Technology Co Ltd
Original Assignee
Ping An International Smart City Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An International Smart City Technology Co Ltd filed Critical Ping An International Smart City Technology Co Ltd
Priority to CN202210145272.5A priority Critical patent/CN114510668A/en
Publication of CN114510668A publication Critical patent/CN114510668A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9577Optimising the visualization of content, e.g. distillation of HTML documents
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking

Abstract

The application relates to the technical field of data processing, and provides a data display method, a data display device, computer equipment and a storage medium, wherein the method comprises the following steps: receiving a data real-time display request aiming at target data; when the first time arrives, acquiring a first numerical value of the target data; predicting at least two first random values in a time period from a second moment to the first moment based on a random function corresponding to the first numerical value and a second numerical value, wherein the second numerical value is a numerical value of the target data acquired when the second moment arrives, and the time difference between the first moment and the second moment is interface refreshing duration; displaying target data from the second time to the first time based on the first numerical value, the first random value, and the second numerical value. By the adoption of the method and the device, the display effect of the data can be improved.

Description

Data display method and device, computer equipment and storage medium
Technical Field
The application relates to the technical field of data processing, and mainly relates to a data display method and device, computer equipment and a storage medium.
Background
The Web application generally adopts a front-end and back-end separated design, the front end is responsible for interaction with a user, and the back end is responsible for service logic processing (such as data verification, database reading and writing and the like). When the performance pressure of the back end is large, the front end can display data in a data slicing mode to relieve the performance pressure of the back end. At present, data slicing is generally performed by evenly distributing slice data, and the slice data are uniformly changed, which easily generates the illusion that the data are evenly changed. Therefore, how to slice data to improve the display effect of the data is a technical problem to be solved by those skilled in the art.
Disclosure of Invention
The embodiment of the application provides a data display method and device, computer equipment and a storage medium, which can improve the display effect of data.
In a first aspect, an embodiment of the present application provides a data display method, where:
receiving a data real-time display request aiming at target data;
when the first time arrives, acquiring a first numerical value of the target data;
predicting at least two first random values in a time period from a second moment to the first moment based on a random function corresponding to the first numerical value and a second numerical value, wherein the second numerical value is a numerical value of the target data acquired when the second moment arrives, and the time difference between the first moment and the second moment is interface refreshing duration;
displaying target data from the second time to the first time based on the first numerical value, the first random value, and the second numerical value.
In a second aspect, an embodiment of the present application provides a data display device, wherein:
the communication unit is used for receiving a data real-time display request aiming at target data;
the processing unit is used for acquiring a first numerical value of the target data when a first moment is reached; predicting at least two first random values in a time period from a second moment to the first moment based on a random function corresponding to the first numerical value and a second numerical value, wherein the second numerical value is a numerical value of the target data acquired when the second moment arrives, and the time difference between the first moment and the second moment is interface refreshing duration;
and the display unit is used for 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.
In a third aspect, an embodiment of the present application provides a computer device, including a processor, a memory, a communication interface, and a computer program, where the memory stores the computer program, 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.
In a fourth aspect, the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, where the computer program makes a computer execute to implement part or all of the steps described in the first aspect.
The embodiment of the application has the following beneficial effects:
after the data display method, the data display device, the computer equipment and the storage medium are adopted, if a data real-time display request aiming at the target data is received, the time for acquiring the target data is determined based on the interface refreshing time length. When the time of acquiring the target data arrives, the value of the target data at the time is acquired. The values of the target data in the time period between the current time and the last time when the target data is acquired may be obtained by prediction based on a random function corresponding to a first value acquired at the current time and a second value acquired at the last time when the target data is acquired. And displaying the target data in the time period based on the first numerical value, the second numerical value and the random value obtained by prediction. Therefore, the target data are displayed through the actual numerical value of the target data and the random value obtained through prediction, the data display effect is improved, and the real-time data display authenticity is favorably improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Wherein:
fig. 1 is a schematic flowchart of a data display method according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of a data display device according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art without any inventive work according to the embodiments of the present application are within the scope of the present application.
The terms "first," "second," and the like in the description and claims of the present application and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
The network architecture applied by the embodiment of the application comprises a server and electronic equipment. The number of the electronic devices and the number of the servers are not limited in the embodiment of the application, and the servers can provide services for the electronic devices at the same time. The server may be an independent server, or may be a cloud server that provides basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a network service, cloud communication, a middleware service, a domain name service, a security service, a Content Delivery Network (CDN), a big data and artificial intelligence platform, and the like. The server may alternatively be implemented as a server cluster consisting of a plurality of servers.
The electronic device may be a Personal Computer (PC), a notebook computer, or a smart phone, and may also be an all-in-one machine, a palm computer, a tablet computer (pad), a smart television playing terminal, a vehicle-mounted terminal, or a portable device. The operating system of the PC-side electronic device, such as a kiosk or the like, may include, but is not limited to, operating systems such as Linux system, Unix system, Windows series system (e.g., Windows xp, Windows 7, etc.), Mac OS X system (operating system of apple computer), and the like. The operating system of the electronic device at the mobile end, such as a smart phone, may include, but is not limited to, an operating system such as an android system, an IOS (operating system of an apple mobile phone), a Window system, and the like.
The electronic device may install and run the application program, and the server may be a server corresponding to the application program installed in the electronic device, and provide an application service for the application program. The application program may be a single integrated application software, or an applet embedded in another application, or a system on a web page, etc., which is not limited herein.
In an embodiment of the present application, the server may include a front-end server and a back-end server. The front-end server may be referred to as a front-end for short, and is used for interacting with a user. The back-end server, which may be referred to as a back-end for short, is used for business logic processing, such as data verification, database read-write, and the like. Illustratively, a user sends a service request on a page displayed by the front-end server through the electronic device, and the front-end server forwards the service request to the back-end server. And the back-end server processes the service request, returns a service result and sends the service result to the front-end server. And displaying the service result through the front-end server to inform the user.
The embodiment of the application provides a data display method which can be executed by a data display device. The device can be realized by software and/or hardware, can be integrated in electronic equipment or a server generally, and can improve the display effect of data.
Referring to fig. 1, fig. 1 is a schematic flow chart of a data display method provided in the present application. Taking the application of the method to a front-end server as an example for illustration, the method includes the following steps S101 to S104, wherein:
s101, receiving a data real-time display request aiming at target data.
In the embodiment of the application, the data real-time display request is used for requesting real-time display of target data. The number of target data may be 1 or more. The target data is a variable numerical value, for example, the user browsing amount, the number of active days, the number of added users, the number of registered users, and the like.
The data real-time display request can be sent by a user, for example, a leader of a certain enterprise wants to view real-time data of user browsing amount in an application published by the enterprise, and the data real-time display request aiming at the user browsing amount can be sent. The data display request may be real-time or may be automatically triggered by the satisfaction of conditions for data analysis. For example, the number of target data received by the back-end server is greater than a preset threshold, or a preset time period for analyzing the target data is reached. In this way, information such as the user's browsing volume, the user's number of active days, etc. can be analyzed based on the big data.
In one possible example, after step S101, the following steps may be further included: determining performance pressure of a back-end server; if the performance pressure is greater than the pressure threshold, step S102 is executed.
In the embodiment of the application, the performance pressure is used for describing the bearing degree of the target data displayed in real time by the back-end server. It can be understood that the service of displaying data in real time has high performance requirement on the back-end server and has high priority. The higher the performance pressure of the back-end server is, the lower the probability of preferentially processing the real-time display of the target data is, and the target data can be displayed through the front-end server, so that the data display effect is achieved.
The present application is not limited to the method for determining the performance pressure of the back-end server, and in one possible example, the method may include the following steps: acquiring performance parameters of a back-end server and attribute information of the target data; determining a performance evaluation value of the back-end server based on the performance parameter; determining performance requirements of the target data based on the attribute information; determining a performance pressure of the back-end server based on the performance rating value and the performance requirement.
The performance parameters may include remaining memory of the backend server, memory size, network rate, and the like. The performance evaluation value is used for evaluating the current processing performance of the back-end server. The attribute information of the target data includes a data capacity, a data amount, a data type, and the like of the target data. The performance requirements are used to describe the hardware requirements for processing the target data. The performance evaluation value may be evaluated based on the dimension corresponding to the performance requirement to obtain a performance evaluation sub-value of the dimension corresponding to each performance requirement, and a weighted calculation may be performed based on the performance evaluation sub-value of each dimension to obtain a performance evaluation value of the back-end server, and the performance evaluation value is used as the performance pressure.
It can be understood that if the data capacity is large or the data amount is large, a strong processing capability is required for data processing. And the processing steps of different data are different. In this example, determining the performance pressure of the backend server based on the performance evaluation value determined by the performance parameter of the backend server and the performance requirement determined by the attribute information of the target data may improve the accuracy of determining the performance pressure.
The pressure threshold is not limited, and may be determined based on the data volume of the target data, or may be determined based on the remaining memory at the back end, or the like. It can be understood that if the performance pressure of the back-end server is greater than the pressure threshold, the data is displayed through the front-end server, so that the performance pressure of the back-end server can be relieved.
In one possible example, if the performance pressure is greater than the pressure threshold, the method may further include the steps of: determining the real-time processing duration of the back-end server based on the performance evaluation value and a task list of the back-end server; when the real-time processing duration is reached, acquiring real-time target data based on the back-end server; performing data display based on the real-time target data; or when the real-time processing time length does not reach, executing the step S102 through the front-end server.
The task list of the back-end server is used for describing information of the tasks to be processed of the back-end server. Such as task type, data type, processing priority, etc. for each pending task. The real-time processing duration of the back-end server is used for describing the waiting duration that the back-end server can display the target data in real time.
It can be understood that determining the real-time processing time length of the back-end server based on the performance evaluation value of the back-end server and the task list can improve the accuracy of determining the real-time processing time length. And when the real-time processing time length is reached, displaying the target data in real time by adopting a back-end server. And before the real-time processing time length is reached, a front-end server is adopted to carry out slicing processing so as to achieve the effect of data dynamic display.
S102, when the first time arrives, a first numerical value of the target data is obtained.
In the embodiment of the present application, the first time is a time when the target data is acquired. The time for acquiring the target data is determined based on the interface refreshing time length, that is, the time difference between the last time for acquiring the numerical value of the target data and the current time for acquiring the numerical value of the target data is the interface refreshing time length. And the time of last acquiring the numerical value of the target data at the first time is called as a second time, and the time difference between the first time and the second time is the interface refreshing time length. That is, the time difference obtained by subtracting the second time from the first time is the interface refresh duration. Illustratively, if the interface refresh period is 5 minutes, the second time is 8 o 'clock 45 minutes, and the first time is 8 o' clock 50 minutes. When the time of acquiring the target data arrives, the numerical value of the target data at the current time is acquired. That is, the first numerical value is a numerical value acquired when the first time arrives, and the second numerical value is a numerical value acquired when the second time arrives.
It should be noted that the second time may be a time corresponding to any interface refresh time 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 less than the first value, etc., and is not limited herein.
It will be appreciated that the front-end server does not obtain every data in real-time, but rather obtains the data over a period of time at intervals through the interface. In this embodiment of the present application, the interface refresh duration refers to an interval time for acquiring target data preset by a front-end server. The interface refresh duration is a value greater than 0, and may be a fixed value, or may be determined based on the operating state of the front-end server, or may be determined based on the update frequency of the target data, and the like, which is not limited herein.
In one possible example, the following steps may be further included: acquiring performance parameters of a front-end server and attribute information of target data; determining a performance evaluation value of the front-end server based on the performance parameters and the attribute information; and determining the interface refreshing time length based on the performance evaluation value of the front-end server.
The performance parameter of the front-end server may refer to the description of the performance parameter of the back-end server, and the attribute information of the target data may also refer to the foregoing description. The performance evaluation value of the front-end server is used for describing the current processing performance of the front-end server. The performance parameters of the front-end server may be evaluated based on the attribute information of the target data, so as to obtain a performance evaluation value of the front-end server. Or the performance requirement 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 is determined based on the performance parameters of the front-end server; and then, performing weighted calculation on the performance evaluation sub-values of all dimensions to obtain the performance evaluation value of the front-end server.
It can be understood that the larger the performance evaluation value of the front-end server is, the larger the success rate of acquiring data is, and therefore, the smaller interface refresh time can be selected to improve the real-time performance of data. In this example, the performance evaluation value of the front-end server is determined based on the performance parameter and the attribute information of the front-end server, and then the interface refresh duration is determined based on the performance evaluation value, so that the accuracy of setting the interface refresh duration can be improved, and the improvement of the real-time performance of data is facilitated.
S103, predicting at least two first random values in the time period from the second time to the first time based on the random functions corresponding to the first numerical values and the second numerical values.
In the embodiment of the present application, the first random value refers to a value preset in a period from the second time to the first time, and may 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 may be greater than the second value and may be less than the first value. The random function corresponding to the first numerical value and the second numerical value is used for predicting the first random value, so that the predicted data of the target data in the time period from the second moment to the first moment can be displayed through the first random value.
The number of the first random values is not limited in the present application, and may be a value greater than or equal to 2. The application does not limit the random function corresponding to the first numerical value and the second numerical value, and the random function is used for randomly generating data so as to determine the numerical value of the target data displayed in a slice form. The random function may be a random function corresponding to the first value and the second value, for example, math. Where num1 denotes a first number, num2 denotes a second number, and math. random (num1, num2) is used to denote a random number between num1 and num 2.
In one possible example, before step S103, the following steps a1 to a4 may be further included, where:
and A1, calculating the ratio of the interface refreshing time length to the preset refreshing time length of the target data to obtain the slice number.
In the embodiment of the present application, the preset refresh duration refers to an update time interval of the target data on the page. The preset refresh duration may be a fixed value specified by a user or a front end, and is carried in a data real-time display request or other instructions. Or the determination may be performed based on attribute information of the target data, and for example, if the data size is large, the preset refresh time is short; if the average update frequency is 5s, the preset refresh time is 5 s.
In one possible example, before step a1, the following steps may be further included: acquiring historical data of the target data; determining a numerical change rule of the target data based on the historical data; and determining the preset refreshing time length of the target data based on the numerical value change rule.
The historical data includes previously acquired target data, which may be target data pre-stored in the background server. The numerical value change rule of the target data is used for describing the change amplitude characteristic of the target data in each time period. It can be understood that, in this example, the accuracy of setting the preset refresh duration can be improved by determining the value change rule of the target data based on the historical data of the target data and then determining the preset refresh duration of the target data based on the value change rule.
In the embodiment of the present application, the number of slices is equal to a ratio between an interface refresh duration and a preset refresh duration of target data. For example, if the interface refresh time is 5 minutes and the preset refresh time of the target data is 5s, the number of slices is 60(5 × 60/5). Optionally, the number of the random values in the time period corresponding to the interface refresh time length is equal to the slice data. That is, the number of the first random values between the second time instant and the first time instant may be equal to the number of slices. When the first time is a previous time of acquiring the target data to the third time, the number of the second random values between the second time and the third time may also be equal to the number of slices.
And A2, calculating the absolute value of the difference between the first value and the second value to obtain the target value.
A3, calculating the ratio between the target value and the number of slices, and obtaining an average value.
In an embodiment of the application, the target value is an absolute value of a difference between the first value and the second value. The average is the ratio between the target value and the number of slices. Illustratively, 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, i.e., the target value is 100. If the number of slices is 50, the average value is 2 (100/50).
If a plurality of values exist in the target data at one time, the plurality of values may be classified to obtain a value of each type of target data at each time. And then calculating the absolute value of the difference between the numerical value of the first time and the numerical value of the second time in each category to obtain a target sub-value of each category, and then carrying out weighted average on the target sub-values of each category to obtain a target value. Or an average value of the target data at each moment may be obtained, and then an absolute value of a difference between the average value at the first moment and the average value at the second moment may be calculated to obtain the target value, and the like.
And A4, constructing a random function corresponding to the first value and the second value based on the target value, the average value and the slice number.
The form of the random function corresponding to the first numerical value and the second numerical value is not limited, and it can be understood that the random function corresponding to the first numerical value and the second numerical value is set based on the target value, the slice number and the average value obtained by the target value and the slice number, the generation of a maximum number or a minimum number by the random function can be avoided, the generation of no numerical value can also be avoided, the dynamic change of target data can be in a smooth trend, and the display effect of the data can be further improved.
In one possible example, step A4 may include the following steps A41-A43, wherein:
and A41, determining the change type of the target data based on the numerical change rule.
And A42, acquiring a random function formula corresponding to the change type.
And A43, substituting the target value, the average value and the number of slices into a random function formula to obtain a random function corresponding to the first numerical value and the second numerical value.
In the embodiment of the present application, the type of change of the target data may include an increase type or a decrease type, or may be further classified into a linear increase type, a logarithmic increase type, a random increase type, and the like, which is not limited herein. It will be appreciated that the type of variation varies from data to data. In this example, a random function formula corresponding to each variation type is preset, and then, after the variation type of the target data is determined, the random function formula is substituted with a target value, an average value and the number of slices determined in a period from the second time to the first time based on the target data, so that a random function corresponding to the period, that is, a random function corresponding to the first numerical value and the second numerical value, can be obtained. Therefore, the efficiency and the accuracy of setting the random functions corresponding to the first numerical value and the second numerical value can be improved. And the change type of the target data is determined based on the numerical change rule of the historical data of the target data, so that the accuracy of setting the random function can be further improved.
Optionally, the formula of the random function is: floor (math. random () (target- (num-i-1) ×) aggregate).
Where target denotes a target value, num denotes the number of slices, and average denotes an average value. Random () represents taking a random number, and Math.floor (x) returns the maximum integer smaller than the parameter x, i.e. the floating point number corresponding to Math.random () (target- (num-i-1) × average) is rounded down.
And S104, 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.
In this embodiment, the target data may be displayed in chronological order by a line segment formed by connecting numerical values of the target data from the second time to the first time. 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 time sequence of the first random value is not limited, and the numerical change of the first random value can meet the numerical change rule of the target data. For example, if the target data has a linear increase in the numerical variation rule, the first random value on the left side is smaller than the first random value on the rear side.
The target data may display a history line segment of a part of the target data in addition to the line segment of the target data from the second time to the first time as described above. The historical line segments of the portion of the target data may be determined based on the indication information in the real-time display request for the data. Illustratively, if the indication information specifies that the display duration is the current day, the historical line segment of the part of the target data comprises the real-time data of the current day. The historical line segment of the partial target data may be determined based on parameter information (e.g., display section, etc.) of the display page, and the like, and is not limited herein.
In the method shown in fig. 1, if a data real-time display request for target data is received, the time for acquiring the target data is determined based on the interface refresh duration. When the time of acquiring the target data arrives, the value of the target data at the time is acquired. The values of the target data in the time period between the current time and the last time when the target data is acquired may be obtained by prediction based on a random function corresponding to a first value acquired at the current time and a second value acquired at the last time when the target data is acquired. And displaying the target data in the time period based on the first numerical value, the second numerical value and the random value obtained by prediction. Therefore, the target data are displayed through the actual numerical value of the target data and the random value obtained through prediction, the data display effect is improved, and the real-time data display authenticity is favorably improved.
In one possible example, after step S104, the following steps B1 and B2 may be further included, wherein:
and B1, predicting a second random value in the period from the first time to the current time based on the historical data of the target data and the first random value before the third time is reached.
In this embodiment, the time difference between the third time and the first time is the interface refresh duration. That is, the first time is the last time of obtaining the target data at the third time, and the time difference obtained by subtracting the first time from the third time is the interface refresh duration. Illustratively, if the interface refresh period is 5 minutes, it is 8 o 'clock 50 minutes at the first time and 8 o' clock 55 minutes at the third time.
The second random value refers to a value preset in a period from the first time to the third time, and may be understood as a random value preset after the second value. The number of the second random values is not limited in the present application, and may be a value greater than or equal to 1. Optionally, the number of the second random values is smaller than the number of the first random values and equal to the number of slices.
The method for predicting the second random value is not limited in the present application, and in a possible example, the following steps B11 to B13 may be included, wherein:
b11, determining a first numerical variation characteristic of the first random value.
The first numerical variation feature refers to a data variation feature of the first random value, and may be determined based on a numerical relationship between the first random value and a numerical value adjacent to the first random value, or between the previous and next N numerical values, 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 may be a value greater than 1 and less than half of the number of slices. Illustratively, the number of slices is 60, and N may be 5.
And B12, predicting a second numerical value change characteristic after the first moment based on the numerical value change rule of the target data and the first numerical value change characteristic.
The change rule of the value of the target data can be referred to above, and is not described herein again. The second numerical value change characteristic is a numerical value change rule determined by taking the target data as a whole, and is combined with a first numerical value change characteristic of a first random value obtained by previous prediction to predict to obtain a second numerical value change characteristic after the first moment. The first numerical value change characteristic can be adjusted based on a numerical value change rule to obtain a second numerical value change characteristic. Therefore, the accuracy of the predicted numerical value is improved.
And B13, acquiring a second random value in the period from the first time to the current time based on the second numerical value change characteristic and the first random value.
In this embodiment, the second random value may be generated based on the second value-varying characteristic and all the first random values, or the second random value may be generated based on the second value-varying characteristic and all the first random values and the generated second random value, or the second random value may be generated based on the second value-varying characteristic and the first random values in the same sequence as the second random value, and the like, which is not limited herein. The first random value in the same sequence as the second random value means that the sequence in the time period corresponding to the second random value is the same as the sequence in the time period corresponding to the first random value. Illustratively, the first random value is the 3 rd value in the period from the second time to the first time, and the second random value is the 3 rd value in the period from the first time to the third time.
It is understood that, in steps B11-B13, the value change rule of the historical data of the target data and the first value change characteristic of the first random value are determined. And predicting the change characteristic of the second numerical value after the first moment based on the numerical value change rule and the first numerical value change characteristic. A second random value within a period from the first time to the current time is then obtained based on the second numerical value variation characteristic and the first random value. Therefore, the second random value is predicted by combining the numerical variation characteristic, and the accuracy of prediction can be improved.
And B2, displaying the target data from the first time to the current time based on the first numerical value and the second random value.
In this embodiment, the target data from the first time to the current time may be displayed in chronological order by a line segment formed by connecting numerical values of the target data from the first time to the current time. That is, the left side of the line segment is the first numerical value, the right side is the current time or the second random value earlier than the current time, and the middle is the other second random values. The chronological order of the second random values may be determined based on the second value-varying characteristic. The line segment may also be displayed together with a historical line segment of a part of the target data, and the description of the part of the target data may refer to the foregoing description and will not be repeated herein.
It is to be appreciated that in steps B1 and B2, a second random value from the first time to the current time may be predicted before the third time is reached. Thus, the situation that no data is displayed at the current moment can be avoided. And the prediction is carried out based on the historical data and the first random value of the target data, so that the reality of real-time display can be improved.
In one possible example, after the step B2, the following steps B3 to B5 may be further included, in which:
b3, obtaining a third numerical value of the target data before the third time is reached.
B4, predicting at least two third random values in the period from the first time to the third time based on the random function corresponding to the first value and the third value.
In the embodiment of the present application, the third numerical value refers to a numerical value of the target data acquired when the third time arrives. The random function corresponding to the first value and the third value may be used to generate a third random value, and then the predicted data of the target data in the period from the first time point to the third time point may be displayed by the third random value, thereby displaying the target data in the form of a slice.
The random function corresponding to the first numerical value and the third numerical value may be described with reference to the random function corresponding to the first numerical value and the second numerical value, and the random function may be obtained based on the first numerical value and the third numerical value. Or the number of slices obtained by calculating the ratio between the interface refresh duration and the preset refresh duration 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 calculating the ratio between the target value and the number of slices may be constructed, which is not described herein again. Thus, after the random function corresponding to the first numerical value and the third numerical value is constructed, the third random value can be randomly generated, so that the number of the third random values between the first numerical value and the third numerical value is the slice number.
And B5, displaying the target data from the first time to the third time based on the first numerical value, the third random value and the third numerical value.
In the embodiment of the present application, the line segment of the target data from the first time to the third time may display the line segment connected by the numerical values of the target data from the first time to the third time in chronological order. That is, the left side of the line segment is the first numerical value, the right side is the third numerical value, and the middle is the third random value. The chronological order of the third random values may be determined based on the law of change of the values of the target data. The line segment may also be displayed together with a historical line segment of a part of the target data, and the description of the part of the target data may refer to the foregoing description and will not be repeated herein.
It is understood that, in steps B3-B5, the third value of the target data is obtained when the third time arrives. And predicting at least two third random values in the time period from the first time to the third time based on the random functions corresponding to the first numerical value and the third numerical value. And displaying the target data from the first time to the third time based on the first numerical value, the third random value and the third numerical value. Therefore, target data which are not acquired between the first moment and the third moment are displayed, the data display effect is improved, and the real-time data display authenticity is improved.
The method of the embodiments of the present application is set forth above in detail and the apparatus of the embodiments of the present application is provided below.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a data display device according to the present disclosure, consistent with the embodiment shown in fig. 1. As shown in fig. 2, the data display device 200 includes:
the communication unit 201 is used for receiving a data real-time display request aiming at target data;
the processing unit 202 is configured to obtain a first numerical value of the target data when a first time arrives; predicting at least two first random values in a time period from a second moment to the first moment based on a random function corresponding to the first numerical value and a second numerical value, wherein the second numerical value is a numerical value of the target data acquired when the second moment arrives, and the time difference between the first moment and the second moment is interface refreshing duration;
the display unit 203 is configured to display target data from the second time to the first time based on the first numerical value, the first random value, and the second numerical value.
In a possible example, the processing unit 202 is further configured to calculate a ratio between the interface refresh duration and a preset refresh duration of the target data, so as to obtain a slice number, where the number of the first random values is the slice number; calculating the absolute value of the difference between the first numerical value and the second numerical value to obtain a target value; calculating the ratio between the target value and the number of the slices to obtain an average value; and constructing a random function corresponding to the first numerical value and the second numerical value based on the target value, the average value and the slice number.
In a possible example, the processing unit 202 is further configured to obtain performance parameters of a front-end server and attribute information of the target data; determining a performance evaluation value of the front-end server based on the performance parameter and the attribute information; and determining the interface refreshing time length based on the performance evaluation value.
In a possible example, the processing unit 202 is further configured to obtain historical data of the target data; determining a numerical change rule of the target data based on the historical data; and determining the preset refreshing time length of the target data based on the numerical value change rule.
In a possible example, the processing unit 202 is specifically configured to determine a change type of the target data based on the numerical change rule; acquiring a random function formula corresponding to the change type; and substituting the target value, the average value and the slice number into the random function formula to obtain a random function corresponding to the first numerical value and the second numerical value.
In a possible example, the processing unit 202 is further configured to predict a second random value in a period from the first time to the current time based on the historical data of the target data and the first random value before a third time arrives, where a time difference between the third time and the first time is the interface refresh time length; the display unit 203 is further configured to display target data from the first time to the current time based on the first numerical value and the second random value.
In a possible example, the processing unit 202 is further configured to obtain a third value of the target data when the third time arrives; predicting at least two third random values in a period from the first time to the third time based on a random function corresponding to the first numerical value and the third numerical value; the display unit 203 is further configured to display target data from the first time to the third time based on the first numerical value, the third random value, and the third numerical value.
In a possible example, the processing unit 202 is specifically configured to determine a first numerical variation characteristic of the first random value; predicting a second numerical variation characteristic after the first time based on a numerical variation rule of the target data and the first numerical variation characteristic; and acquiring a second random value in a period from the first time to the current time based on the second numerical value change characteristic and the first random value.
For detailed processes executed by each unit in the data display device 200, reference may be made to the execution steps in the foregoing method embodiments, which are not described herein again.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a computer device according to an embodiment of the present disclosure. As shown in fig. 3, 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 interconnected via a bus 350. The related functions implemented by the communication unit 201 shown in fig. 2 may be implemented by the communication interface 330, and the related functions implemented by the processing unit 202 and the display unit 203 shown in fig. 2 may be implemented by the processor 310.
The memory 320 has stored therein a computer program 340, the computer program 340 being configured to be executed by the processor 310, the computer program 340 comprising instructions for:
receiving a data real-time display request aiming at target data;
when the first time arrives, acquiring a first numerical value of the target data;
predicting at least two first random values in a time period from the second moment to the first moment based on a random function corresponding to the first numerical value and the second numerical value, wherein the second numerical value is a numerical value of the target data acquired when the second moment arrives, and a time difference between the first moment and the second moment is interface refreshing duration;
displaying target data from the second time to the first time based on the first numerical value, the first random value, and the second numerical value.
In one possible example, before predicting at least two first random values within a period from a second time instant to the first time instant based on the random function to which the first and second numerical values correspond, the computer program 340 comprises instructions specifically for performing the following steps:
calculating the ratio of the interface refreshing time length to the preset refreshing time length of the target data to obtain the number of the slices, wherein the number of the first random values is the number of the slices;
calculating the absolute value of the difference between the first numerical value and the second numerical value to obtain a target value;
calculating the ratio between the target value and the number of the slices to obtain an average value;
and constructing a random function corresponding to the first numerical value and the second numerical value based on the target value, the average value and the slice number.
In one possible example, before the calculating the ratio between the interface refresh duration and the preset refresh duration of the target data to obtain the number of slices, the computer program 340 further includes instructions for:
acquiring performance parameters of a front-end server and attribute information of the target data;
determining a performance evaluation value of the front-end server based on the performance parameter and the attribute information;
and determining the interface refreshing time length based on the performance evaluation value.
In one possible example, before the calculating the ratio between the interface refresh duration and the preset refresh duration of the target data to obtain the number of slices, the computer program 340 further includes instructions for:
acquiring historical data of the target data;
determining a numerical change rule of the target data based on the historical data;
and determining the preset refreshing time length of the target data based on the numerical value change rule.
In one possible example, in said 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 comprises in particular instructions for:
determining the change type of the target data based on the numerical change rule;
acquiring a random function formula corresponding to the change type;
and substituting the target value, the average value and the slice number into the random function formula to obtain random functions corresponding to the first numerical value and the second numerical value.
In one possible example, after said displaying the target data from the second time to the first time based on the first numerical value, the first random value, and the second numerical value, the computer program 340 further comprises instructions for performing the steps of:
predicting a second random value in a time period from the first time to the current time based on the historical data of the target data and the first random value before a third time is reached, wherein the time difference between the third time and the first time is the interface refreshing time length;
displaying target data from the first time to a current time based on the first numerical value and the second random value;
when the third moment is reached, acquiring a third numerical value of the target data;
predicting at least two third random values in a period from the first time to the third time based on a random function corresponding to the first numerical value and the third numerical value;
displaying target data from the first time to the third time based on the first numerical value, the third random value, and the third numerical value.
In one possible example, in the aspect of predicting a second random value within a period from the first time to the current time based on the historical data of the target data and the first random value, the computer program 340 specifically includes instructions for performing the steps of:
determining a first numerical variation characteristic of the first random value;
predicting a second numerical variation characteristic after the first time based on a numerical variation rule of the target data and the first numerical variation characteristic;
and acquiring a second random value in a period from the first time to the current time based on the second numerical value change characteristic and the first random value.
Embodiments of the present application also provide a computer storage medium, where the computer storage medium stores a computer program for causing a computer to execute to implement part or all of the steps of any one of the methods described in the method embodiments, and the computer includes an electronic device or a server.
Embodiments of the application also provide a computer program product comprising a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform to implement some or all of the steps of any of the methods recited in the method embodiments. The computer program product may be a software installation package and the computer comprises an electronic device or a server.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art will also appreciate that the embodiments described in this specification are presently preferred and that no particular act or mode of operation is required in the present application.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, a division of a unit is merely a logical division, and an actual implementation may have another division, for example, at least one unit or component may be combined or integrated with another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may also be distributed on at least one network unit. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a hardware mode or a software program mode.
The integrated unit, if implemented in the form of a software program module and sold or used as a stand-alone product, may be stored in a computer readable memory. With such an understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a memory and includes several instructions for causing a computer (which may be a personal computer, a server, a network device, or the like) to execute all or part of the steps of the methods according to the embodiments of the present application. And the aforementioned memory comprises: various media capable of storing program codes, such as a usb disk, a read-only memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and the like.
The foregoing detailed description of the embodiments of the present application has been presented to illustrate the principles and implementations of the present application, and the above description of the embodiments is only provided to help understand the method and the core concept of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A method of displaying data, comprising:
receiving a data real-time display request aiming at target data;
when the first time arrives, acquiring a first numerical value of the target data;
predicting at least two first random values in a time period from a second moment to the first moment based on a random function corresponding to the first numerical value and a second numerical value, wherein the second numerical value is a numerical value of the target data acquired when the second moment arrives, and the time difference between the first moment and the second moment is interface refreshing duration;
displaying target data from the second time to the first time based on the first numerical value, the first random value, and the second numerical value.
2. The method of claim 1, wherein before predicting at least two first random values within a period from a second time to the first time based on the random function corresponding to the first and second numerical values, the method further comprises:
calculating the ratio of the interface refreshing time length to the preset refreshing time length of the target data to obtain the number of the slices, wherein the number of the first random values is the number of the slices;
calculating the absolute value of the difference between the first numerical value and the second numerical value to obtain a target value;
calculating the ratio between the target value and the number of the slices to obtain an average value;
and constructing a random function corresponding to the first numerical value and the second numerical value based on the target value, the average value and the slice number.
3. The method of claim 2, wherein before the calculating a ratio between the interface refresh time and a preset refresh time of the target data to obtain the number of slices, the method further comprises:
acquiring performance parameters of a front-end server and attribute information of the target data;
determining a performance evaluation value of the front-end server based on the performance parameter and the attribute information;
and determining the interface refreshing time length based on the performance evaluation value.
4. The method of claim 2, wherein before the calculating a ratio between the interface refresh time and a preset refresh time of the target data to obtain the number of slices, the method further comprises:
acquiring historical data of the target data;
determining a numerical change rule of the target data based on the historical data;
and determining the preset refreshing time length of the target data based on the numerical value change rule.
5. The method of claim 4, wherein constructing the random function of the first and second values based on the target value, the average value, and the number of slices comprises:
determining the change type of the target data based on the numerical change rule;
acquiring a random function formula corresponding to the change type;
and substituting the target value, the average value and the slice number into the random function formula to obtain a random function corresponding to the first numerical value and the second numerical value.
6. The method of any of claims 1-5, wherein after the displaying target data from the second time to the first time based on the first numerical value, the first random value, and the second numerical value, the method further comprises:
predicting a second random value in a time period from the first time to the current time based on the historical data of the target data and the first random value before a third time is reached, wherein the time difference between the third time and the first time is the interface refreshing time length;
displaying target data from the first time to a current time based on the first numerical value and the second random value;
when the third moment is reached, acquiring a third numerical value of the target data;
predicting at least two third random values in a period from the first time to the third time based on a random function corresponding to the first numerical value and the third numerical value;
displaying target data from the first time to the third time based on the first numerical value, the third random value, and the third numerical value.
7. The method of claim 6, wherein predicting a second random value within a period from the first time to a current time 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 numerical variation characteristic after the first time based on a numerical variation rule of the target data and the first numerical variation characteristic;
and acquiring a second random value in a period from the first time to the current time based on the second numerical value change characteristic and the first random value.
8. A data display device, comprising:
the communication unit is used for receiving a data real-time display request aiming at target data;
the processing unit is used for acquiring a first numerical value of the target data when a first moment is reached; predicting at least two first random values in a time period from a second moment to the first moment based on a random function corresponding to the first numerical value and a second numerical value, wherein the second numerical value is a numerical value of the target data acquired when the second moment arrives, and the time difference between the first moment and the second moment is interface refreshing duration;
and the display unit is used for 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.
9. A computer device, characterized in that it comprises a processor, a memory and a communication interface, wherein the memory stores a computer program configured to be executed by the processor, the computer program comprising instructions for carrying out the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program, the computer program causing a computer to execute to implement the method of any one of claims 1-7.
CN202210145272.5A 2022-02-17 2022-02-17 Data display method and device, computer equipment and storage medium Pending CN114510668A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210145272.5A CN114510668A (en) 2022-02-17 2022-02-17 Data display method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210145272.5A CN114510668A (en) 2022-02-17 2022-02-17 Data display method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114510668A true CN114510668A (en) 2022-05-17

Family

ID=81551710

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210145272.5A Pending CN114510668A (en) 2022-02-17 2022-02-17 Data display method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114510668A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116303485A (en) * 2022-09-08 2023-06-23 上海数禾信息科技有限公司 Business index display method, device, computer equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116303485A (en) * 2022-09-08 2023-06-23 上海数禾信息科技有限公司 Business index display method, device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
US8762525B2 (en) Managing risk in resource over-committed systems
KR20160132432A (en) Dynamic resource management for multi-process applications
CN106648747B (en) Process preloading processing method and device
WO2015169212A1 (en) Startup accelerating method and apparatus
CN105844107B (en) Data processing method and device
CN111068305B (en) Cloud game loading control method and device, electronic equipment and storage medium
CN112418673A (en) Case allocation method, device and medium
CN110618922A (en) Performance test method and related equipment
CN114510668A (en) Data display method and device, computer equipment and storage medium
US20210349707A1 (en) Upgrade determinations of devices based on telemetry data
CN111866129B (en) Method, device and medium for determining service availability index based on cloud platform
CN107168643B (en) Data storage method and device
CN107395447B (en) Module detection method, system capacity estimation method and corresponding equipment
CN112732435B (en) Memory dynamic allocation method and device, electronic equipment and readable storage medium
CN110569114B (en) Service processing method, device, equipment and storage medium
CN110347546B (en) Dynamic adjustment method, device, medium and electronic equipment for monitoring task
CN113050782A (en) Image construction method and device, terminal and storage medium
CN113051126B (en) Portrait construction method, apparatus, device and storage medium
CN114676272A (en) Information processing method, device and equipment of multimedia resource and storage medium
US20210357781A1 (en) Efficient techniques for determining the best data imputation algorithms
CN115391416A (en) Potential customer mining method and device, electronic equipment and storage medium
CN112181575A (en) Display control system, method and device
CN112685371A (en) File storage space distribution method and device based on big data and storage medium
CN112181577A (en) Display control system, method and device
CN114513686A (en) Method and device for determining video information and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination