CN117896440B - Data caching acquisition method and system - Google Patents

Data caching acquisition method and system Download PDF

Info

Publication number
CN117896440B
CN117896440B CN202410295239.XA CN202410295239A CN117896440B CN 117896440 B CN117896440 B CN 117896440B CN 202410295239 A CN202410295239 A CN 202410295239A CN 117896440 B CN117896440 B CN 117896440B
Authority
CN
China
Prior art keywords
data
dictionary
real time
preset
target
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.)
Active
Application number
CN202410295239.XA
Other languages
Chinese (zh)
Other versions
CN117896440A (en
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.)
Jiangxi Mandala Software Co ltd
Original Assignee
Jiangxi Mandala Software 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 Jiangxi Mandala Software Co ltd filed Critical Jiangxi Mandala Software Co ltd
Priority to CN202410295239.XA priority Critical patent/CN117896440B/en
Publication of CN117896440A publication Critical patent/CN117896440A/en
Application granted granted Critical
Publication of CN117896440B publication Critical patent/CN117896440B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a data cache acquisition method and a system, wherein the method comprises the following steps: when the source client is detected to be started in real time, storing a preset data dictionary into a preset memory in real time based on a preset rule; receiving a data request protocol issued by a source client in real time, and analyzing the data request protocol to correspondingly detect a protocol header contained in the data request protocol; and extracting the data identifier contained in the protocol header in real time, and calling out the corresponding caching strategy according to the data identifier so as to send the corresponding target data to the source client according to the caching strategy. The invention can effectively avoid the phenomena of network queuing and service shop queuing, and correspondingly improves the use experience of users.

Description

Data caching acquisition method and system
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method and a system for acquiring a data cache.
Background
Along with the progress of science and technology and the rapid development of productivity, computer and internet technologies have been popularized in people's daily life, and simultaneously, the work efficiency of people is improved, and great convenience is brought to people's life.
The existing computer applies a data caching technology in the using process, namely, data needed by a user are temporarily stored in a memory, so that the extraction efficiency of the data is correspondingly improved.
However, in the practical application process, when the number of source clients used by the user is large, the number of instructions from the synchronous request to the server is also large, so that the pressure of network transmission is correspondingly increased, and when the concurrency number of data is large, the phenomena of network queuing and server queuing can easily occur, so that the use efficiency of the user is influenced, and meanwhile, the use experience of the user is reduced.
Disclosure of Invention
Based on the above, the invention aims to provide a data caching acquisition method and system, so as to solve the problem that network queuing and server queuing are easy to occur when the concurrency number of data is large in the prior art.
The first aspect of the embodiment of the invention provides:
A data cache acquisition method, wherein the method comprises:
when the source client is detected to be started in real time, storing a preset data dictionary into a preset memory in real time based on a preset rule;
Receiving a data request protocol issued by a source client in real time, and analyzing the data request protocol to correspondingly detect a protocol header contained in the data request protocol;
And extracting the data identifier contained in the protocol header in real time, and calling out a corresponding caching strategy according to the data identifier so as to send corresponding target data to the source client according to the caching strategy.
The beneficial effects of the invention are as follows: whether the source client is started or not is detected in real time, if yes, various preset dictionaries are stored in preset memories correspondingly, meanwhile, a data request protocol issued by the current source client can be further received, corresponding analysis processing is conducted on the basis of the data request protocol to obtain a corresponding protocol header, a caching strategy matched with the current source client can be called out immediately according to a data identifier contained in the protocol header, on the basis, needed target data of the source client can be sent to the source client in real time according to the current caching strategy, and therefore the caching strategy matched with the source client can be used when the data request quantity is too large or too small, network queuing and server queuing can be effectively avoided, and user experience is correspondingly improved.
Further, the step of storing the preset data dictionary into the preset memory in real time based on the preset rule includes:
When the source client is detected to be started in real time, detecting a target category corresponding to the source client in real time, and calling out the preset data dictionary in a preset dictionary database according to the target category;
adding a corresponding classification identifier to the preset data dictionary, and setting loading time and expiration time corresponding to the preset data dictionary according to the classification identifier;
and storing the preset data dictionary into the preset memory in real time according to a preset format based on the loading time and the expiration time, wherein the classification identifier is unique.
Further, the step of storing the preset data dictionary in the preset memory in real time according to a preset format based on the loading time and the expiration time includes:
after the loading time and the failure time are obtained in real time, sequentially constructing mapping relations among the classification identifiers, the preset data dictionary, the loading time and the failure time, wherein the mapping relations have uniqueness;
sorting the preset data dictionaries according to the size of the classification identifiers to generate corresponding target sequences, and generating corresponding dictionary storage tables according to the target sequences and the mapping relations;
And storing the dictionary storage table into the preset memory in real time, wherein the target sequence has uniqueness.
Further, the step of calling out the corresponding caching policy according to the data identifier to send the corresponding target data to the source client according to the caching policy includes:
When the data identifier is obtained in real time, detecting a target dictionary corresponding to the data identifier in real time, and detecting the dictionary type of the target dictionary in real time;
judging whether the target dictionary is invalid at the current moment in real time according to the dictionary type;
If the target dictionary is judged to be not invalid at the current moment in real time according to the dictionary type, whether the number of the data acquisition addresses carried in the data request protocol is larger than a preset number threshold value or not is detected in real time;
If the number of the data acquisition addresses carried in the data request protocol is detected to be smaller than the preset number threshold in real time, the cache data in the target dictionary are directly returned to the source client, and the dictionary types comprise regions, sexes and medicines.
Further, the method further comprises:
If the number of the data acquisition addresses carried in the data request protocol is detected to be larger than the preset number threshold in real time, detecting data connection information corresponding to the data acquisition addresses in real time, and matching a target client corresponding to the data connection information in real time;
And feeding the data connection information back to the source client, and constructing communication connection between the source client and the target client in real time so that the source client acquires corresponding target data from the target client.
Further, the method further comprises:
if the target dictionary is judged to be invalid at the current moment in real time according to the dictionary type, acquiring a similar dictionary corresponding to the target dictionary in real time, and updating the loading time and the invalid time of the similar dictionary in real time;
and feeding back the real-time updated similar dictionary to the source client, wherein the similarity between the similar dictionary and the target dictionary is more than 90%.
Further, the method further comprises:
when the source client receives the target data, starting timing, and compressing the target data in the source client after a preset time threshold value is passed, so as to correspondingly reduce the storage space of the target data.
A second aspect of an embodiment of the present invention proposes:
a data cache acquisition system, wherein the system comprises:
The storage module is used for storing the preset data dictionary into the preset memory in real time based on the preset rule when the source client is detected to be started in real time;
The analysis module is used for receiving the data request protocol issued by the source client in real time, and analyzing the data request protocol so as to correspondingly detect a protocol header contained in the data request protocol;
and the extraction module is used for extracting the data identifier contained in the protocol header in real time, calling out a corresponding caching strategy according to the data identifier, and sending corresponding target data to the source client according to the caching strategy.
Further, the storage module is specifically configured to:
When the source client is detected to be started in real time, detecting a target category corresponding to the source client in real time, and calling out the preset data dictionary in a preset dictionary database according to the target category;
adding a corresponding classification identifier to the preset data dictionary, and setting loading time and expiration time corresponding to the preset data dictionary according to the classification identifier;
and storing the preset data dictionary into the preset memory in real time according to a preset format based on the loading time and the expiration time, wherein the classification identifier is unique.
Further, the storage module is specifically configured to:
after the loading time and the failure time are obtained in real time, sequentially constructing mapping relations among the classification identifiers, the preset data dictionary, the loading time and the failure time, wherein the mapping relations have uniqueness;
sorting the preset data dictionaries according to the size of the classification identifiers to generate corresponding target sequences, and generating corresponding dictionary storage tables according to the target sequences and the mapping relations;
And storing the dictionary storage table into the preset memory in real time, wherein the target sequence has uniqueness.
Further, the extraction module is specifically configured to:
When the data identifier is obtained in real time, detecting a target dictionary corresponding to the data identifier in real time, and detecting the dictionary type of the target dictionary in real time;
judging whether the target dictionary is invalid at the current moment in real time according to the dictionary type;
If the target dictionary is judged to be not invalid at the current moment in real time according to the dictionary type, whether the number of the data acquisition addresses carried in the data request protocol is larger than a preset number threshold value or not is detected in real time;
If the number of the data acquisition addresses carried in the data request protocol is detected to be smaller than the preset number threshold in real time, the cache data in the target dictionary are directly returned to the source client, and the dictionary types comprise regions, sexes and medicines.
Further, the data cache obtaining system further includes a first processing module, where the first processing module is specifically configured to:
If the number of the data acquisition addresses carried in the data request protocol is detected to be larger than the preset number threshold in real time, detecting data connection information corresponding to the data acquisition addresses in real time, and matching a target client corresponding to the data connection information in real time;
And feeding the data connection information back to the source client, and constructing communication connection between the source client and the target client in real time so that the source client acquires corresponding target data from the target client.
Further, the data cache obtaining system further includes a second processing module, where the second processing module is specifically configured to:
if the target dictionary is judged to be invalid at the current moment in real time according to the dictionary type, acquiring a similar dictionary corresponding to the target dictionary in real time, and updating the loading time and the invalid time of the similar dictionary in real time;
and feeding back the real-time updated similar dictionary to the source client, wherein the similarity between the similar dictionary and the target dictionary is more than 90%.
Further, the data cache acquisition system further includes a compression module, where the compression module is specifically configured to:
when the source client receives the target data, starting timing, and compressing the target data in the source client after a preset time threshold value is passed, so as to correspondingly reduce the storage space of the target data.
A third aspect of an embodiment of the present invention proposes:
A computer comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the data cache retrieval method as described above when the computer program is executed by the processor.
A fourth aspect of the embodiment of the present invention proposes:
A readable storage medium having stored thereon a computer program, wherein the program when executed by a processor implements the data cache acquisition method as described above.
Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
Drawings
FIG. 1 is a flowchart of a data cache acquiring method according to a first embodiment of the present invention;
fig. 2 is a block diagram of a data cache acquiring system according to a sixth embodiment of the present invention.
The invention will be further described in the following detailed description in conjunction with the above-described figures.
Detailed Description
In order that the invention may be readily understood, a more complete description of the invention will be rendered by reference to the appended drawings. Several embodiments of the invention are presented in the figures. This invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
It will be understood that when an element is referred to as being "mounted" on another element, it can be directly on the other element or intervening elements may also be present. When an element is referred to as being "connected" to another element, it can be directly connected to the other element or intervening elements may also be present. The terms "vertical," "horizontal," "left," "right," and the like are used herein for illustrative purposes only.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and/or" as used herein includes any and all combinations of one or more of the associated listed items.
Referring to fig. 1, a data cache obtaining method according to a first embodiment of the present invention is shown, where the data cache obtaining method according to the present embodiment can use a cache policy adapted to the data request when the data request is too large or too small, so as to effectively avoid the occurrence of network queuing and server queuing, and correspondingly improve the use experience of a user.
Specifically, the present embodiment provides:
the data cache acquisition method specifically comprises the following steps:
Step S10, when the starting of the source client is detected in real time, storing a preset data dictionary into a preset memory in real time based on a preset rule;
step S20, receiving a data request protocol issued by a source client in real time, and analyzing the data request protocol to correspondingly detect a protocol header contained in the data request protocol;
step S30, extracting the data identifier contained in the protocol header in real time, and calling out a corresponding caching strategy according to the data identifier so as to send corresponding target data to the source client according to the caching strategy.
In particular, in this embodiment, it should be noted first that, in order to simultaneously satisfy the use requirements of different users, that is, to simultaneously satisfy a small amount of data cache, a medium amount of data cache and a large amount of data cache, after a server disposed in the background detects in real time that a user has enabled a source client, the data cache acquisition method is immediately enabled. Specifically, the server immediately stores the existing data dictionary into a preset memory in real time according to a preset rule in the server, so that the server is convenient for subsequent use. Wherein the plurality of data dictionaries comprise a regional dictionary, a gender dictionary and a medicine dictionary.
Further, in order to meet the use requirement of the user in real time, the data request protocol issued by the source client needs to be received in real time at this time, and meanwhile, in order to accurately know the content required to be requested by the current user, at this time, the current data request protocol needs to be further analyzed and processed, and the protocol header included in the current data request protocol needs to be correspondingly detected. Based on the above, the data identifier included in the current protocol header is further extracted in real time, specifically, the data identifier includes "001, 002, 003" and the like, where each data identifier represents a dictionary, further, according to the current data identifier, a caching policy adapted to the current data request protocol can be further called out, and finally, corresponding target data is sent to the source client through the caching policy, so that the phenomena of network queuing and server queuing can be effectively avoided, and the use experience of the user is correspondingly improved.
Second embodiment
Further, the step of storing the preset data dictionary into the preset memory in real time based on the preset rule includes:
When the source client is detected to be started in real time, detecting a target category corresponding to the source client in real time, and calling out the preset data dictionary in a preset dictionary database according to the target category;
adding a corresponding classification identifier to the preset data dictionary, and setting loading time and expiration time corresponding to the preset data dictionary according to the classification identifier;
and storing the preset data dictionary into the preset memory in real time according to a preset format based on the loading time and the expiration time, wherein the classification identifier is unique.
Specifically, in this embodiment, it should be noted that, in order to accurately store the preset data dictionary into a preset memory, so as to correspondingly improve the efficiency of subsequent data processing, after detecting that the source client used by the user is started, it is necessary to further detect the target category corresponding to the current source client, that is, what kind of application software the current source client belongs to, based on this, the data dictionary adapted to the current source client can be further called out from the preset dictionary database.
Further, a corresponding classification identifier is added to the current data dictionary, namely, an identity identifier of the current data dictionary, and meanwhile, because each data dictionary cannot exist in the background all the time, based on the fact, the loading time and the invalidation time corresponding to the current data dictionary also need to be determined in real time according to the current classification identifier, and further the loading time and the invalidation time are stored in the preset memory in real time according to a preset format, so that the source client can directly extract needed data in the preset memory, and subsequent processing is facilitated.
Further, the step of storing the preset data dictionary in the preset memory in real time according to a preset format based on the loading time and the expiration time includes:
after the loading time and the failure time are obtained in real time, sequentially constructing mapping relations among the classification identifiers, the preset data dictionary, the loading time and the failure time, wherein the mapping relations have uniqueness;
sorting the preset data dictionaries according to the size of the classification identifiers to generate corresponding target sequences, and generating corresponding dictionary storage tables according to the target sequences and the mapping relations;
And storing the dictionary storage table into the preset memory in real time, wherein the target sequence has uniqueness.
Specifically, in this embodiment, it should be further described that, after the loading time and the expiration time corresponding to the data dictionary are detected in real time through the steps, in order to facilitate integration and storage of each data dictionary, a mapping relationship between each data dictionary and the classification identifier corresponding thereto, the loading time and the expiration time needs to be constructed in real time, further, the mapping relationship between each data dictionary and the classification identifier corresponding thereto is ordered once according to the size relationship, and a required target sequence can be generated, based on this, a corresponding dictionary storage table is further integrated according to the current target sequence and the mapping relationship, and different types of data dictionaries are sequentially arranged in the dictionary storage table, and finally, the dictionary storage table is stored in real time in the preset memory, so as to facilitate subsequent processing.
Third embodiment
Further, the step of calling out the corresponding caching policy according to the data identifier to send the corresponding target data to the source client according to the caching policy includes:
When the data identifier is obtained in real time, detecting a target dictionary corresponding to the data identifier in real time, and detecting the dictionary type of the target dictionary in real time;
judging whether the target dictionary is invalid at the current moment in real time according to the dictionary type;
If the target dictionary is judged to be not invalid at the current moment in real time according to the dictionary type, whether the number of the data acquisition addresses carried in the data request protocol is larger than a preset number threshold value or not is detected in real time;
If the number of the data acquisition addresses carried in the data request protocol is detected to be smaller than the preset number threshold in real time, the cache data in the target dictionary are directly returned to the source client, and the dictionary types comprise regions, sexes and medicines.
In addition, in this embodiment, it should be noted that, after the data identifier corresponding to each protocol header is obtained in real time through the above steps, it can be correspondingly known what type of dictionary needs to be requested by the source client used by the current user, that is, whether a regional dictionary, a gender dictionary, or other dictionaries need to be determined correspondingly, further, whether the current target dictionary is invalid at the current moment can be further determined according to the dictionary type determined in real time and the mapping relationship, specifically, if not, the size of the data amount required to be requested by the current data request protocol needs to be further known. If the number of the data acquisition addresses carried in the current data request protocol is smaller than the preset number threshold, the cache data in the target dictionary matched in real time can be directly returned to the source client, so that a user can quickly acquire the needed data, and the subsequent processing is facilitated.
Further, the method further comprises:
If the number of the data acquisition addresses carried in the data request protocol is detected to be larger than the preset number threshold in real time, detecting data connection information corresponding to the data acquisition addresses in real time, and matching a target client corresponding to the data connection information in real time;
And feeding the data connection information back to the source client, and constructing communication connection between the source client and the target client in real time so that the source client acquires corresponding target data from the target client.
In addition, in this embodiment, it should be further noted that, if it is determined in real time that the number of data acquisition addresses carried in the data request protocol is smaller than the preset number threshold, it is indicated that the data amount requested by the current data request protocol is larger, and data meeting the user requirement cannot be directly extracted from the target dictionary, based on this, it is necessary to further detect in real time the data connection information corresponding to the current data acquisition address, and match in real time the target client corresponding to the current data connection information, where the target client is a client other than the source client. On the basis, the current data connection information is further correspondingly fed back to the source client, and meanwhile, the source client can establish communication connection with the target client in real time through the current data connection information, further acquire needed data from the target client in real time, and meet the requirements of users so as to facilitate subsequent processing.
Fourth embodiment
Further, the method further comprises:
if the target dictionary is judged to be invalid at the current moment in real time according to the dictionary type, acquiring a similar dictionary corresponding to the target dictionary in real time, and updating the loading time and the invalid time of the similar dictionary in real time;
and feeding back the real-time updated similar dictionary to the source client, wherein the similarity between the similar dictionary and the target dictionary is more than 90%.
In this embodiment, it should be noted that, if the target dictionary is judged to be in the failure state in real time through the above steps, the target dictionary cannot be used continuously, and further, it is required to further match a similar dictionary adapted to the current target dictionary in real time in the dictionary database, that is, the content similarity between the two is more than 90%. Furthermore, the loading time and the invalidation time of the current similar dictionary are correspondingly updated by taking the current moment as a starting point, and finally the updated similar dictionary is fed back to the source client used by the user, so that the requirements of different users are met, and the subsequent processing is convenient.
Fifth embodiment
Further, the method further comprises:
when the source client receives the target data, starting timing, and compressing the target data in the source client after a preset time threshold value is passed, so as to correspondingly reduce the storage space of the target data.
In this embodiment, it should be noted that, if in the subsequent process, after detecting in real time that the source client of the user has received the required target data, in order to correspondingly reduce the space occupation amount of the current target data in the source client, real-time timing needs to be started.
Further, after the timing exceeds the preset time threshold, at this time, it can be determined that the user has used the current target data, preferably, whether the real-time timing exceeds 1 hour, and then the current target data needs to be compressed in real time in the source client, so as to correspondingly reduce the occupied space of the current target data, and further improve the use experience of the user.
Referring to fig. 2, a sixth embodiment of the present invention provides:
a data cache acquisition system, wherein the system comprises:
The storage module is used for storing the preset data dictionary into the preset memory in real time based on the preset rule when the source client is detected to be started in real time;
The analysis module is used for receiving the data request protocol issued by the source client in real time, and analyzing the data request protocol so as to correspondingly detect a protocol header contained in the data request protocol;
and the extraction module is used for extracting the data identifier contained in the protocol header in real time, calling out a corresponding caching strategy according to the data identifier, and sending corresponding target data to the source client according to the caching strategy.
Further, the storage module is specifically configured to:
When the source client is detected to be started in real time, detecting a target category corresponding to the source client in real time, and calling out the preset data dictionary in a preset dictionary database according to the target category;
adding a corresponding classification identifier to the preset data dictionary, and setting loading time and expiration time corresponding to the preset data dictionary according to the classification identifier;
and storing the preset data dictionary into the preset memory in real time according to a preset format based on the loading time and the expiration time, wherein the classification identifier is unique.
Further, the storage module is specifically configured to:
after the loading time and the failure time are obtained in real time, sequentially constructing mapping relations among the classification identifiers, the preset data dictionary, the loading time and the failure time, wherein the mapping relations have uniqueness;
sorting the preset data dictionaries according to the size of the classification identifiers to generate corresponding target sequences, and generating corresponding dictionary storage tables according to the target sequences and the mapping relations;
And storing the dictionary storage table into the preset memory in real time, wherein the target sequence has uniqueness.
Further, the extraction module is specifically configured to:
When the data identifier is obtained in real time, detecting a target dictionary corresponding to the data identifier in real time, and detecting the dictionary type of the target dictionary in real time;
judging whether the target dictionary is invalid at the current moment in real time according to the dictionary type;
If the target dictionary is judged to be not invalid at the current moment in real time according to the dictionary type, whether the number of the data acquisition addresses carried in the data request protocol is larger than a preset number threshold value or not is detected in real time;
If the number of the data acquisition addresses carried in the data request protocol is detected to be smaller than the preset number threshold in real time, the cache data in the target dictionary are directly returned to the source client, and the dictionary types comprise regions, sexes and medicines.
Further, the data cache obtaining system further includes a first processing module, where the first processing module is specifically configured to:
If the number of the data acquisition addresses carried in the data request protocol is detected to be larger than the preset number threshold in real time, detecting data connection information corresponding to the data acquisition addresses in real time, and matching a target client corresponding to the data connection information in real time;
And feeding the data connection information back to the source client, and constructing communication connection between the source client and the target client in real time so that the source client acquires corresponding target data from the target client.
Further, the data cache obtaining system further includes a second processing module, where the second processing module is specifically configured to:
if the target dictionary is judged to be invalid at the current moment in real time according to the dictionary type, acquiring a similar dictionary corresponding to the target dictionary in real time, and updating the loading time and the invalid time of the similar dictionary in real time;
and feeding back the real-time updated similar dictionary to the source client, wherein the similarity between the similar dictionary and the target dictionary is more than 90%.
Further, the data cache acquisition system further includes a compression module, where the compression module is specifically configured to:
when the source client receives the target data, starting timing, and compressing the target data in the source client after a preset time threshold value is passed, so as to correspondingly reduce the storage space of the target data.
A seventh embodiment of the present invention provides a computer including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the data cache acquisition method as described above when executing the computer program.
An eighth embodiment of the present invention provides a readable storage medium having stored thereon a computer program, wherein the program when executed by a processor implements a data cache acquisition method as described above.
In summary, the data caching method and system provided by the embodiment of the invention can use the caching strategy adapted to the data request when the data request is too large or too small, so that the phenomena of network queuing and server queuing can be effectively avoided, and the use experience of users is correspondingly improved.
The above-described respective modules may be functional modules or program modules, and may be implemented by software or hardware. For modules implemented in hardware, the various modules described above may be located in the same processor; or the above modules may be located in different processors in any combination.
Logic and/or steps represented in the flowcharts or otherwise described herein, e.g., a ordered listing of executable instructions for implementing logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). In addition, the computer readable medium may even be paper or other suitable medium on which the program is printed, as the program may be electronically captured, via, for instance, optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner, if necessary, and then stored in a computer memory.
It is to be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, may be implemented using any one or combination of the following techniques, as is well known in the art: discrete logic circuits having logic gates for implementing logic functions on data signals, application specific integrated circuits having suitable combinational logic gates, programmable Gate Arrays (PGAs), field Programmable Gate Arrays (FPGAs), and the like.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The foregoing examples illustrate only a few embodiments of the invention and are described in detail herein without thereby limiting the scope of the invention. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the invention, which are all within the scope of the invention. Accordingly, the scope of protection of the present invention is to be determined by the appended claims.

Claims (5)

1. The data cache acquisition method is characterized by comprising the following steps:
when the source client is detected to be started in real time, storing a preset data dictionary into a preset memory in real time based on a preset rule;
Receiving a data request protocol issued by a source client in real time, and analyzing the data request protocol to correspondingly detect a protocol header contained in the data request protocol;
Extracting data identifiers contained in the protocol header in real time, and calling out corresponding caching strategies according to the data identifiers so as to send corresponding target data to the source client according to the caching strategies;
The step of calling out the corresponding caching strategy according to the data identifier so as to send the corresponding target data to the source client according to the caching strategy comprises the following steps:
When the data identifier is obtained in real time, detecting a target dictionary corresponding to the data identifier in real time, and detecting the dictionary type of the target dictionary in real time;
judging whether the target dictionary is invalid at the current moment in real time according to the dictionary type;
If the target dictionary is judged to be not invalid at the current moment in real time according to the dictionary type, whether the number of the data acquisition addresses carried in the data request protocol is larger than a preset number threshold value or not is detected in real time;
If the number of the data acquisition addresses carried in the data request protocol is detected to be smaller than the preset number threshold in real time, directly returning the cache data in the target dictionary to the source client, wherein the dictionary type comprises regions, sexes and medicines;
the method further comprises the steps of:
If the number of the data acquisition addresses carried in the data request protocol is detected to be larger than the preset number threshold in real time, detecting data connection information corresponding to the data acquisition addresses in real time, and matching a target client corresponding to the data connection information in real time;
The data connection information is fed back to the source client, and communication connection between the source client and the target client is constructed in real time, so that the source client obtains corresponding target data from the target client;
the method further comprises the steps of:
if the target dictionary is judged to be invalid at the current moment in real time according to the dictionary type, acquiring a similar dictionary corresponding to the target dictionary in real time, and updating the loading time and the invalid time of the similar dictionary in real time;
Feeding back the real-time updated similar dictionary to the source client, wherein the similarity between the similar dictionary and the target dictionary is more than 90%;
the step of storing the preset data dictionary into the preset memory in real time based on the preset rule comprises the following steps:
When the source client is detected to be started in real time, detecting a target category corresponding to the source client in real time, and calling out the preset data dictionary in a preset dictionary database according to the target category;
adding a corresponding classification identifier to the preset data dictionary, and setting loading time and expiration time corresponding to the preset data dictionary according to the classification identifier;
Storing the preset data dictionary into the preset memory in real time according to a preset format based on the loading time and the failure time, wherein the classification identifier has uniqueness;
the step of storing the preset data dictionary in the preset memory according to a preset format based on the loading time and the expiration time comprises the following steps:
after the loading time and the failure time are obtained in real time, sequentially constructing mapping relations among the classification identifiers, the preset data dictionary, the loading time and the failure time, wherein the mapping relations have uniqueness;
sorting the preset data dictionaries according to the size of the classification identifiers to generate corresponding target sequences, and generating corresponding dictionary storage tables according to the target sequences and the mapping relations;
And storing the dictionary storage table into the preset memory in real time, wherein the target sequence has uniqueness.
2. The data cache acquisition method of claim 1, wherein: the method further comprises the steps of:
when the source client receives the target data, starting timing, and compressing the target data in the source client after a preset time threshold value is passed, so as to correspondingly reduce the storage space of the target data.
3. A data cache acquisition system for implementing a data cache acquisition method according to any one of claims 1 to2, the system comprising:
The storage module is used for storing the preset data dictionary into the preset memory in real time based on the preset rule when the source client is detected to be started in real time;
The analysis module is used for receiving the data request protocol issued by the source client in real time, and analyzing the data request protocol so as to correspondingly detect a protocol header contained in the data request protocol;
and the extraction module is used for extracting the data identifier contained in the protocol header in real time, calling out a corresponding caching strategy according to the data identifier, and sending corresponding target data to the source client according to the caching strategy.
4. A computer comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the data cache retrieval method according to any one of claims 1 to 2 when the computer program is executed by the processor.
5. A readable storage medium having stored thereon a computer program, which when executed by a processor implements a data cache acquisition method according to any one of claims 1 to 2.
CN202410295239.XA 2024-03-15 2024-03-15 Data caching acquisition method and system Active CN117896440B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410295239.XA CN117896440B (en) 2024-03-15 2024-03-15 Data caching acquisition method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410295239.XA CN117896440B (en) 2024-03-15 2024-03-15 Data caching acquisition method and system

Publications (2)

Publication Number Publication Date
CN117896440A CN117896440A (en) 2024-04-16
CN117896440B true CN117896440B (en) 2024-05-24

Family

ID=90652063

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410295239.XA Active CN117896440B (en) 2024-03-15 2024-03-15 Data caching acquisition method and system

Country Status (1)

Country Link
CN (1) CN117896440B (en)

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1574929A1 (en) * 2004-03-05 2005-09-14 Sap Ag Technique for evaluating computer system passwords
CN111988241A (en) * 2020-08-20 2020-11-24 恒生电子股份有限公司 Message queuing method, system, device and storage medium
WO2021012553A1 (en) * 2019-07-25 2021-01-28 深圳壹账通智能科技有限公司 Data processing method and related device
CN113343088A (en) * 2021-06-09 2021-09-03 北京奇艺世纪科技有限公司 Data processing method, system, device, equipment and storage medium
WO2021218033A1 (en) * 2020-04-29 2021-11-04 平安科技(深圳)有限公司 Dictionary data operation method and apparatus, readable storage medium, and terminal device
CN113688161A (en) * 2021-09-09 2021-11-23 平安医疗健康管理股份有限公司 Cache data query method, device, equipment and storage medium
CN113810349A (en) * 2020-06-17 2021-12-17 腾讯科技(深圳)有限公司 Data transmission method and device and computer equipment
CN113836180A (en) * 2021-08-27 2021-12-24 浪潮软件科技有限公司 Second-level cache data processing method, processor, storage medium and system
CN114153626A (en) * 2021-10-29 2022-03-08 深圳市金蝶天燕云计算股份有限公司 Method and device for abstracting service integration process and computer equipment
CN114328738A (en) * 2021-12-30 2022-04-12 北京人大金仓信息技术股份有限公司 Data processing method and device, electronic equipment and readable storage medium
CN115080616A (en) * 2022-06-13 2022-09-20 京东方科技集团股份有限公司 Dictionary data acquisition method and device, storage medium and electronic equipment
CN116992180A (en) * 2023-08-22 2023-11-03 中国平安财产保险股份有限公司 Method, device, terminal equipment and storage medium for caching data
CN117033831A (en) * 2023-07-31 2023-11-10 郑州云海信息技术有限公司 Client cache method, device and medium thereof
CN117216102A (en) * 2023-07-26 2023-12-12 中国银行股份有限公司 Cache data management method, device, equipment, storage medium and program product

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7421437B2 (en) * 2003-11-10 2008-09-02 Sap Ag System and method for a data dictionary cache in a distributed system
US9201800B2 (en) * 2013-07-08 2015-12-01 Dell Products L.P. Restoring temporal locality in global and local deduplication storage systems
CN114465989B (en) * 2020-10-30 2024-07-02 京东方科技集团股份有限公司 Streaming media data processing method, server, electronic device and readable storage medium

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1574929A1 (en) * 2004-03-05 2005-09-14 Sap Ag Technique for evaluating computer system passwords
WO2021012553A1 (en) * 2019-07-25 2021-01-28 深圳壹账通智能科技有限公司 Data processing method and related device
WO2021218033A1 (en) * 2020-04-29 2021-11-04 平安科技(深圳)有限公司 Dictionary data operation method and apparatus, readable storage medium, and terminal device
CN113810349A (en) * 2020-06-17 2021-12-17 腾讯科技(深圳)有限公司 Data transmission method and device and computer equipment
CN111988241A (en) * 2020-08-20 2020-11-24 恒生电子股份有限公司 Message queuing method, system, device and storage medium
CN113343088A (en) * 2021-06-09 2021-09-03 北京奇艺世纪科技有限公司 Data processing method, system, device, equipment and storage medium
CN113836180A (en) * 2021-08-27 2021-12-24 浪潮软件科技有限公司 Second-level cache data processing method, processor, storage medium and system
CN113688161A (en) * 2021-09-09 2021-11-23 平安医疗健康管理股份有限公司 Cache data query method, device, equipment and storage medium
CN114153626A (en) * 2021-10-29 2022-03-08 深圳市金蝶天燕云计算股份有限公司 Method and device for abstracting service integration process and computer equipment
CN114328738A (en) * 2021-12-30 2022-04-12 北京人大金仓信息技术股份有限公司 Data processing method and device, electronic equipment and readable storage medium
CN115080616A (en) * 2022-06-13 2022-09-20 京东方科技集团股份有限公司 Dictionary data acquisition method and device, storage medium and electronic equipment
CN117216102A (en) * 2023-07-26 2023-12-12 中国银行股份有限公司 Cache data management method, device, equipment, storage medium and program product
CN117033831A (en) * 2023-07-31 2023-11-10 郑州云海信息技术有限公司 Client cache method, device and medium thereof
CN116992180A (en) * 2023-08-22 2023-11-03 中国平安财产保险股份有限公司 Method, device, terminal equipment and storage medium for caching data

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
D. Migault ; Ericsson ; T. Guggemos ; LMU Munich ; C. Bormann ; Universitaet Bremen TZI ; D. Schinazi ; Google LLC ; .ESP Header Compression and Diet-ESP draft-mglt-ipsecme-diet-esp-07.IETF .2019,全文. *
MS-TDS协议加速策略的研究与实现;吴超;段桂华;黄俊杰;黄家玮;马宇超;吕清娇;;中南大学学报(自然科学版);20141126(11);全文 *

Also Published As

Publication number Publication date
CN117896440A (en) 2024-04-16

Similar Documents

Publication Publication Date Title
US20160239540A1 (en) Data Query Method and Apparatus, Server, and System
CN106534344A (en) Cloud platform video processing system and application method thereof
CN109656999B (en) Method, device, storage medium and apparatus for synchronizing large data volume data
CN103885990B (en) Searching method and system
CN110765760B (en) Legal case distribution method and device, storage medium and server
CN109271545A (en) A kind of characteristic key method and device, storage medium and computer equipment
US20190197140A1 (en) Automation of sql tuning method and system using statistic sql pattern analysis
CN111782595A (en) Mass file management method and device, computer equipment and readable storage medium
CN117896440B (en) Data caching acquisition method and system
CN113641796A (en) Data searching method, system and storage medium
CN113032621A (en) Data sampling method and device, computer equipment and storage medium
CN110895538A (en) Data retrieval method, device, storage medium and processor
CN115396159A (en) Container mirror image detection method, client and server
CN111400339B (en) Retrieval method and system for reverse analysis of product database identifier
CN111008304B (en) Keyword generation method and device, storage medium and electronic device
CN113468451A (en) Page display method and device
CN113703979A (en) Resource processing method and device, resource processing equipment and storage medium
CN107247796B (en) Client head portrait loading method and device and terminal equipment
CN110555716A (en) Data processing method, data processing device, computer equipment and storage medium
CN114756901B (en) Operational risk monitoring method and device
CN110865845A (en) Method for improving interface access efficiency and storage medium
CN110851477A (en) Stream data processing method, stream data processing device, computer equipment and storage medium
CN106933968A (en) A kind of related information acquisition methods, terminal, server and system
CN113094530B (en) Image data retrieval method and device, electronic equipment and storage medium
CN114546192A (en) Content display processing method and device and content display method and device

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
GR01 Patent grant
GR01 Patent grant