CN112947942A - Data analysis and acquisition method and device, electronic equipment and storage medium - Google Patents

Data analysis and acquisition method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112947942A
CN112947942A CN202110357260.4A CN202110357260A CN112947942A CN 112947942 A CN112947942 A CN 112947942A CN 202110357260 A CN202110357260 A CN 202110357260A CN 112947942 A CN112947942 A CN 112947942A
Authority
CN
China
Prior art keywords
data
target data
analysis result
preset
result
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
CN202110357260.4A
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.)
Xiamen Yealink Network Technology Co Ltd
Original Assignee
Xiamen Yealink Network 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 Xiamen Yealink Network Technology Co Ltd filed Critical Xiamen Yealink Network Technology Co Ltd
Priority to CN202110357260.4A priority Critical patent/CN112947942A/en
Publication of CN112947942A publication Critical patent/CN112947942A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/42Syntactic analysis
    • G06F8/427Parsing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24552Database cache management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues

Abstract

The embodiment of the application provides a method and a device for analyzing and acquiring data, electronic equipment and a storage medium, and relates to the field of software storage. The data analysis and acquisition method comprises the following steps: responding to an application request aiming at the target data, and checking whether the target data exists in the current cache or not; if the target data does not exist, starting to analyze the target data, and returning a preset analysis result; and displaying the waiting state according to a preset analysis result. In the embodiment of the application, when target data of a target request does not exist in the cache, a preset analysis result consistent with a target data structure is returned while the analysis of the target data is started, so that the problems that in the prior art, when the target request data is analyzed and an analysis result corresponding to the request data does not exist in the cache, the analysis conversion operation is restarted by using an asynchronous thread, data can be repeatedly obtained, and the performance of equipment is wasted are solved, and the utilization rate of a memory is improved.

Description

Data analysis and acquisition method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of software storage, and in particular, to a method and an apparatus for parsing and acquiring data, an electronic device, and a storage medium.
Background
The visualization software displays the data stored in the memory, and usually needs to convert the data into the visualization data, and such conversion may not be completed in a short time in many cases, for example, the data needs to be acquired from a local record to a remote end, and the local data needs to be decompressed or transcoded before being displayed.
In order to improve user experience, in the prior art, when a service needs certain data, if a cache does not have an analysis result corresponding to the data, an asynchronous thread is started to execute a corresponding analysis conversion operation on time-consuming operation, and after the operation is completed, the result is added into the cache; when the capacity of the cache reaches the upper limit, optimizing the cache; when the original data is changed, the analysis conversion operation of the data is executed again.
However, in the prior art, if the parsing operation of a certain data takes a long time, and there is a service that needs to use the parsing result corresponding to the source data during the parsing process, since the data is still being parsed and there is no parsing result corresponding to the source data in the cache, a thread is started again to perform parsing of the data, which causes performance waste.
Disclosure of Invention
In order to solve the problems in the prior art, the application provides a data analysis and acquisition method, a data analysis and acquisition device, an electronic device and a storage medium.
A first aspect of the present application provides a method for analyzing and acquiring data, including:
responding to an application request aiming at target data, and checking whether the target data exists in a current cache or not;
if the target data does not exist, starting to analyze the target data, and returning a preset analysis result, wherein the preset analysis result is consistent with the actual analysis result structure of the target data;
and displaying a waiting state according to the preset analysis result.
Optionally, after displaying the waiting status according to the preset parsing result, the method further includes:
after the target data is analyzed, acquiring an actual analysis result of the target data;
determining whether the current cache contains result data corresponding to the target data or the preset analysis result;
if the current cache contains result data corresponding to the target data or the preset analysis result, replacing the result data corresponding to the target data or the preset analysis result in the current cache with the actual analysis result;
and acquiring a reapplication request, and returning and displaying the actual analysis result according to the reapplication request.
Optionally, the method further comprises:
if the capacity of the current cache reaches a preset threshold, deleting cache data which is used in the current cache and is the lowest possible, wherein the cache data which is used the lowest possible comprises: the data that is the longest from the current access time, or the data with the lowest access frequency.
Optionally, after determining whether the current cache includes result data corresponding to the target data or the preset parsing result, the method further includes:
and if no result data corresponding to the target data or the preset analysis result exists in the current cache, discarding the actual analysis result.
Optionally, the target data comprises a plurality of data elements;
after the starting and analyzing the target data, the method further comprises:
analyzing the data elements with the highest priority in the data elements, and acquiring the analysis result of the data elements with the highest priority;
and returning and displaying the analysis result of the data element with the highest priority.
Optionally, after returning and displaying the parsing result of the data element with the highest priority, the method further includes:
detecting the current display state of the target data;
and if the target data is in a display state, continuing to analyze the data elements of the next priority, otherwise, stopping analyzing the target data.
Optionally, after stopping parsing the target data, the method further includes:
if the target data is restored to the display state, determining whether analyzed data elements in the target data exist in the current cache or not;
if the data elements exist, returning and displaying the analyzed data elements, and starting to analyze the data elements of the next priority.
A second aspect of the present application provides an apparatus for analyzing and acquiring data, including: the device comprises a query unit, an analysis unit and a display unit;
the query unit is used for responding to an application request aiming at target data and checking whether the target data exists in the current cache or not;
the analysis unit is used for starting to analyze the target data and returning a preset analysis result if the target data does not exist, wherein the preset analysis result is consistent with the actual analysis result structure of the target data;
and the display unit is used for displaying a waiting state according to the preset analysis result.
Optionally, the apparatus further comprises: an acquisition unit, a confirmation unit and a replacement unit;
the acquisition unit is used for acquiring an actual analysis result of the target data after the target data is analyzed;
the confirming unit is used for confirming whether the current cache contains result data corresponding to the target data or the preset analysis result;
the replacing unit is configured to replace, if the current cache includes result data corresponding to the target data or the preset analysis result, the result data corresponding to the target data or the preset analysis result in the current cache with the actual analysis result;
and the display unit is used for acquiring the reapplication request, returning and displaying the actual analysis result according to the reapplication request.
Optionally, the apparatus further comprises: a deletion unit;
the deleting unit is configured to delete the cache data that is used the lowest possible time in the current cache if the capacity of the current cache reaches a preset threshold, where the cache data that is used the lowest possible time includes: the data that is the longest from the current access time, or the data with the lowest access frequency.
Optionally, the apparatus further comprises: a discarding unit;
the discarding unit is configured to discard the actual analysis result if no result data corresponding to the target data or the preset analysis result exists in the current cache.
Optionally, the target data comprises a plurality of data elements;
after the target data is started to be analyzed, the obtaining unit is used for analyzing the data element with the highest priority in the data elements and obtaining the analysis result of the data element with the highest priority;
and the display unit is used for returning and displaying the analysis result of the data element with the highest priority.
Optionally, the apparatus further comprises: a detection unit;
the detection unit is used for detecting the current display state of the target data;
and the analysis unit is used for continuously analyzing the data elements of the next priority level if the target data is in a display state, and otherwise, stopping analyzing the target data.
Optionally, the determining unit is configured to determine whether an analyzed data element in the target data exists in a current cache if the target data resumes the display state;
and the display unit is used for returning and displaying the analyzed data elements and starting to analyze the data elements of the next priority if the data elements exist.
A third aspect of the present application provides an electronic device comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is operated, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to perform the steps of the method according to the first aspect.
A fourth aspect of the present application provides a storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method according to the first aspect.
In a method, an apparatus, an electronic device, and a storage medium for analyzing and acquiring data provided in an embodiment of the present application, the method for analyzing and acquiring data includes: responding to an application request aiming at target data, and checking whether the target data exists in a current cache or not; if the target data does not exist, starting to analyze the target data, and returning a preset analysis result, wherein the preset analysis result is consistent with the actual analysis result structure of the target data; and displaying a waiting state according to the preset analysis result. In the embodiment of the application, when target data of a target request does not exist in the cache, a preset analysis result consistent with a target data structure is returned while the analysis of the target data is started, so that the problems that in the prior art, when the target request data is analyzed and an analysis result corresponding to the request data does not exist in the cache, the analysis conversion operation is restarted by using an asynchronous thread, data can be repeatedly obtained, and the performance of equipment is wasted are solved, and the utilization rate of a memory is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a schematic flow chart of a data parsing and acquiring method according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a data parsing and acquiring method according to another embodiment of the present application;
fig. 3 is a schematic flowchart of a data parsing and acquiring method according to another embodiment of the present application;
fig. 4 is a schematic flowchart of a data parsing and acquiring method according to another embodiment of the present application;
fig. 5 is a schematic flowchart of a data parsing and acquiring method according to another embodiment of the present application;
fig. 6 is a schematic diagram of an apparatus for analyzing and acquiring data according to an embodiment of the present application;
fig. 7 is a schematic diagram of an apparatus for parsing and acquiring data according to another embodiment of the present application;
fig. 8 is a schematic diagram of an apparatus for parsing and acquiring data according to another embodiment of the present application;
fig. 9 is a schematic diagram of an apparatus for parsing and acquiring data according to another embodiment of the present application;
fig. 10 is a schematic diagram of an apparatus for parsing and acquiring data according to another embodiment of the present application;
fig. 11 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, 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 should be understood that the drawings in the present application are for illustrative and descriptive purposes only and are not used to limit the scope of protection of the present application. Additionally, it should be understood that the schematic drawings are not necessarily drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of the present application. It should be understood that the operations of the flow diagrams may be performed out of order, and steps without logical context may be performed in reverse order or simultaneously. One skilled in the art, under the guidance of this application, may add one or more other operations to, or remove one or more operations from, the flowchart.
In addition, the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that in the embodiments of the present application, the term "comprising" is used to indicate the presence of the features stated hereinafter, but does not exclude the addition of further features.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
Furthermore, the terms "first," "second," and the like in the description and in the claims, as well as in the drawings, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that the features of the embodiments of the present application may be combined with each other without conflict.
The visualization software displays the data stored in the memory, and usually needs to convert the data into the visualization data, and such conversion may not be completed in a short time in many cases, for example, the data needs to be acquired from a local record to a remote end, and the local data needs to be decompressed or transcoded before being displayed. In order to improve user experience, in the prior art, when a service needs certain data, if a cache does not have an analysis result corresponding to the data, an asynchronous thread is started to execute a corresponding analysis conversion operation on time-consuming operation, and after the operation is completed, the result is added into the cache; when the capacity of the cache reaches the upper limit, optimizing the cache; when the original data is changed, the analysis conversion operation of the data is executed again. However, in the prior art, if the parsing operation of a certain data takes a long time, and there is a service that needs to use the parsing result corresponding to the source data during the parsing process, since the data is still being parsed and there is no parsing result corresponding to the source data in the cache, a thread is started again to perform parsing of the data, which causes performance waste.
In order to solve the technical problems in the prior art, the present application provides an inventive concept: when target data of a target request does not exist in the cache, a preset analysis result consistent with a target data structure is returned while the analysis of the target data is started, so that the problems that in the prior art, when the target request data is analyzed and an analysis result corresponding to the request data does not exist in the cache, the analysis conversion operation is restarted by using an asynchronous thread, the data can be repeatedly obtained, the performance of equipment is wasted, and the utilization rate of the memory is improved.
The following describes a specific technical solution provided by the present application through possible implementation manners.
Fig. 1 is a schematic flowchart of a data parsing and acquiring method according to an embodiment of the present application, where an execution subject of the method may be a computer, a server, or other equipment with a processing function. As shown in fig. 1, the method includes:
s101, responding to an application request aiming at the target data, and checking whether the target data exists in the current cache or not.
Optionally, in this embodiment of the application, the target data may include data stored in a cloud server and data stored in a local server. In addition, the target data may specifically include: text, audio, video, pictures, and the like.
When an application request of target data is acquired, whether the target data exists in the cache of the current equipment can be judged by searching a cache data list in the current equipment.
In addition, the storage rule of the cache table in the cache is generally stored in such a manner that the key value corresponds to the cache value. Illustratively, one Key value (Key) corresponds to one cache value (Data struct), and when three pieces of cache Data exist in the cache table, the storage mode can be represented as Key 1-Data struct 1, Key 2-Data struct 2, and Key 3-Data struct 3.
And S102, if the target data do not exist, starting to analyze the target data, and returning a preset analysis result.
When the target data does not exist in the current cache, the target data can be analyzed by using the analysis unit, and a preset analysis result is returned.
The preset analysis result may be data that is configured in advance and has a structure consistent with an actual analysis result of the target data. In addition, it should be noted that the preset analysis result is a transition result between the target data and the actual analysis result, and is not the final actual analysis result.
And S103, displaying a waiting state according to a preset analysis result.
In one implementation, when a preset analysis result is returned, a waiting state is displayed according to the preset analysis result until the target data analysis is completed.
In the data analysis and acquisition method provided by the embodiment of the application, whether the target data exists in the current cache or not is checked in response to an application request for the target data; if the target data does not exist, starting to analyze the target data, and returning a preset analysis result, wherein the preset analysis result is consistent with the actual analysis result structure of the target data; and displaying a waiting state according to the preset analysis result. In the embodiment of the application, when target data of a target request does not exist in the cache, a preset analysis result consistent with a target data structure is returned while the analysis of the target data is started, so that the problems that in the prior art, when the target request data is analyzed and an analysis result corresponding to the request data does not exist in the cache, the analysis conversion operation is restarted by using an asynchronous thread, data can be repeatedly obtained, and the performance of equipment is wasted are solved, and the utilization rate of a memory is improved.
Fig. 2 is a schematic flow chart of a data analysis obtaining method according to another embodiment of the present application, and as shown in fig. 2, after displaying a waiting state according to the preset analysis result, the method further includes:
s201, after the target data is analyzed, acquiring an actual analysis result of the target data.
S202, whether the current cache contains result data or preset analysis results corresponding to the target data is determined.
And S203, if the current cache contains result data or a preset analysis result corresponding to the target data, replacing the result data or the preset analysis result corresponding to the target data in the current cache with an actual analysis result.
And S204, acquiring the reapplication request, and returning and displaying the actual analysis result according to the reapplication request.
In the embodiment of the application, after the actual analysis result corresponding to the target data is obtained, in order to avoid interference of the preset analysis result on the actual analysis result and repeated storage of the target data analysis result, the preset analysis result may be replaced by the actual analysis result, so that the actual analysis result is displayed conveniently.
In one implementation, after the target data is analyzed, an actual analysis result of the target data is obtained, and whether result data corresponding to the target data or a preset analysis result exists in the current cache is judged according to a key value in a cache table.
When the current cache includes the result data corresponding to the target data or the preset analysis result, and optionally when a repeated key value exists in the cache table, it is indicated that the current cache includes the result data corresponding to the target data or the preset analysis result, and the result data corresponding to the target data or the preset analysis result in the current cache may be replaced with the actual analysis result.
Further, in this embodiment of the application, when the actual analysis result is obtained, the device may be in a display state of other content, and when the actual analysis result needs to be displayed, the device may send an application request to the target data again, and the device returns and displays the actual analysis result according to the reapplication request.
Optionally, after determining whether the current cache includes result data corresponding to the target data or a preset parsing result, the method further includes: and if no result data or preset analysis result corresponding to the target data exists in the current cache, discarding the actual analysis result.
It can be understood that, in the embodiment of the present application, by determining whether result data corresponding to the target data or a preset parsing result exists in the current cache, if not, the actual parsing result is discarded, thereby avoiding resource waste.
In an implementation manner, in order to enable other service flows of the device to operate normally and avoid a large amount of memory consumption, in this embodiment of the present application, a buffer capacity threshold (preset threshold) may also be set, which is specifically implemented as the following embodiments.
Optionally, the method further comprises: and if the capacity of the current cache reaches a preset threshold value, deleting the cache data which is used in the current cache and is the lowest possible.
Wherein using the lowest possible cached data comprises: the data that is the longest from the current access time, or the data with the lowest access frequency.
In this embodiment of the present application, when the capacity of the cache reaches a preset threshold, the data that is in the current cache and is farthest from the current access time, or the data with the lowest access frequency may be deleted.
For example, the preset threshold may be set to 50, in one implementation, when the capacity of the buffer reaches the preset threshold, that is, when the number of the buffered data reaches 51, the buffered 1 st data may be deleted, and when the number of the buffered data reaches 52, the first 2 buffered data may be deleted. In another implementation manner, when the capacity of the cache reaches a preset threshold, the access frequency of each piece of cache data in the data caching process may be obtained. And deleting the data with the lowest access frequency.
It can be understood that, in the embodiment of the present application, by setting the preset threshold of the cache capacity, when the preset threshold is reached, the data with the lowest possible usage is deleted, thereby avoiding the waste of the performance caused by the useless data, and improving the utilization rate of the device cache.
In order to improve the use experience of the user and avoid that the device is in a state of waiting for display (blank) for a long time after the user acquires the target data, in the embodiment of the present application, the target data may also be analyzed and acquired step by setting the priority of data analysis, which is specifically the following embodiment.
Fig. 3 is a schematic flowchart of a data parsing and acquiring method according to another embodiment of the present application, where as shown in fig. 3, target data includes a plurality of data elements; after the analysis of the target data is started, the method further comprises the following steps:
s301, analyzing the data element with the highest priority in the data elements, and obtaining the analysis result of the data element with the highest priority.
And S302, returning and displaying the analysis result of the data element with the highest priority.
It should be noted that different types of data elements may be configured with priorities in advance, and after the application request is obtained, in the embodiment of the present application, the data element with a high priority may be preferentially analyzed, and an analysis result of the data element with a high priority may be preferentially displayed.
For example, one target data includes: text, picture, audio, video. The priority of the data elements can be arranged according to the difficulty level of the analysis of characters, pictures, videos and audios. Illustratively, the priority of the data elements may be set from large to small as: text, picture, audio, video. In another possible implementation, the priority ranking may also be based on the size of the data elements. For example, the larger the file, the lower the priority, the smaller the file, and the higher the priority may be set, which is not particularly limited herein.
It can be understood that, in the embodiment of the present application, by setting the priority of data element parsing, the data element parsed first may be displayed, for example, characters are displayed first, and then a video is displayed after the picture is parsed. The problem that long-time display waiting exists when the analysis unit begins to analyze the data according to the data element arrangement sequence when the target data has both the video and the characters is solved, and the use experience of a user is improved.
Fig. 4 is a schematic flowchart of a data parsing and acquiring method according to another embodiment of the present application, and as shown in fig. 4, after returning and displaying a parsing result of a data element with a highest priority, the method further includes:
s401, detecting the current display state of the target data.
S402, if the target data is in a display state, continuing to analyze the data elements of the next priority, otherwise, stopping analyzing the target data.
In the embodiment of the application, the display state of the target data can be detected, when the target data is in the display state, the data elements of the next priority are analyzed continuously through the analysis unit, and otherwise, the analysis of the target data is stopped. For example, in some scenarios, the target data is not analyzed completely, but the user has requested to view other data, that is, does not have a need to continue to view the target data, like that one target data contains characters and pictures, after the characters are analyzed and displayed, it is detected that the user does not continue to view the target data, and if the target data is not in the display state, the picture does not need to be analyzed again, so as to save resources.
Fig. 5 is a schematic flow chart of a data analysis obtaining method according to another embodiment of the present application, and as shown in fig. 5, after the analysis of the target data is stopped, the method further includes:
s501, if the target data is restored to the display state, whether analyzed data elements in the target data exist in the current cache or not is confirmed.
And S502, if the data elements exist, returning and displaying the analyzed data elements, and starting to analyze the data elements of the next priority.
Optionally, on the basis of the above embodiment, if the target data resumes the display state, indicating that the user may need to request the target data again, it is determined whether the current cache has the parsed data elements in the target data.
And if the analyzed element of the target data exists in the current cache, returning and displaying the analyzed data element, and starting to analyze the data element of the next priority.
And if the analyzed element of the target data does not exist in the current cache, the target data is restarted to be analyzed by utilizing the analysis unit.
The following describes apparatuses, storage media, and the like corresponding to the method for analyzing and acquiring data provided by the present application, and specific implementation processes and technical effects thereof are referred to above, and will not be described again below.
Fig. 6 is a schematic diagram of an apparatus for parsing and acquiring data according to an embodiment of the present application, and as shown in fig. 6, the apparatus may include: an inquiry unit 601, an analysis unit 602, and a display unit 603;
a query unit 601, configured to respond to an application request for target data, and check whether target data exists in a current cache;
the analysis unit 602 is configured to start analyzing the target data and return a preset analysis result if the target data does not exist, where the preset analysis result is consistent with an actual analysis result structure of the target data;
the display unit 603 is configured to display the waiting status according to a preset parsing result.
Fig. 7 is a schematic diagram of an apparatus for parsing and acquiring data according to another embodiment of the present application, as shown in fig. 7, the apparatus may further include: an acquisition unit 604, a confirmation unit 605, and a replacement unit 606;
an obtaining unit 604, configured to obtain an actual analysis result of the target data after the target data is analyzed;
a determining unit 605, configured to determine whether the current cache includes result data corresponding to the target data or a preset parsing result;
a replacing unit 606, configured to replace, if the current cache includes result data corresponding to the target data or a preset analysis result, the result data corresponding to the target data or the preset analysis result in the current cache with an actual analysis result;
the display unit 603 is configured to obtain the reapplication request, and return and display an actual analysis result according to the reapplication request.
Fig. 8 is a schematic diagram of an apparatus for parsing and acquiring data according to an embodiment of the present application, and as shown in fig. 8, the apparatus further includes: a deletion unit 607;
a deleting unit 607, configured to delete the cache data that is used in the current cache and is the lowest possible if the capacity of the current cache reaches a preset threshold, where the using the cache data that is the lowest possible includes: the data that is the longest from the current access time, or the data with the lowest access frequency.
Fig. 9 is a schematic diagram of an apparatus for parsing and acquiring data according to an embodiment of the present application, and as shown in fig. 9, the apparatus further includes: a discarding unit 608;
the discarding unit 608 is configured to discard the actual analysis result if no result data or a preset analysis result corresponding to the target data exists in the current cache.
Optionally, the target data comprises a plurality of data elements; after the analysis of the target data is started, the obtaining unit 604 is configured to analyze the data element with the highest priority in the data elements, and obtain an analysis result of the data element with the highest priority;
a display unit 603, configured to return and display an analysis result of the data element with the highest priority.
Fig. 10 is a schematic diagram of an apparatus for parsing and acquiring data according to an embodiment of the present application, and as shown in fig. 10, the apparatus further includes: a detection unit 609;
the detecting unit 609 is configured to detect a current display state of the target data;
the parsing unit 602 is configured to continue parsing the data element of the next priority if the target data is in a display state, and otherwise, stop parsing the target data.
Optionally, the determining unit 605 is configured to determine whether an analyzed data element in the target data exists in the current cache if the target data resumes the display state;
and a display unit 603, configured to return and display the parsed data elements, and start parsing the data elements of the next priority, if the data elements exist.
Fig. 11 is a schematic structural diagram of an electronic device according to an embodiment of the present application, including: a processor 710, a storage medium 720 and a bus 730, wherein the storage medium 720 stores machine-readable instructions executable by the processor 710, when the electronic device is operated, the processor 710 communicates with the storage medium 720 through the bus 730, and the processor 710 executes the machine-readable instructions to perform the steps of the above-mentioned method embodiments. The specific implementation and technical effects are similar, and are not described herein again.
The embodiment of the application provides a storage medium, wherein a computer program is stored on the storage medium, and the computer program is executed by a processor to execute the method.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into 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 through some interfaces, devices or units, and may be in an electrical, mechanical 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 be distributed on a plurality of network units. 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 form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to perform some steps of the methods according to the embodiments of the present application. And the aforementioned storage medium includes: a U disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A method for analyzing and acquiring data is characterized by comprising the following steps:
responding to an application request aiming at target data, and checking whether the target data exists in a current cache or not;
if the target data does not exist, starting to analyze the target data, and returning a preset analysis result, wherein the preset analysis result is consistent with the actual analysis result structure of the target data;
and displaying a waiting state according to the preset analysis result.
2. The method according to claim 1, wherein after displaying the waiting status according to the preset parsing result, the method further comprises:
after the target data is analyzed, acquiring an actual analysis result of the target data;
determining whether the current cache contains result data corresponding to the target data or the preset analysis result;
if the current cache contains result data corresponding to the target data or the preset analysis result, replacing the result data corresponding to the target data or the preset analysis result in the current cache with the actual analysis result;
and acquiring a reapplication request, and returning and displaying the actual analysis result according to the reapplication request.
3. The method of claim 2, further comprising:
if the capacity of the current cache reaches a preset threshold, deleting cache data which is used in the current cache and is the lowest possible, wherein the cache data which is used the lowest possible comprises: the data that is the longest from the current access time, or the data with the lowest access frequency.
4. The method according to claim 2 or 3, wherein after the determining whether the current cache includes the result data corresponding to the target data or the preset parsing result, the method further comprises:
and if no result data corresponding to the target data or the preset analysis result exists in the current cache, discarding the actual analysis result.
5. The method of claim 1, wherein the target data comprises a plurality of data elements;
after the starting and analyzing the target data, the method further comprises:
analyzing the data elements with the highest priority in the data elements, and acquiring the analysis result of the data elements with the highest priority;
and returning and displaying the analysis result of the data element with the highest priority.
6. The method of claim 5, wherein after returning and displaying the resolution result of the highest priority data element, further comprising:
detecting the current display state of the target data;
and if the target data is in a display state, continuing to analyze the data elements of the next priority, otherwise, stopping analyzing the target data.
7. The method of claim 6, wherein after stopping parsing the target data, further comprising:
if the target data is restored to the display state, determining whether analyzed data elements in the target data exist in the current cache or not;
if the data elements exist, returning and displaying the analyzed data elements, and starting to analyze the data elements of the next priority.
8. An apparatus for analyzing and acquiring data, comprising: the device comprises a query unit, an analysis unit and a display unit;
the query unit is used for responding to an application request aiming at target data and checking whether the target data exists in the current cache or not;
the analysis unit is used for starting to analyze the target data and returning a preset analysis result if the target data does not exist, wherein the preset analysis result is consistent with the actual analysis result structure of the target data;
and the display unit is used for displaying a waiting state according to the preset analysis result.
9. An electronic device, comprising: a processor, a storage medium and a bus, the storage medium storing machine-readable instructions executable by the processor, the processor and the storage medium communicating via the bus when the electronic device is operating, the processor executing the machine-readable instructions to perform the steps of the method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that the storage medium has stored thereon a computer program which, when being executed by a processor, carries out the steps of the method according to any one of claims 1-7.
CN202110357260.4A 2021-04-01 2021-04-01 Data analysis and acquisition method and device, electronic equipment and storage medium Pending CN112947942A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110357260.4A CN112947942A (en) 2021-04-01 2021-04-01 Data analysis and acquisition method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110357260.4A CN112947942A (en) 2021-04-01 2021-04-01 Data analysis and acquisition method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112947942A true CN112947942A (en) 2021-06-11

Family

ID=76232084

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110357260.4A Pending CN112947942A (en) 2021-04-01 2021-04-01 Data analysis and acquisition method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112947942A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109582899A (en) * 2018-10-26 2019-04-05 平安科技(深圳)有限公司 Page loading method, device, computer equipment and storage medium
WO2019141134A1 (en) * 2018-01-19 2019-07-25 阿里巴巴集团控股有限公司 Data query method, apparatus and device
CN112035529A (en) * 2020-09-11 2020-12-04 北京字跳网络技术有限公司 Caching method and device, electronic equipment and computer readable storage medium
CN112579229A (en) * 2020-12-01 2021-03-30 贝壳技术有限公司 Page data processing method and device in application

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019141134A1 (en) * 2018-01-19 2019-07-25 阿里巴巴集团控股有限公司 Data query method, apparatus and device
CN109582899A (en) * 2018-10-26 2019-04-05 平安科技(深圳)有限公司 Page loading method, device, computer equipment and storage medium
CN112035529A (en) * 2020-09-11 2020-12-04 北京字跳网络技术有限公司 Caching method and device, electronic equipment and computer readable storage medium
CN112579229A (en) * 2020-12-01 2021-03-30 贝壳技术有限公司 Page data processing method and device in application

Similar Documents

Publication Publication Date Title
US20150331882A1 (en) Redundant file deletion method, apparatus and storage medium
CN105787077B (en) Data synchronization method and device
CN106936441B (en) Data compression method and device
KR101472397B1 (en) Mobile terminal and method for processing notification information
CN108090079B (en) Chat record processing method and device of instant chat tool
US9104582B1 (en) Optimized data storage
US20220206994A1 (en) Method and Apparatus for Generating Multimedia File
CN110851209B (en) Data processing method and device, electronic equipment and storage medium
CN108984553B (en) Caching method and device
CN108600779B (en) Target object operation method and device based on video content
CN107357794B (en) Method and device for optimizing data storage structure of key value database
US8359359B2 (en) Device, method, and computer program product for supporting creation of reply mail
US10402370B2 (en) Information processing method and electronic apparatus
CN111026331A (en) Request response method, device, equipment and computer readable storage medium
CN109218799B (en) Method, storage medium, device and system for quickly switching high-definition images of android television
CN106557529B (en) Display method and device for jump page in page jump
CN112947942A (en) Data analysis and acquisition method and device, electronic equipment and storage medium
CN107480269B (en) Object display method and system, medium and computing equipment
CN106302821B (en) Data request method and equipment thereof
CN113805864A (en) Project engineering generation method and device, electronic equipment and storage medium
CN113656731A (en) Advertisement page processing method and device, electronic equipment and storage medium
CN111144077B (en) View information deleting method, device, equipment and computer readable storage medium
US20130019181A1 (en) Ensuring variety in a feed
JPWO2013190607A1 (en) Screen information collection computer, screen information collection method, and computer-readable storage medium
CN111061744B (en) Graph data updating method and device, computer equipment 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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210611