CN110909008A - Data acquisition method and device and related equipment - Google Patents

Data acquisition method and device and related equipment Download PDF

Info

Publication number
CN110909008A
CN110909008A CN201911121648.3A CN201911121648A CN110909008A CN 110909008 A CN110909008 A CN 110909008A CN 201911121648 A CN201911121648 A CN 201911121648A CN 110909008 A CN110909008 A CN 110909008A
Authority
CN
China
Prior art keywords
target data
data
key value
data acquisition
redis cache
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
CN201911121648.3A
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.)
Zheng Wei Yun Ltd
Original Assignee
Zheng Wei Yun 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 Zheng Wei Yun Ltd filed Critical Zheng Wei Yun Ltd
Priority to CN201911121648.3A priority Critical patent/CN110909008A/en
Publication of CN110909008A publication Critical patent/CN110909008A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • 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
    • 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/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases

Abstract

The application discloses a data acquisition method, which comprises the steps of determining target data and annotation information and parameter information corresponding to the target data according to a received surrounding notification; acquiring a key value corresponding to the target data according to the annotation information; judging whether the parameter information has a forced updating parameter or not; if yes, acquiring target data from a preset database according to the key value; if not, judging whether target data exists in the redis cache or not according to the key value; if yes, acquiring target data from a redis cache according to the key value; if not, acquiring target data from a preset database according to the key value; feeding target data back to the user terminal; the data acquisition method can effectively simplify the operation process, solve the problem of low efficiency caused by manual configuration and improve the maintainability of the system. The application also discloses a data acquisition device, an identification and computer readable storage medium, all having the above beneficial effects.

Description

Data acquisition method and device and related equipment
Technical Field
The present application relates to the field of database technologies, and in particular, to a data acquisition method, and further, to a data acquisition apparatus, a device, and a computer-readable storage medium.
Background
More and more IT projects face high concurrency problems, a relational database faces challenges, and the application of an open-source distributed cache storage system redis a supplement to the traditional relational database to a great extent.
In the prior art, the operation redis cache is generally implemented by packaging spring officials, namely by using spring-data-redis calls, but the implementation mode faces the integration problem with a widely-used java development framework spring Boot. Specifically, the Spring-data-Redis encapsulates a specific reids client, which is really used for operating Redis, and typically adopts Redis Template, which is an encapsulation performed on the client by Spring authorities, but a large amount of configuration is required in the using process, so that a large amount of Template code fragments irrelevant to service exist in a service system, and thus some operation processes of Redis of the distributed cache storage system by using the Redis Template are complex; moreover, because a large number of template code segments irrelevant to the service exist, the maintenance process is difficult, and the spring integrated redis cannot be conveniently and quickly realized; in addition, the configuration process needs manual operation, and the implementation efficiency is low.
Therefore, how to effectively simplify the operation flow to solve the problem of low efficiency caused by manual configuration and improve the maintainability of the system is a problem to be solved by those skilled in the art.
Disclosure of Invention
The data acquisition method can effectively simplify the operation flow, solve the problem of low efficiency caused by manual configuration and improve the maintainability of the system; another object of the present application is to provide a data acquisition apparatus, a device and a computer-readable storage medium, which also have the above-mentioned advantages.
In order to solve the above technical problem, the present application provides a data acquisition method, where the data acquisition method includes:
determining target data and annotation information and parameter information corresponding to the target data according to the received surrounding notification;
obtaining a key value corresponding to the target data according to the annotation information;
judging whether the parameter information has a mandatory updating parameter;
if yes, acquiring the target data from a preset database according to the key value;
if not, judging whether the target data exists in the redis cache or not according to the key value;
if yes, acquiring the target data from the redis cache according to the key value;
if not, acquiring the target data from the preset database according to the key value;
and feeding back the target data to the user terminal.
Preferably, the receiving the surround notification includes:
the surround notification is received through a designated slice.
Preferably, after the target data is acquired from a preset database according to the key value, the method further includes:
and updating the redis cache by utilizing the target data.
Preferably, the updating the redis cache by using the target data includes:
acquiring a failure time parameter according to the parameter information;
and storing the target data to the redis cache according to the failure time parameter.
Preferably, the data acquisition method further includes:
determining a return type corresponding to the target data according to the surrounding notification;
the feeding back the target data to the user terminal includes:
and feeding back the target data to the user terminal according to the return type.
Preferably, the feeding back the target data to the user terminal according to the return type includes:
judging whether the return type is a character string type;
if yes, feeding the target data back to the user terminal;
and if not, performing deserialization on the target data to obtain processed data, and feeding the processed data back to the user terminal.
In order to solve the above technical problem, the present application further provides a data acquisition apparatus, including:
the information determining module is used for determining target data and annotation information and parameter information corresponding to the target data according to the received surrounding notification;
the information analysis module is used for obtaining a key value corresponding to the target data according to the annotation information;
the updating judgment module is used for judging whether the parameter information has a forced updating parameter;
the first data acquisition module is used for acquiring the target data from a preset database according to the key value if the forced updating parameter exists in the parameter information;
the data judgment module is used for judging whether the target data exists in the redis cache or not according to the key value if the forced updating parameter does not exist in the parameter information;
a second data obtaining module, configured to, if the target data exists in the redis cache, obtain the target data from the redis cache according to the key value;
a third data obtaining module, configured to, if the target data does not exist in the redis cache, obtain the target data from the preset database according to the key value;
and the data feedback module is used for feeding the target data back to the user terminal.
In order to solve the above technical problem, the present application further provides a data acquisition device, where the data acquisition device includes:
a memory for storing a computer program;
a processor for implementing the steps of any of the above data acquisition methods when executing the computer program.
In order to solve the above technical problem, the present application further provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps of any one of the above data acquisition methods.
The data acquisition method comprises the steps of determining target data and annotation information and parameter information corresponding to the target data according to a received surrounding notification; obtaining a key value corresponding to the target data according to the annotation information; judging whether the parameter information has a mandatory updating parameter; if yes, acquiring the target data from a preset database according to the key value; if not, judging whether the target data exists in the redis cache or not according to the key value; if yes, acquiring the target data from the redis cache according to the key value; if not, acquiring the target data from the preset database according to the key value; and feeding back the target data to the user terminal.
Therefore, according to the data acquisition method provided by the application, the cache hit judgment is realized by adding annotations and forcibly updating parameters, and then the spring Boot and the redis are integrated, so that the operation when the redis cache is used is greatly simplified, and compared with the prior art that the spring official redisplate is directly used for operating the redis cache, the implementation mode does not need to configure a complex xml file, self-define various redis templates and configure a sequencer according to a specific data structure, and does not need to modify key code logic, so that the operation process is more convenient and faster, and the maintainability of the system is improved; in addition, because the implementation mode does not need manual configuration, the implementation efficiency is effectively improved.
The data acquisition device, the equipment and the computer readable storage medium provided by the application all have the beneficial effects, and are not described again.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a schematic flow chart of a data acquisition method provided in the present application;
FIG. 2 is a diagram of a Redis cache framework provided in the present application;
fig. 3 is a schematic structural diagram of a data acquisition apparatus provided in the present application;
fig. 4 is a schematic structural diagram of a data acquisition device provided in the present application.
Detailed Description
The core of the application is to provide a data acquisition method, which can effectively simplify the operation process, solve the problem of low efficiency caused by manual configuration and improve the maintainability of the system; another core of the present application is to provide a data acquisition apparatus, a device and a computer-readable storage medium, which also have the above beneficial effects.
In order to make the objects, 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 is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, fig. 1 is a schematic flow chart of a data acquisition method provided in the present application, where the data acquisition method may include:
s101: determining target data and annotation information and parameter information corresponding to the target data according to the received surrounding notification;
this step is intended to achieve the determination of target data, which is the data that needs to be acquired. Specifically, a surround notification is received first, the surround notification is a manner provided by a spring framework and can be used for manually controlling when an enhanced method is executed, a target method to be executed is specified in the surround notification, namely target data is obtained from a database, and therefore the target data can be determined; furthermore, annotation information and parameter information are obtained from the target method, wherein the annotation information comprises index information of target data and is used for realizing retrieval and obtaining of the target data, since redis is an open-source, network-supported, memory-based and persistent log-type and Key-Value-type database, the index information in the application is a Key Value, and the parameter information is used for judging whether to hit cache through forced updating so as to determine whether to obtain data from the database or obtain data from the redis cache.
Preferably, receiving the surround notification may include: surround notifications are received through a designated slot.
Specifically, the acquisition of the surround notification can be implemented based on AOP (Aspect organized Programming), so that the surround notification can be received directly through the designated section without additional manual configuration and code modification. The AOP is a technology for realizing unified maintenance of program functions through a pre-compiling mode and a running-time dynamic agent.
S102: acquiring a key value corresponding to the target data according to the annotation information;
the key value is obtained by analyzing the annotation information, wherein the key value is the key value corresponding to the target data. The key value may be formed by dynamically combining a string constant in the annotation information and a set parameter.
S103: judging whether the parameter information has a forced updating parameter or not; if yes, executing S104, otherwise executing S105;
the step aims to realize the judgment of the forced updating parameters, namely, whether the forced updating parameters exist in the parameter information is judged, if yes, forced updating is needed, at the moment, the redis cache is not hit, a target method needs to be executed, namely, target data needs to be obtained from the database, if not, the forced updating is needed, at the moment, the redis cache is hit, and the target data is directly obtained from the redis cache. Wherein, the forced updating is the updating of the redis cache, and the target data acquired from the database is used for updating the redis cache. It can be understood that the parameters included in the parameter information are all related data information required for implementing the redis cache operation, the specific type of the parameter information does not affect the implementation of the technical scheme, and the parameter information is set by a technical person according to actual needs, which is not limited in the present application.
S104: acquiring target data from a preset database according to the key value;
s105: judging whether target data exist in the redis cache or not according to the key value, if so, executing S106, and if not, executing S107;
s106: acquiring target data from a redis cache according to the key value;
s107: acquiring target data from a preset database according to the key value;
the above steps are to achieve the acquisition of the target data, and only the target data is indexed and acquired by using the key value, specifically, when the parameter information has a forced updating parameter, the target data is acquired from the preset database, and when the parameter information does not have the forced updating parameter, the target data is preferentially acquired from the redis cache. When the target data is acquired from the redis cache, whether the target data exists in the redis cache can be judged based on the key value, if yes, the target data is directly acquired from the redis cache, and if not, the target data is acquired from the preset database.
As a preferred embodiment, after the obtaining the target data from the preset database according to the key value, the method may further include: and updating the redis cache by using the target data.
The preferred embodiment aims to update the redis cache, that is, the data stored in the redis cache is updated by using the target data in the preset database, and specifically, the target data is stored in the redis cache, so that the cache can be directly hit when the data is subsequently acquired again, the data is directly acquired from the redis cache, and the data acquisition efficiency is effectively ensured.
Preferably, the updating the redis cache by using the target data may include: acquiring a failure time parameter according to the parameter information; and storing the target data to a redis cache according to the failure time parameter.
The preferred embodiment provides a more specific method for updating a redis cache, where a storage space in the redis cache is limited, so as to avoid a situation that the redis cache cannot normally operate due to excessive stored data, and to avoid that outdated dirty data is stored in the redis cache, and therefore, a failure time parameter may be preset to implement updating of the redis cache. Specifically, the expiration time parameter may be obtained from the parameter information, the valid time of the target data may be determined, the storage time of the target data may be counted in real time after the target data is stored in the redis cache, and once the storage time exceeds the valid time, the target data may be directly deleted.
S108: and feeding back the target data to the user terminal.
The step aims to realize the feedback of the target data, namely the target data is fed back to the user terminal to be displayed, so that the data acquisition is completed.
According to the data acquisition method, the cache hit judgment is realized by adding annotations and forcibly updating parameters, and then the spring Boot and the redis are integrated, so that the operation when the redis cache is used is greatly simplified, and compared with the prior art that the spring official redis cache is directly used for operating the redis cache, the implementation mode does not need to configure a complex xml file, and does not need to define various redis templates and configure serializers according to a specific data structure, and does not need to modify key code logic, so that the operation process is more convenient and faster, and the maintainability of the system is improved; in addition, because the implementation mode does not need manual configuration, the implementation efficiency is effectively improved.
On the basis of the above-described embodiment:
as a preferred embodiment, the data acquisition method may further include: determining a return type corresponding to the target data according to the surrounding notification; the feeding back the target data to the user terminal may include: and feeding back the target data to the user terminal according to the return type.
The preferred embodiment aims to implement returning the target data to the user terminal according to the execution data type, and specifically, after the target method is determined according to the surrounding notification, the return type corresponding to the target data, that is, the data type returned by the target data, may be obtained from the target method, so that the target data belonging to the return type may be directly fed back to the user terminal, and for the target data not belonging to the return type, the type conversion is performed to obtain the data belonging to the return type and feed back the data to the user terminal.
Preferably, the feeding back the target data to the user terminal according to the return type may include: judging whether the return type is a character string type; if yes, feeding target data back to the user terminal; and if not, performing deserialization on the target data to obtain processed data, and feeding the processed data back to the user terminal.
For the above return type, the present application provides a more specific type, that is, a character string type, specifically, it may be determined whether the specified return type is the character string type, if so, the target data may be directly fed back to the user terminal, and if not, the target data may be deserialized, and then the processed data may be fed back to the user terminal, so as to achieve the acquisition of the target data.
On the basis of the above embodiments, the embodiments of the present application provide a more specific data acquisition method.
Firstly, please refer to fig. 2, fig. 2 is a frame diagram of a redis cache provided in the present application, wherein a cache annotation part is a custom redis cache tag used for identifying a method that needs to add a cache, supporting dynamic setting of key, cache timeout time, and dynamic cache refreshing; the cache type part is used for identifying the type of a cache object and can be added according to project requirements; the cache section part is used for analyzing cache annotation to realize cache hit judgment, defines the use of an entry point, a surrounding notification and an interceptor, and directly calls a target method (acquiring data from a database) to finish the operation if the cache configuration of the part is abnormal; the cache core logic provides specific methods for acquiring data, processing data and updating the cache, and finally, the cache management module integrates the methods. Further, based on the redis cache framework, the specific implementation flow of the data acquisition method is as follows:
(1) receiving a surrounding notification, and acquiring annotation information, method parameters and a return type before executing a target method;
(2) analyzing the annotation information to obtain a real key value, and determining whether a forced updating parameter (which is not updated by default) exists by analyzing the parameters of the method; acquiring the name of a return type and a failure time parameter;
(3) judging whether the updating is forced updating or not, if so, executing the step (4) by forced updating, and otherwise, executing the step (7);
(4) starting and operating a target method by the surrounding notification, obtaining a return result (target data), and executing a surrounding notification post-processing part;
(5) judging whether the return type is a character string type, if so, storing the return result of the target method into a redis cache according to the failure time parameter, and executing the step (10), otherwise, executing the step (6);
(6) serializing the returned result of the target method and the key value, storing the serialized data information into a redis cache according to the failure time parameter, deserializing the returned result of the target method, and executing the step (10);
(7) judging whether the return type is a character string type, if so, directly obtaining target data from a redis cache according to a key value, otherwise, after converting the key value into a binary number group, obtaining the target data from the redis cache according to the converted key value;
(8) judging whether target data are acquired, if so, executing the step (9), and returning to the step (4);
(9) judging according to the return type, if the type is a character string type, directly returning the target data, otherwise, performing an anti-sequence on the target data, and executing the step (10);
(10) and obtaining final target data.
Therefore, according to the data acquisition method provided by the embodiment of the application, the cache hit judgment is realized by adding annotations and forcibly updating parameters, and then the spring Boot and the redis are integrated, so that the operation when the redis cache is used is greatly simplified, and compared with the prior art that the redis cache is directly operated by using spring official redisplate, the realization method does not need to configure a complex xml file, self-define various redisplate types and a configuration sequencer according to a specific data structure, and does not need to modify key code logic, so that the operation flow is more convenient and faster, and the maintainability of the system is improved; in addition, because the implementation mode does not need manual configuration, the implementation efficiency is effectively improved.
To solve the above problem, please refer to fig. 3, fig. 3 is a schematic structural diagram of a data acquisition apparatus provided in the present application, where the data acquisition apparatus may include:
the information determining module 10 is configured to determine target data and annotation information and parameter information corresponding to the target data according to the received surround notification;
the information analysis module 20 is used for obtaining a key value corresponding to the target data according to the annotation information;
an update judging module 30, configured to judge whether a mandatory update parameter exists in the parameter information;
the first data acquisition module 40 is configured to acquire target data from a preset database according to the key value if the parameter information includes a forced update parameter;
the data judgment module 50 is configured to judge whether target data exists in the redis cache according to the key value if the mandatory update parameter does not exist in the parameter information;
a second data obtaining module 60, configured to, if target data exists in the redis cache, obtain the target data from the redis cache according to the key value;
the third data obtaining module 70 is configured to, if the target data does not exist in the redis cache, obtain the target data from a preset database according to the key value;
and a data feedback module 80, configured to feed target data back to the user terminal.
Therefore, the data acquisition device provided by the application realizes cache hit judgment by additionally arranging annotations and forcibly updating parameters, further realizes the integration of spring Boot and redis, greatly simplifies the operation when the redis cache is used, and compared with the prior art that the redis cache is directly operated by using spring official redisplate, the implementation mode does not need to configure complex xml files, self-defines various redis templates and configuration serializers according to specific data structures, and does not need to modify key code logic, so that the operation flow is more convenient and faster, and the maintainability of the system is improved; in addition, because the implementation mode does not need manual configuration, the implementation efficiency is effectively improved.
As a preferred embodiment, the data acquisition apparatus may further include a notification reception module for receiving a surround notification through the designated section.
As a preferred embodiment, the data obtaining apparatus may further include a cache updating module, configured to update the redis cache with the target data.
As a preferred embodiment, the cache update module may be specifically configured to obtain the expiration time parameter according to the parameter information; and storing the target data to a redis cache according to the failure time parameter.
As a preferred embodiment, the data obtaining apparatus may further include a data type determining module, configured to determine a return type corresponding to the target data according to the surround notification; the data feedback module 60 may be specifically configured to feed back the target data to the user terminal according to the return type.
As a preferred embodiment, the data feedback module 60 may include:
the type judging unit is used for judging whether the return type is a character string type or not;
the data feedback unit is used for feeding the target data back to the user terminal if the return type is the character string type;
and the data deserializing unit is used for deserializing the target data to obtain processed data and feeding the processed data back to the user terminal if the return type is not the character string type.
For the introduction of the apparatus provided in the present application, please refer to the above method embodiments, which are not described herein again.
To solve the above problem, please refer to fig. 4, where fig. 4 is a schematic structural diagram of a data acquisition apparatus provided in the present application, the data acquisition apparatus may include:
a memory 1 for storing a computer program;
the processor 2 is configured to implement any of the above-mentioned data acquisition steps when executing the computer program.
For the introduction of the device provided in the present application, please refer to the above method embodiment, which is not described herein again.
To solve the above problem, the present application further provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, can implement the steps of any one of the data acquisition methods.
The computer-readable storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
For the introduction of the computer-readable storage medium provided in the present application, please refer to the above method embodiments, which are not described herein again.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The data acquisition method, apparatus, device and computer-readable storage medium provided in the present application are described in detail above. The principles and embodiments of the present application are explained herein using specific examples, which are provided only to help understand the method and the core idea of the present application. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and these improvements and modifications also fall into the elements of the protection scope of the claims of the present application.

Claims (10)

1. A method of data acquisition, comprising:
determining target data and annotation information and parameter information corresponding to the target data according to the received surrounding notification;
obtaining a key value corresponding to the target data according to the annotation information;
judging whether the parameter information has a mandatory updating parameter;
if yes, acquiring the target data from a preset database according to the key value;
if not, judging whether the target data exists in the redis cache or not according to the key value;
if yes, acquiring the target data from the redis cache according to the key value;
if not, acquiring the target data from the preset database according to the key value;
and feeding back the target data to the user terminal.
2. The data acquisition method of claim 1, wherein receiving the surround notification comprises:
the surround notification is received through a designated slice.
3. The data acquisition method as claimed in claim 1, wherein after acquiring the target data from a preset database according to the key value, the method further comprises:
and updating the redis cache by utilizing the target data.
4. The data acquisition method as in claim 3, wherein said updating the redis cache with the target data comprises:
acquiring a failure time parameter according to the parameter information;
and storing the target data to the redis cache according to the failure time parameter.
5. The data acquisition method according to any one of claims 1 to 4, further comprising:
determining a return type corresponding to the target data according to the surrounding notification;
the feeding back the target data to the user terminal includes:
and feeding back the target data to the user terminal according to the return type.
6. The data acquisition method of claim 5, wherein the feeding back the target data to the user terminal according to the return type comprises:
judging whether the return type is a character string type;
if yes, feeding the target data back to the user terminal;
and if not, performing deserialization on the target data to obtain processed data, and feeding the processed data back to the user terminal.
7. A data acquisition apparatus, comprising:
the information determining module is used for determining target data and annotation information and parameter information corresponding to the target data according to the received surrounding notification;
the information analysis module is used for obtaining a key value corresponding to the target data according to the annotation information;
the updating judgment module is used for judging whether the parameter information has a forced updating parameter;
the first data acquisition module is used for acquiring the target data from a preset database according to the key value if the forced updating parameter exists in the parameter information;
the data judgment module is used for judging whether the target data exists in the redis cache or not according to the key value if the forced updating parameter does not exist in the parameter information;
a second data obtaining module, configured to, if the target data exists in the redis cache, obtain the target data from the redis cache according to the key value;
a third data obtaining module, configured to, if the target data does not exist in the redis cache, obtain the target data from the preset database according to the key value;
and the data feedback module is used for feeding the target data back to the user terminal.
8. The data acquisition device of claim 7, further comprising:
the data type judging module is used for feeding the target data back to the user terminal;
the data feedback module is specifically configured to feed back the target data to the user terminal according to the return type.
9. A data acquisition device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the data acquisition method according to any one of claims 1 to 6 when executing said computer program.
10. A computer-readable storage medium, characterized in that a computer program is stored thereon, which computer program, when being executed by a processor, carries out the steps of the data acquisition method according to one of claims 1 to 6.
CN201911121648.3A 2019-11-15 2019-11-15 Data acquisition method and device and related equipment Pending CN110909008A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911121648.3A CN110909008A (en) 2019-11-15 2019-11-15 Data acquisition method and device and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911121648.3A CN110909008A (en) 2019-11-15 2019-11-15 Data acquisition method and device and related equipment

Publications (1)

Publication Number Publication Date
CN110909008A true CN110909008A (en) 2020-03-24

Family

ID=69817648

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911121648.3A Pending CN110909008A (en) 2019-11-15 2019-11-15 Data acquisition method and device and related equipment

Country Status (1)

Country Link
CN (1) CN110909008A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112202869A (en) * 2020-09-27 2021-01-08 华人运通(上海)云计算科技有限公司 Data transmission method, server, vehicle, and computer storage medium
CN112770354A (en) * 2020-12-31 2021-05-07 厦门骐俊物联科技股份有限公司 Cellular communication Internet of things terminal data uploading method based on redis
CN113626483A (en) * 2021-08-18 2021-11-09 重庆允成互联网科技有限公司 Front-end caching method, system, equipment and storage medium for filling forms
CN114895975A (en) * 2022-04-27 2022-08-12 上海万物新生环保科技集团有限公司 Preheating method and equipment for server-side system
CN116009949A (en) * 2023-03-28 2023-04-25 税友软件集团股份有限公司 Numerical value acquisition method, device, equipment and storage medium
CN116661636A (en) * 2023-05-30 2023-08-29 北京和德宇航技术有限公司 Track display method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107066570A (en) * 2017-04-07 2017-08-18 聚好看科技股份有限公司 Data managing method and device
CN107562385A (en) * 2017-09-13 2018-01-09 郑州云海信息技术有限公司 Distributed storage client reads the method, apparatus and equipment of data
CN108595680A (en) * 2018-05-02 2018-09-28 四川长虹电器股份有限公司 The implementation method of the caching of XBRL
CN109684086A (en) * 2018-12-14 2019-04-26 广东亿迅科技有限公司 A kind of distributed caching automatic loading method and device based on AOP

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107066570A (en) * 2017-04-07 2017-08-18 聚好看科技股份有限公司 Data managing method and device
CN107562385A (en) * 2017-09-13 2018-01-09 郑州云海信息技术有限公司 Distributed storage client reads the method, apparatus and equipment of data
CN108595680A (en) * 2018-05-02 2018-09-28 四川长虹电器股份有限公司 The implementation method of the caching of XBRL
CN109684086A (en) * 2018-12-14 2019-04-26 广东亿迅科技有限公司 A kind of distributed caching automatic loading method and device based on AOP

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112202869A (en) * 2020-09-27 2021-01-08 华人运通(上海)云计算科技有限公司 Data transmission method, server, vehicle, and computer storage medium
CN112202869B (en) * 2020-09-27 2021-10-22 华人运通(上海)云计算科技有限公司 Data transmission method, server, vehicle, and computer storage medium
CN112770354A (en) * 2020-12-31 2021-05-07 厦门骐俊物联科技股份有限公司 Cellular communication Internet of things terminal data uploading method based on redis
CN113626483A (en) * 2021-08-18 2021-11-09 重庆允成互联网科技有限公司 Front-end caching method, system, equipment and storage medium for filling forms
CN113626483B (en) * 2021-08-18 2022-04-26 重庆允成互联网科技有限公司 Front-end caching method, system, equipment and storage medium for filling forms
CN114895975A (en) * 2022-04-27 2022-08-12 上海万物新生环保科技集团有限公司 Preheating method and equipment for server-side system
CN114895975B (en) * 2022-04-27 2023-07-25 上海万物新生环保科技集团有限公司 Preheating method and equipment of server system
CN116009949A (en) * 2023-03-28 2023-04-25 税友软件集团股份有限公司 Numerical value acquisition method, device, equipment and storage medium
CN116009949B (en) * 2023-03-28 2023-08-29 税友软件集团股份有限公司 Numerical value acquisition method, device, equipment and storage medium
CN116661636A (en) * 2023-05-30 2023-08-29 北京和德宇航技术有限公司 Track display method, device, equipment and storage medium
CN116661636B (en) * 2023-05-30 2024-01-30 北京和德宇航技术有限公司 Track display method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110909008A (en) Data acquisition method and device and related equipment
CN112765023B (en) Test case generation method and device
CN110647471B (en) Interface test case generation method, electronic device and storage medium
CN111061464B (en) Analysis code generation method, device, equipment and storage medium
CN112559354A (en) Front-end code specification detection method and device, computer equipment and storage medium
CN111026670B (en) Test case generation method, test case generation device and storage medium
CN111414379A (en) Serial number generation method, device, equipment and computer readable storage medium
CN111708771A (en) Data duplicate checking method, device, equipment and computer storage medium
US20220308949A1 (en) Publishing system, pushing method, application device, receiving device and service management device
CN107122203B (en) Configuration file setting method and device
CN111367952A (en) Paging query method and system for cache data and computer readable storage medium
CN104657248A (en) Java thread stack analysis method and system
CN112346775B (en) Index data general processing method, electronic device and storage medium
CN111901453B (en) Identification generation method, device, computer equipment and storage medium
CN113032224A (en) Information acquisition method and device, electronic equipment and readable storage medium
CN111966704A (en) ORM framework implementation method, system, computer equipment and storage medium
CN116541278A (en) Unit test case generation method, device, equipment and storage medium
CN113448793A (en) System monitoring method and device compatible with multiple operating systems
CN107506474B (en) Database operation method and device based on object mapping
CN113590179B (en) Plug-in detection method and device, electronic equipment and storage medium
CN114416563A (en) Data generation method and device, electronic equipment and storage medium
CN113709187B (en) Multi-server data request method, device, equipment and storage medium
CN115657899A (en) Icon processing method and device, electronic equipment and storage medium
CN114371884A (en) Method, device, equipment and storage medium for processing Flink calculation task
US20160092505A1 (en) Framework for handling wrapper procedures

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: 20200324