A response time optimization method, device and medium based on statistical data

By generating and compensating business data, summarizing and storing it in a cache database, the problem of time-consuming query of summation statistics in JAVA applications is solved, and the response speed and user experience are improved.

CN114416760BActive Publication Date: 2025-03-25浪潮工业互联网股份有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111578317.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-22
Publication Date
2025-03-25
Estimated Expiration
2041-12-22

AI Technical Summary

Technical Problem

In a single JAVA application, when querying the statistical data of the summary class required by the user, the large amount of business data will cause the summary to take a long time and the response time will be too long, which will affect the user experience.

Method used

By generating real business data and virtual business data, we judge and make up for the missing business data, summarize the number of failures statistics, and store them in the cache database to directly call the optimized response time.

Benefits of technology

Improve the accuracy of statistical data, shorten program response time, and improve user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114416760B_ABST
    Figure CN114416760B_ABST
Patent Text Reader

Abstract

The embodiments of this specification disclose a response time optimization method, device and medium based on statistical data. The method includes: generating corresponding real business data according to the device operation status of multiple devices, selecting multiple real business data belonging to the same device according to the device identifier, and judging whether there is any business data missing in the multiple real business data according to the timestamps respectively corresponding to the multiple real business data; if there is any business data missing in the multiple real business data, using virtual business data to fill it, and summarizing the number of failures of all real business data and all virtual business data within a specified time period according to the fault identifiers in the real business data and the virtual business data to obtain statistical data within the specified time period, and storing the statistical data in a cache database so that when a user's statistical data display request is received, the response time of the JAVA application is optimized by directly calling the statistical data in the cache database.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of computer technology, and more particularly to a response time optimization method, device, and medium based on statistical data. Background Art

[0002] With the development of computer technology and various applications, it is becoming more and more common to manage the operation of projects through applications. In the operation of some projects, users need to view the business data in the project in a more concise way, such as the statistical data after superimposing the business data, the number of statistical business data, and the statistical business data time. When the user clicks the request button on the front-end interface, the user needs to see these statistical data in real time.

[0003] In some single JAVA applications, after receiving a user's request, it is necessary to query business data from the database in real time, perform data statistics, and then display the statistical results to the user. In this process, if the query request required by the user is a statistical data of the summary type, when the amount of business data is large, the summary and summation takes a long time, resulting in a long program response time, affecting the user experience. Summary of the invention

[0004] One or more embodiments of the present specification provide a response time optimization method, device and medium based on statistical data, which are used to solve the following technical problems: if the query request required by the user is a statistical data of the summary and sum type, when the amount of business data is large, the summary and summation takes a long time, resulting in a long program response time, affecting the user experience.

[0005] One or more embodiments of this specification adopt the following technical solutions:

[0006] One or more embodiments of the present specification provide a response time optimization method based on statistical data, which is applied to a JAVA application. The method includes: generating corresponding real business data according to the device operation status of multiple devices, wherein the real business data includes a fault identifier, a device identifier and a timestamp, and the timestamp is used to indicate the time corresponding to the real business data; selecting multiple real business data belonging to the same device according to the device identifier, and judging whether there is business data missing in the multiple real business data according to the timestamps respectively corresponding to the multiple real business data; if there is business data missing in the multiple real business data, using virtual business data to fill it, wherein the virtual business data is used to indicate the average operation status of the device, and the virtual business data includes a virtual fault identifier, a device identifier and a timestamp corresponding to the time when the business data is missing; according to the fault identifiers in the real business data and the virtual business data, summarizing the number of faults of all real business data and all virtual business data within a specified time period, obtaining statistical data within the specified time period, and storing the statistical data in a cache database, so that when a statistical data display request from a user is received, the response time of the JAVA application is optimized by directly calling the statistical data in the cache database.

[0007] Furthermore, the method summarizes the number of failures of all real business data and all virtual business data within a specified time period according to the fault identifiers in the real business data and the virtual business data to obtain statistical data within the specified time period, specifically including: setting a statistical interval according to changes in the real business data; within the statistical interval, regularly summarizing the number of failures of the real business data and the virtual business data according to the fault identifiers of the real business data and the virtual business data to obtain sub-statistical data under multiple statistical intervals; sequentially identifying the sub-statistical data under the multiple statistical intervals according to the statistical time of the sub-statistical data; determining the relationship between the specified time period and the statistical interval, and superimposing the corresponding sub-statistical data belonging to the specified time period to obtain statistical data within the specified time period.

[0008] Furthermore, if there is missing data among the multiple real business data, before using virtual business data to fill the missing data, the method also includes: determining the timestamp corresponding to the missing data as the current moment; using the real business data of the previous moment as the first real business data, and using the real business data of the next moment as the second real business data; if the fault identifier in the first real business data and the fault identifier and the device identifier in the second real business data are the same, generating virtual business data according to the fault identifier and the device identifier.

[0009] Furthermore, the request information of the statistical data display request includes task information of the statistical data; when the statistical data display request from the user is received, the application response time is optimized by directly calling the statistical data in the cache database, specifically including: presetting a mapping relationship between the task information and the statistical data, and storing the mapping relationship in the cache database; receiving the request information of the statistical result display request, obtaining the task information in the request information; and calling the statistical data corresponding to the task information in the cache database according to the mapping relationship.

[0010] Furthermore, when the statistical data display request from the user is received, the response time of the JAVA application is optimized by directly calling the statistical data in the cache database, specifically including: receiving the statistical data display request from the user, determining the request time of the statistical data display request, and determining the specified time period of the statistical data according to the request time; setting a back-end interface in the JAVA application, and directly calling the statistical data to be displayed through the back-end interface for display on the front end, thereby optimizing the response time of the JAVA application.

[0011] Furthermore, when the multiple devices belong to different users, the selecting of multiple real business data belonging to the same device according to the device identifier specifically includes: obtaining registration information of multiple users in advance, and establishing a corresponding relationship between the users and the devices according to the registration information, wherein one user corresponds to multiple devices; determining multiple business data belonging to the same user according to the corresponding relationship between the users and the devices; and selecting multiple real business data belonging to the same device among the multiple business data according to the device identifier.

[0012] Furthermore, when the multiple devices belong to different users, the statistical data are stored in a cache database, and then the method also includes: determining a user identifier corresponding to each of the multiple users based on registration information of the multiple users; and setting the user identifier in the statistical data so as to obtain all statistical data corresponding to each user in the cache database based on the user identifier of each user.

[0013] Furthermore, the establishing of the correspondence between the user and the device based on the registration information specifically includes: presetting a user registration interface so that the multiple users can register on the registration interface and obtain the registration information; determining the business types corresponding to the multiple users respectively through the registration information of the multiple users; and determining multiple devices to be monitored for each user based on the business type corresponding to each user, so as to establish the correspondence between the user and the multiple devices to be monitored.

[0014] One or more embodiments of this specification provide a response time optimization device based on statistical data, including:

[0015] at least one processor; and,

[0016] a memory communicatively connected to the at least one processor; wherein,

[0017] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can: generate corresponding real business data according to the device operation status of multiple devices, wherein the real business data includes a fault identification device identification and a timestamp, and the timestamp is used to indicate the time corresponding to the real business data; select multiple real business data belonging to the same device according to the device identification, and determine whether there is business data missing in the multiple real business data according to the timestamps respectively corresponding to the multiple real business data; if there is business data missing in the multiple real business data, use virtual business data to fill it, wherein the virtual business data is used to indicate the average operation status of the device, and the virtual business data includes a virtual fault identification, a device identification, and a timestamp corresponding to the time when the business data is missing; according to the fault identification in the real business data and the virtual business data, summarize the number of faults of all real business data and all virtual business data within a specified time period to obtain statistical data within the specified time period, and store the statistical data in a cache database, so that when receiving a statistical data display request from a user, the response time of the JAVA application is optimized by directly calling the statistical data in the cache database.

[0018] One or more embodiments of the present specification provide a non-volatile computer storage medium, storing computer executable instructions, wherein the computer executable instructions are configured to: generate corresponding real business data according to the device operation status of multiple devices, wherein the real business data includes a fault identification device identification and a timestamp, and the timestamp is used to indicate the time corresponding to the real business data; select multiple real business data belonging to the same device according to the device identification, and determine whether there is business data missing in the multiple real business data according to the timestamps respectively corresponding to the multiple real business data; if there is business data missing in the multiple real business data, use virtual business data to fill it, wherein the virtual business data is used to indicate the average operation status of the device, and the virtual business data includes a virtual fault identification, a device identification, and a timestamp corresponding to the time when the business data is missing; summarize the number of faults of all real business data and all virtual business data within a specified time period according to the fault identification in the real business data and the virtual business data, obtain statistical data within the specified time period, and store the statistical data in a cache database, so that when a statistical data display request from a user is received, the response time of a JAVA application is optimized by directly calling the statistical data in the cache database.

[0019] At least one of the above-mentioned technical solutions adopted in the embodiments of this specification can achieve the following beneficial effects: judging whether there is missing data in the business data, and when there is missing data, using virtual business data instead, thereby improving the accuracy of statistical data; in addition, the statistical data is stored in a cache database after being counted, and when the user needs to display the statistical data on the page, it only needs to call from the cache database, thereby shortening the program response time and improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the embodiments of this specification or the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art description. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor. In the drawings:

[0021] Figure 1 A flow chart of a response time optimization method based on statistical data provided in an embodiment of this specification;

[0022] Figure 2 A schematic diagram of the structure of a response time optimization device based on statistical data provided in an embodiment of this specification. DETAILED DESCRIPTION

[0023] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.

[0024] With the development of computer technology and various applications, it is becoming more and more common to manage the operation of projects through applications. In the operation of some projects, users need to view the business data in the project in a more concise way, such as the statistical data after superimposing the business data, the number of statistical business data, and the statistical business data time. When the user clicks the request button on the front-end interface, the user needs to see these statistical data in real time.

[0025] In the prior art, after receiving a user's request, the business data is queried from the database in real time, data statistics are performed, and the statistical results are displayed to the user. In this process, if the query request required by the user is a statistical data of the summary type, when the amount of business data is large, the summary and summation takes a long time, resulting in a long response time of the program, affecting the user experience.

[0026] The embodiment of this specification provides a response time optimization method based on statistical data. It should be noted that the method provided in the embodiment of this specification can be executed by a server or by any processing device with data processing function, and this specification does not limit it here. The method provided in the embodiment of this specification is applied to JAVA application programs, and the application programs here are suitable for various projects, especially small and medium-sized projects. Figure 1 A flow chart of a response time optimization method based on statistical data provided in an embodiment of this specification is shown as follows: Figure 1 As shown, the method mainly includes the following steps:

[0027] Step S101, generating corresponding real business data according to the device operation status of multiple devices.

[0028] In actual application scenarios, the operating status of the equipment is monitored through the application program, for example, the usage of the server in the computer room is monitored, and the operating status of the working equipment in the factory is monitored.

[0029] In one embodiment of the present specification, the operation data of the working equipment is collected by a networked monitoring device set in a computer room or a factory, and real business data is generated according to the equipment operation status corresponding to the operation data, and the real business data is stored in a disk database. The disk database can be any type of disk database, and the embodiments of the present specification are not specifically limited. It should be noted that the real business data here includes a fault identifier, a device identifier, and a timestamp, wherein the timestamp is used to indicate the time corresponding to the real business data.

[0030] Since there are multiple working devices in a computer room or factory, that is to say, the real business data generated includes the operating status of all devices, therefore, the device identification is added to the real business data. It should be noted that the fault identification can be used to indicate whether the device fails at a certain time. For example, when the fault identification is set to 1, it indicates that the device has an operating failure; when the fault identification is set to 0, it indicates that the device is operating normally. The fault identification can also be used to indicate what kind of fault occurred in the device at a certain moment. For example, setting the fault identification to 1 indicates that the device has a first type of fault; setting the fault identification to 2 indicates that the device has a second type of fault; setting the fault identification to 3 indicates that the device has a third type of fault; setting the fault identification to 0 indicates that the device is operating normally. Among them, the type of fault can be determined based on the maintenance record of the equipment. The setting of the fault identification is not specifically limited in the embodiments of this specification.

[0031] Step S102 : selecting multiple real business data belonging to the same device according to the device identifier, and judging whether there is any business data missing in the multiple real business data according to the timestamps respectively corresponding to the multiple real business data.

[0032] In the actual business data generation process, there may be a situation where the device operation data is not collected at a certain moment, resulting in incomplete data in the real business data and statistical result errors in the statistical aggregation process. In order to solve the above problem, the embodiment of this specification pre-determines whether there is business data missing before data aggregation.

[0033] In one embodiment of the present specification, all real business data are classified according to the device identification of each real business data, and the real business data belonging to the same device are grouped. Among all the real business data belonging to the same device, time sorting is performed according to the timestamp corresponding to each real business data. Since the running time of the device is continuous, it is possible to determine whether the business data is missing by the breakpoint moment in the timestamp. For example, within 5 seconds, the business data of device A includes business data A1, business data A2, business data A4 and business data A5, wherein the timestamp of business data A1 is the 1st second, the timestamp of business data A2 is the 2nd second, the timestamp of business data A4 is the 4th second, and the timestamp of business data A5 is the 5th second, that is, within 5 seconds, the breakpoint moment is the 3rd second, so it can be considered that there is a business data missing situation at the 3rd second.

[0034] In addition, since the application is for multiple users, the actual management items of each user are different, so the corresponding supervision devices of different users are different. For example, the devices that user A needs to manage include device A, device B, and device C, and the devices that user B needs to manage include device D, device E, and device F. In other words, the business data includes the operating status of the above 6 devices and belongs to different users. When multiple devices belong to different users, multiple real business data belonging to the same device are selected according to the device identification, and the business data of the same user needs to be screened out in advance in the business data.

[0035] In one embodiment of the present specification, when a user needs to use an application for project management and equipment monitoring, user registration should be performed before use to set the user's data viewing authority. First, a user registration interface is preset on the application, and multiple users register on the registration interface to obtain corresponding registration information. The business information in the user registration information is extracted, and the business type is determined according to the business information. According to the business type corresponding to each user, multiple monitored devices of each user are determined to facilitate the establishment of a corresponding relationship between the user and the multiple monitored devices. It should be noted that one user can correspond to multiple devices. For example, user A corresponds to device A, device B, and device C, and user B corresponds to device D, device E, and device F. According to the corresponding relationship between user A and device A, device B, and device C, the business data of device A, device B, and device C are determined as multiple business data belonging to the same user A. Then, among the multiple business data, multiple real business data belonging to the same device are selected according to the device identifier. After determining multiple real business data belonging to the same device, it is determined whether there is business data missing in the multiple real business data according to the timestamps corresponding to the multiple real business data.

[0036] Step S103: If there is any missing business data in the multiple real business data, virtual business data is used to complete it.

[0037] If there is missing business data in multiple real business data, virtual business data needs to be used to fill it.

[0038] In one embodiment of the present specification, the timestamp corresponding to the missing data is used as the current moment, the real business data of the previous moment before the current moment is obtained as the first real business data, the real business data of the next moment after the current moment is obtained as the second real business data, and the virtual business data is determined according to the first real business data and the second real business data.

[0039] For example, the service data of device A within 5 seconds includes service data A1, service data A2, service data A4 and service data A5. Among them, the fault identification 0, device identification A and timestamp 1 in service data A1, that is, service data A1 indicates that device A operates normally in the first second; the fault identification 1, device identification A and timestamp 2 in service data A2, service data A2 indicates that device A fails in the second second, and similarly, service data A4 indicates that device A fails in the fourth second, and service data A5 indicates that device A fails in the fifth second; the missing time of service data is the third second, and the virtual service data of user A is determined according to the fault identification of service data A2 and service data A4, where service data A2 and service data A4 correspond to the first real data and the second real data respectively. Since device A fails in both the second and the fourth second, it can be set that device A in the third second also fails, so virtual service data A3 includes fault identification 1, device identification A and timestamp 2. That is to say, if the fault identifier in the first real service data and the fault identifier and the device identifier in the second real service data are all the same, the virtual service data is generated according to the fault identifier and the device identifier.

[0040] Step S104, summarizing the number of failures of all real business data and all virtual business data within a specified time period according to the failure identifiers in the real business data and the virtual business data, obtaining statistical data within the specified time period, and storing the statistical data in a cache database.

[0041] In one embodiment of the present specification, the number of failures of all real business data and all virtual business data within a specified time period is summarized to obtain statistical data within the specified time period. It should be noted that the summary can be performed based on the fault identifiers in the real business data and the virtual business data. For example, the fault identifier is set to 1 to indicate that the device has failed, and the fault identifier is set to 0 to indicate that the device is operating normally. It is only necessary to add the numerical values ​​of the device identifiers at each moment within the specified time period to obtain statistical data.

[0042] In one embodiment of the present specification, a statistical interval can also be set according to the change of the real business data; a timed task is set in the application, and within the statistical interval, the number of failures of the real business data and the virtual business data is regularly summarized according to the fault identification of the real business data and the virtual business data to obtain sub-statistical data under multiple statistical intervals. According to the statistical time of the sub-statistical data, the sub-statistical data under multiple statistical intervals are sequentially identified. The relationship between the specified time period and the statistical interval is determined, and the corresponding sub-statistical data belonging to the specified time period are superimposed to obtain the statistical data within the specified time period. The statistical data is stored in a cache database.

[0043] The following example illustrates that if the real business data changes every three seconds, 3 seconds is set as the statistical time of the scheduled task, that is, the number of failures is counted every 3 seconds as the sub-statistical data. It should be noted that the sub-statistical data is the number of failures within 3 seconds. Sort multiple sub-statistical data in chronological order. Assuming that the specified time period is 00:00:00-00:00:30, the sub-statistical data sorted 1-10 need to be superimposed to obtain the failure number statistics from 00:00:00-00:00:30.

[0044] In one embodiment of the present specification, the cache database may also be referred to as an in-memory database. It should be noted that the cache database may be a redis database or other databases with the same function. Redis (Remote Dictionary Server) is a key-value NoSQL database based on memory implementation, also commonly referred to as a data structure server, which can store a variety of data types, such as strings, hashes, lists, sets, and ordered sets. The statistical data of all users are stored in the database, and the user to whom the statistical data belongs can be determined by setting a user ID for the user. When generating statistical data, the user ID is added to the statistical data. When multiple devices belong to different users, the user ID corresponding to each of the multiple users is determined based on the registration information of the multiple users, and all statistical data corresponding to each user are obtained in the cache database based on the user ID of each user.

[0045] Step S105, when receiving a statistical data display request from a user, the response time of the JAVA application is optimized by directly calling the statistical data in the cache database.

[0046] In actual applications, different users obtain different types of statistical data. For example, the statistical data type obtained by user A is the number of fault statistics, and the statistical data obtained by user B is the fault type statistics. In order to reduce the response time of the program, multiple task information can be preset, corresponding statistical data can be generated under each task information, and a mapping relationship between task information and statistical data can be established, and the mapping relationship can be stored in the cache database.

[0047] According to the request information of the user statistical result display request received, the request information of the statistical data display request includes the task information and request time of the statistical data. The task information is obtained in the request information, and the statistical data corresponding to the task information is called in the cache database through the task information and the mapping relationship. And the specified time period of the statistical data is determined according to the request time. For example, if the user's request time is 6 o'clock, it is necessary to obtain statistical data within half an hour, and the specified time period is determined to be 5:30-6:00. After receiving the display request, the back-end interface is set in the JAVA application, and the statistical data to be displayed is directly called through the back-end interface to display on the front end, thereby optimizing the response time of the application.

[0048] Through the method provided in the embodiments of this specification, it is determined whether there is missing data in the business data. When there is missing data, virtual business data is used instead, which improves the accuracy of the statistical data. In addition, the statistical data is stored in a cache database after being counted. When the user needs to display the statistical data on the page, it only needs to call it from the cache database, which shortens the program response time and improves the user experience.

[0049] The embodiment of this specification also provides a response time optimization device based on statistical data, such as Figure 2 As shown, the device includes:

[0050] at least one processor; and,

[0051] a memory communicatively connected to at least one processor; wherein,

[0052] The memory stores instructions that can be executed by at least one processor, and the instructions are executed by at least one processor so that the at least one processor can: generate corresponding real business data according to the device operation status of multiple devices, wherein the real business data includes a fault identification device identification and a timestamp, and the timestamp is used to indicate the time corresponding to the real business data; select multiple real business data belonging to the same device according to the device identification, and judge whether there is business data missing in the multiple real business data according to the timestamps corresponding to the multiple real business data; if there is business data missing in the multiple real business data, use virtual business data to fill it, wherein the virtual business data is used to indicate the average state of device operation, and the virtual business data includes a virtual fault identification, a device identification, and a timestamp corresponding to the time when the business data is missing; according to the fault identification in the real business data and the virtual business data, summarize the number of faults of all real business data and all virtual business data within a specified time period, obtain statistical data within the specified time period, and store the statistical data in a cache database, so that when receiving a user's statistical data display request, the response time of the JAVA application is optimized by directly calling the statistical data in the cache database.

[0053] The embodiment of the present specification also provides a non-volatile computer storage medium, storing computer executable instructions, wherein the computer executable instructions are configured to: generate corresponding real business data according to the device operation status of multiple devices, wherein the real business data includes a fault identification device identification and a timestamp, and the timestamp is used to indicate the time corresponding to the real business data; select multiple real business data belonging to the same device according to the device identification, and determine whether there is business data missing in the multiple real business data according to the timestamps respectively corresponding to the multiple real business data; if there is business data missing in the multiple real business data, use virtual business data to fill it, wherein the virtual business data is used to indicate the average state of device operation, and the virtual business data includes a virtual fault identification, a device identification, and a timestamp corresponding to the time when the business data is missing; summarize the number of faults of all real business data and all virtual business data within a specified time period according to the fault identification in the real business data and the virtual business data, obtain statistical data within the specified time period, and store the statistical data in a cache database, so that when a user's statistical data display request is received, the response time of the JAVA application is optimized by directly calling the statistical data in the cache database.

[0054] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, equipment, and non-volatile computer storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0055] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

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

[0057] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this disclosure.

[0058] In the embodiments provided in the present disclosure, it should be understood that the disclosed devices / electronic devices and methods can be implemented in other ways. For example, the device / electronic device embodiments described above are merely schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation. Multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection of devices or units, which may be electrical, mechanical or other forms.

[0059] 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 multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0060] In addition, each functional unit in each embodiment of the present disclosure 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 functional units.

[0061] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present disclosure implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. The computer program may include computer program code, and the computer program code may be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electric carrier signals and telecommunication signals.

[0062] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0063] The above description is only one or more embodiments of this specification and is not intended to limit this specification. For those skilled in the art, one or more embodiments of this specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of one or more embodiments of this specification shall be included in the scope of the claims of this specification.

Claims

1. A response time optimization method based on statistical data, applied to JAVA applications, characterized in that: The method comprises: Generate corresponding real business data according to the device operation status of multiple devices, wherein the real business data includes a fault identifier, a device identifier and a timestamp, and the timestamp is used to indicate the time corresponding to the real business data; Selecting multiple real business data belonging to the same device according to the device identifier, and judging whether there is any business data missing in the multiple real business data according to timestamps respectively corresponding to the multiple real business data; If there is any missing business data among the multiple real business data, virtual business data is used to fill it, wherein the virtual business data is used to represent the average state of the operation of the device, and the virtual business data includes a virtual fault identifier, a device identifier, and a timestamp corresponding to the time when the business data is missing; According to the fault identifiers in the real business data and the virtual business data, the number of faults of all the real business data and all the virtual business data within a specified time period is summarized to obtain statistical data within the specified time period, and the statistical data is stored in a cache database so that when a statistical data display request from a user is received, the response time of the JAVA application is optimized by directly calling the statistical data in the cache database; according to the fault identifiers in the real business data and the virtual business data, the number of faults of all the real business data and all the virtual business data within a specified time period is summarized to obtain statistical data within the specified time period, specifically including: According to the change of the real business data, set the statistical interval; In the statistical interval, according to the fault identifiers of the real service data and the virtual service data, the number of faults of the real service data and the virtual service data is summarized regularly to obtain sub-statistical data in multiple statistical intervals; sequentially marking the sub-statistical data under the multiple statistical intervals according to the statistical time of the sub-statistical data; The relationship between the specified time period and the statistical interval is determined, and the corresponding sub-statistical data belonging to the specified time period are superimposed to obtain the statistical data within the specified time period.

2. The response time optimization method based on statistical data according to claim 1, characterized in that: If there is missing data in the plurality of real business data, before using virtual business data to fill the missing data, the method further includes: Determine the timestamp corresponding to the missing data as the current time; Using the real business data at the moment before the current moment as the first real business data, and using the real business data at the moment after the current moment as the second real business data; If the fault identifier in the first real service data and the fault identifier and the device identifier in the second real service data are all the same, virtual service data is generated according to the fault identifier and the device identifier.

3. The response time optimization method based on statistical data according to claim 1 is characterized in that: The request information of the statistical data display request includes task information of the statistical data; When receiving a statistical data display request from a user, the application response time is optimized by directly calling the statistical data in the cache database, specifically including: Presetting a mapping relationship between the task information and the statistical data, and storing the mapping relationship in the cache database; Receiving request information for the statistical result display request, and obtaining the task information from the request information; According to the mapping relationship, statistical data corresponding to the task information is called in the cache database.

4. The response time optimization method based on statistical data according to claim 1, characterized in that: When receiving a statistical data display request from a user, the response time of the JAVA application is optimized by directly calling the statistical data in the cache database, specifically including: receiving a statistical data display request from a user, determining a request time for the statistical data display request, and determining a specified time period for the statistical data according to the request time; A back-end interface is set in the JAVA application program, and the statistical data to be displayed is directly called through the back-end interface so as to be displayed on the front end, thereby optimizing the response time of the JAVA application program.

5. The method for optimizing response time based on statistical data according to claim 1, characterized in that: When the multiple devices belong to different users, selecting multiple real business data belonging to the same device according to the device identifier specifically includes: Acquire registration information of multiple users in advance, and establish a correspondence between the users and the devices according to the registration information, wherein one user corresponds to multiple devices; Determining multiple service data belonging to the same user according to the corresponding relationship between the user and the device; Among the multiple service data, multiple real service data belonging to the same device are selected according to the device identification.

6. The method for optimizing response time based on statistical data according to claim 5, characterized in that: When the multiple devices belong to different users, the statistical data is stored in a cache database, and then the method further includes: Determining a user identifier corresponding to each of the multiple users according to the registration information of the multiple users; A user identifier is set in the statistical data, so that all statistical data corresponding to each user can be obtained in the cache database according to the user identifier of each user.

7. The method for optimizing response time based on statistical data according to claim 5, characterized in that: The establishing a corresponding relationship between the user and the device according to the registration information specifically includes: Preset a user registration interface so that the multiple users can register on the registration interface and obtain the registration information; Determining the service types respectively corresponding to the multiple users through the registration information of the multiple users; According to the service type corresponding to each user, a plurality of devices to be monitored of each user are determined, so as to establish a corresponding relationship between the user and the plurality of devices to be monitored.

8. A response time optimization device based on statistical data, characterized in that: The device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to: Generate corresponding real business data according to the device operation status of multiple devices, wherein the real business data includes a fault identification device identification and a timestamp, and the timestamp is used to indicate the time corresponding to the real business data; Selecting multiple real business data belonging to the same device according to the device identifier, and judging whether there is any business data missing in the multiple real business data according to timestamps respectively corresponding to the multiple real business data; If there is any missing business data among the multiple real business data, virtual business data is used to fill it, wherein the virtual business data is used to represent the average state of the operation of the device, and the virtual business data includes a virtual fault identifier, a device identifier, and a timestamp corresponding to the time when the business data is missing; According to the fault identifiers in the real business data and the virtual business data, the number of faults of all the real business data and all the virtual business data within a specified time period is summarized to obtain statistical data within the specified time period, and the statistical data is stored in a cache database, so that when a statistical data display request from a user is received, the response time of the JAVA application is optimized by directly calling the statistical data in the cache database; The summarizing the number of failures of all real business data and all virtual business data within a specified time period according to the failure identifiers in the real business data and the virtual business data to obtain statistical data within the specified time period specifically includes: According to the change of the real business data, set the statistical interval; In the statistical interval, according to the fault identifiers of the real service data and the virtual service data, the number of faults of the real service data and the virtual service data is summarized regularly to obtain sub-statistical data in multiple statistical intervals; sequentially marking the sub-statistical data under the multiple statistical intervals according to the statistical time of the sub-statistical data; The relationship between the specified time period and the statistical interval is determined, and the corresponding sub-statistical data belonging to the specified time period are superimposed to obtain the statistical data within the specified time period.

9. A non-volatile computer storage medium storing computer executable instructions, wherein the computer executable instructions are configured to: According to the equipment operation status of multiple devices, the corresponding real business data is generated, where: The real business data includes a fault identification device identifier and a timestamp, and the timestamp is used to indicate the time corresponding to the real business data; Selecting multiple real business data belonging to the same device according to the device identifier, and judging whether there is any business data missing in the multiple real business data according to timestamps respectively corresponding to the multiple real business data; If there is any missing business data among the multiple real business data, virtual business data is used to fill it, wherein the virtual business data is used to represent the average state of the operation of the device, and the virtual business data includes a virtual fault identifier, a device identifier, and a timestamp corresponding to the time when the business data is missing; According to the fault identifiers in the real business data and the virtual business data, the number of faults of all the real business data and all the virtual business data within a specified time period is summarized to obtain statistical data within the specified time period, and the statistical data is stored in a cache database, so that when a statistical data display request from a user is received, the response time of the JAVA application is optimized by directly calling the statistical data in the cache database; The summarizing the number of failures of all real business data and all virtual business data within a specified time period according to the failure identifiers in the real business data and the virtual business data to obtain statistical data within the specified time period specifically includes: According to the change of the real business data, set the statistical interval; In the statistical interval, according to the fault identifiers of the real service data and the virtual service data, the number of faults of the real service data and the virtual service data is summarized regularly to obtain sub-statistical data in multiple statistical intervals; sequentially marking the sub-statistical data under the multiple statistical intervals according to the statistical time of the sub-statistical data; The relationship between the specified time period and the statistical interval is determined, and the corresponding sub-statistical data belonging to the specified time period are superimposed to obtain the statistical data within the specified time period.

Citation Information

Patent Citations

  • Determination method and determination device of cache data

    CN104699422A

  • Data cleaning method and system based on real-time database storage and storage medium

    CN111221809A