CN112765221A - Data retrieval method based on redis cache - Google Patents

Data retrieval method based on redis cache Download PDF

Info

Publication number
CN112765221A
CN112765221A CN202110220107.7A CN202110220107A CN112765221A CN 112765221 A CN112765221 A CN 112765221A CN 202110220107 A CN202110220107 A CN 202110220107A CN 112765221 A CN112765221 A CN 112765221A
Authority
CN
China
Prior art keywords
data
database
redis
springboot
application program
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
CN202110220107.7A
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.)
China Telecom Wanwei Information Technology Co Ltd
Original Assignee
China Telecom Wanwei Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Telecom Wanwei Information Technology Co Ltd filed Critical China Telecom Wanwei Information Technology Co Ltd
Priority to CN202110220107.7A priority Critical patent/CN112765221A/en
Publication of CN112765221A publication Critical patent/CN112765221A/en
Pending legal-status Critical Current

Links

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/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/25Integrating or interfacing systems involving database management systems
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • G06F8/315Object-oriented languages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • G06F9/4451User profiles; Roaming

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to the technical field of data caching, in particular to a data retrieval method based on a redis cache, which comprises a database, a data application layer and a page display layer, wherein the database is connected with the data application layer through a springboot technical framework. When the data display platform requests data to be displayed, data retrieval is directly carried out in a redis cache database, if the data exists, a result set is directly returned, if the data does not exist, the database is called to carry out data retrieval, the result set is returned, the data is asynchronously stored in a redis cache, and when the data display platform requests the data again, the data request is directly carried out in the redis cache database to retrieve the data, so that the data response speed is improved, and the perception of a user is improved.

Description

Data retrieval method based on redis cache
Technical Field
The invention relates to the technical field of data caching, in particular to a data retrieval method based on a redis cache.
Background
In the prior art, data display platforms display data by directly inquiring, summarizing and acquiring a result set from a database, a basic flow of acquiring the data is that a page sends a request to a service interface, the service interface summarizes the data and returns the data to the service interface through technologies such as database connection, and the service interface pushes the data to the page for display. The data platform for obtaining and displaying the data result set cannot respond quickly when the data is clicked on the page to request data, the requirement for quick service response is seriously influenced, and the experience effect of a user is poor. Therefore, new technologies need to be introduced to improve the response speed of the data presentation platform data.
Disclosure of Invention
The invention aims to provide a data retrieval method based on a redis cache, which can improve the data response speed and improve the perception of a user.
In order to solve the technical problems, the data retrieval method based on the redis cache comprises a database, a data application layer and a page display layer, wherein the database is an Oracle database or a Mysql database, the data application layer is a web application program, and the method comprises the following steps:
s1, connecting the database with the data application layer through a springboot technical framework, and performing connection debugging to enable the Web application program to be communicated with the database;
s2, installing a redis application program, and programming a redis cache into a configuration file of a Web application program and a springboot technical framework for test call-through;
s3, the page display layer displays data of the thyseleaf template of the springboot technology frame, is connected with the Web application program, and is debugged and tested;
s4, when clicking the page of the page display layer, the page sends a request to the back end, the back end is connected with the database through the springboot technical frame and the configuration file, acquires data from the database and returns to the page, stores the data into the cache database of the redis while returning the data, and when clicking the page again, retrieves the data from the cache database of the redis.
Further, the Web application program is connected with the database through a springboot technical framework and a springboot data source configuration file.
Further, the Web application program is edited by a JAVA language architecture.
The invention has the beneficial effects that: the data retrieval method based on the redis cache solves the technical problems of low response speed of the page request data, poor user experience and the like of the conventional data display platform. When the data display platform requests data to be displayed, data retrieval is directly carried out in a redis cache database, if the data exists, a result set is directly returned, if the data does not exist, the database is called to carry out data retrieval, the result set is returned, the data is asynchronously stored in a redis cache, and when the data display platform requests the data again, the data request is directly carried out in the redis cache database to retrieve the data, so that the data response speed is improved, and the perception of a user is improved.
Detailed Description
The invention relates to a data retrieval method based on a redis cache, which comprises a database, a data application layer and a page display layer, wherein the database is an Oracle database or a Mysql database, and the data application layer is a web application program, and the method comprises the following steps:
s1, connecting the database with the data application layer through a springboot technical framework, and performing connection debugging to enable the Web application program to be communicated with the database;
s2, installing a redis application program, and programming a redis cache into a configuration file of a Web application program and a springboot technical framework for test call-through;
s3, the page display layer displays data of the thyseleaf template of the springboot technology frame, is connected with the Web application program, and is debugged and tested;
s4, when clicking the page of the page display layer, the page sends a request to the back end, the back end is connected with the database through the springboot technical frame and the configuration file, acquires data from the database and returns to the page, stores the data into the cache database of the redis while returning the data, and when clicking the page again, retrieves the data from the cache database of the redis.
Further, the Web application program is connected with the database through a springboot technical framework and a springboot data source configuration file.
Further, the Web application program is edited by a JAVA language architecture.
The first embodiment is as follows:
the invention is used with an Oracle database as an example, wherein an Oracle data source provides data for a page presentation layer.
S1, connecting an Oracle database with a data application layer through a SpringBoot technical framework and a corresponding configuration file, and performing connection debugging to enable a Web application program to be communicated with the database;
s2, installing a redis application program, and compiling a corresponding redis code into configuration files of a Web application program and a SpringBoot technical framework to test and debug;
s3, the page display layer displays data of a thyseleaf template of the SpringBoot technical framework, is connected with a Web application program and is debugged and tested;
and S4, when the page display layer is clicked, the page sends a request to the back end, the back end firstly obtains data from the redis cache, if the data does not exist, the Oracle database is accessed through the SpringBoot technical framework and the configuration file, the data is obtained from the Oracle database and returned to the page, the data is stored into the cache database of the redis while being returned, and when the page is clicked again, the data is retrieved from the cache database of the redis.
Example two:
the invention is used with the Mysql database as an example, where the Mysql data source provides data for the page presentation layer.
S1, connecting a Mysql database with a data application layer through a springboot technical framework and a corresponding configuration file, and debugging the Mysql database in a connecting way to enable a Web application program to be communicated with the database;
s2, installing a redis application program, and compiling a corresponding redis code into configuration files of a Web application program and a springboot technical framework to test and call;
s3, the page display layer displays data of a thyseleaf template of the springboot technical framework, is connected with a Web application program, and is debugged and tested;
s4, when the page display layer is clicked, the page sends a request to the back end, the back end firstly obtains data from the redis cache, if the data do not exist, the Mysql database is accessed through the SpringBoot technical framework and the configuration file, the data are obtained from the Mysql database and returned to the page, the data are stored into the cache database of the redis while being returned, and when the page is clicked again, the data are retrieved from the cache database of the redis.
The data retrieval method based on the redis cache solves the technical problems of low response speed of the page request data, poor user experience and the like of the conventional data display platform. When the data display platform requests data to be displayed, data retrieval is directly carried out in a redis cache database, if the data exists, a result set is directly returned, if the data does not exist, the database is called to carry out data retrieval, the result set is returned, the data is asynchronously stored in a redis cache, and when the data display platform requests the data again, the data request is directly carried out in the redis cache database to retrieve the data, so that the data response speed is improved, and the perception of a user is improved.

Claims (3)

1. A data retrieval method based on a redis cache is characterized in that: the method comprises a database, a data application layer and a page display layer, wherein the database is an Oracle database or a Mysql database, the data application layer is a web application program, and the method comprises the following steps:
s1, connecting the database with the data application layer through a springboot technical framework, and performing connection debugging to enable the Web application program to be communicated with the database;
s2, installing a redis application program, and programming a redis cache into a configuration file of a Web application program and a springboot technical framework for test call-through;
s3, the page display layer displays data of the thyseleaf template of the springboot technology frame, is connected with the Web application program, and is debugged and tested;
s4, when clicking the page of the page display layer, the page sends a request to the back end, the back end is connected with the database through the springboot technical frame and the configuration file, acquires data from the database and returns to the page, stores the data into the cache database of the redis while returning the data, and when clicking the page again, retrieves the data from the cache database of the redis.
2. The method of claim 1, wherein the data retrieval method based on a redis cache comprises: the Web application program is connected with the database through a springboot technical framework and a springboot data source configuration file.
3. The method of claim 1, wherein the data retrieval method based on a redis cache comprises: the Web application program is edited by a JAVA language architecture.
CN202110220107.7A 2021-02-27 2021-02-27 Data retrieval method based on redis cache Pending CN112765221A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110220107.7A CN112765221A (en) 2021-02-27 2021-02-27 Data retrieval method based on redis cache

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110220107.7A CN112765221A (en) 2021-02-27 2021-02-27 Data retrieval method based on redis cache

Publications (1)

Publication Number Publication Date
CN112765221A true CN112765221A (en) 2021-05-07

Family

ID=75704310

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110220107.7A Pending CN112765221A (en) 2021-02-27 2021-02-27 Data retrieval method based on redis cache

Country Status (1)

Country Link
CN (1) CN112765221A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113553051A (en) * 2021-06-01 2021-10-26 中电万维信息技术有限责任公司 File data comparison method based on redis cache technology

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160188749A1 (en) * 2014-12-31 2016-06-30 Alibaba Group Holding Limited Feed Data Storage and Query
CN106506605A (en) * 2016-10-14 2017-03-15 华南理工大学 A kind of SaaS application construction methods based on micro services framework
CN106790059A (en) * 2016-12-20 2017-05-31 Tcl集团股份有限公司 Intelligent television Launcher cloud systems service calling method and system
CN110209798A (en) * 2017-12-22 2019-09-06 北京奇虎科技有限公司 A kind of method for exhibiting data and device of redis database
CN112100554A (en) * 2020-08-14 2020-12-18 北京思特奇信息技术股份有限公司 System and method for improving page response speed based on redis cache

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160188749A1 (en) * 2014-12-31 2016-06-30 Alibaba Group Holding Limited Feed Data Storage and Query
CN106506605A (en) * 2016-10-14 2017-03-15 华南理工大学 A kind of SaaS application construction methods based on micro services framework
CN106790059A (en) * 2016-12-20 2017-05-31 Tcl集团股份有限公司 Intelligent television Launcher cloud systems service calling method and system
CN110209798A (en) * 2017-12-22 2019-09-06 北京奇虎科技有限公司 A kind of method for exhibiting data and device of redis database
CN112100554A (en) * 2020-08-14 2020-12-18 北京思特奇信息技术股份有限公司 System and method for improving page response speed based on redis cache

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
张永荟等: "基于spring boot与mybaits框架的校园点餐APP", 《信息通信》 *
脚印在泥泞路上: "SpringBoot整合Redis进行缓存数据库查询", 《HTTPS://WWW.CNBLOGS.COM/TIAN-CI/P/10543064.HTML》 *
葛宝龙等: "SpringBoot集成Redis缓存在电信运营系统中的应用研究", 《中国新通信》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113553051A (en) * 2021-06-01 2021-10-26 中电万维信息技术有限责任公司 File data comparison method based on redis cache technology
CN113553051B (en) * 2021-06-01 2022-06-21 中电万维信息技术有限责任公司 File data comparison method based on redis cache technology

Similar Documents

Publication Publication Date Title
US11561887B2 (en) Test script debugging using an automated testing framework and UI rendering tree
CN102902558B (en) Project script file upgrades system and method, script file merges method and apparatus
EP0632377B1 (en) Method for testing a message-driven operating system
US5809248A (en) Method and apparatus for front end navigator and network architecture for performing functions on distributed files in a computer network
US6253368B1 (en) Dynamically debugging user-defined functions and stored procedures
US6202200B1 (en) Multi-tier debugging
US6493868B1 (en) Integrated development tool
EP0784276B1 (en) Load test system and method
US6212673B1 (en) Component-neutral builder interface
US20100333072A1 (en) Integrated performance and load testing tool for application servers
US8205120B2 (en) Intelligent test framework
US20110283247A1 (en) Method of recording and replaying call frames for the testbench
US20110041090A1 (en) Auditing a website with page scanning and rendering techniques
US20030229825A1 (en) Automated software testing system and method
CN113051514B (en) Element positioning method and device, electronic equipment and storage medium
US20080307391A1 (en) Acquiring coverage data from a script
US11436133B2 (en) Comparable user interface object identifications
CN112765221A (en) Data retrieval method based on redis cache
CN111917603A (en) Client test method and device, computer equipment and storage medium
US6424974B1 (en) Storing P-code in a database
CN108829591A (en) A kind of synergic debugging system and method based on Web
CN103064780B (en) A kind of method of software test and device
US20060265697A1 (en) Pattern query language
CN113127445A (en) Domestic substitution migration method of foreign technology application system
US20150169675A1 (en) Data access using virtual retrieve transformation nodes

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

Application publication date: 20210507

RJ01 Rejection of invention patent application after publication