Eureka AIR delivers breakthrough ideas for toughest innovation challenges, trusted by R&D personnel around the world.

Method and system for caching function execution result based on aspect-oriented programming (AOP) technology

A technology for executing results and caching data, which is applied in memory systems, electrical digital data processing, memory address/allocation/relocation, etc., and can solve problems such as difficult and fine-grained data

Active Publication Date: 2013-03-27
PEKING UNIV +2
View PDF0 Cites 8 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] In order to solve the problems existing in the existing cache technology that it is difficult to cache fine-grained data and the cache processing function module and the business logic function module are tightly coupled, the purpose of the present invention is to provide a method and system for caching function execution results based on AOP technology, In this way, the fine-grained caching of enterprise application system data can be realized, and the operating performance of the system can be greatly improved, so that the more people use the business system, the more data is cached, and the faster the system runs

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and system for caching function execution result based on aspect-oriented programming (AOP) technology
  • Method and system for caching function execution result based on aspect-oriented programming (AOP) technology
  • Method and system for caching function execution result based on aspect-oriented programming (AOP) technology

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0099] The execution process of calling the getStudentList() member function of StudentDao for the first time:

[0100] Step 1. The getStudentList() member function of the StudentDao class is called;

[0101] Step 2. The cache processing notification device intercepts the called business logic processing function getStudentList(), and obtains the class name "StudentDao" and the function name "getStudentList" where the function is located. In this embodiment, there is no parameter, and the function instance feature code generation device will The function name "getStudentList" is used as the function instance string, and the hash code "1713854531" of the function instance string is obtained through the hash function, and the class name "StudentDao" and the hash code "1713854531" are combined to obtain the function instance feature code " StudentDao1713854531”;

[0102] Step 3. According to the function instance feature code "StudentDao1713854531", query the execution result of...

Embodiment 2

[0114] The embodiment of the present invention provides a caching mechanism for a function with one parameter.

[0115] The first call to execute the function:

[0116] Step 1. The getStudent("tom") member function of the StudentDao class is called;

[0117] Step 2. The cache processing notification device intercepts the called business logic processing function getStudent(), and obtains the class name "StudentDao", the function name "getStudent" and the parameter "Tom", and the function instance feature code generation device converts the function name "getStudent " and the parameter "Tom" are combined to get the function instance string "getStudentTom", and the hash code "-1330179827" of the function instance string is obtained through the hash function, and the class name "StudentDao" and the hash code "-1330179827" Combined to get the function instance feature code "StudentDao-1330179827";

[0118] Step 3. According to the function instance feature code "StudentDao-13301...

Embodiment 3

[0129] The embodiment of the present invention provides a mechanism for invalidating cached data by a service logic deletion method.

[0130] Step 1. The business logic delete method deleteStudent("Tom") is called. Since "Tom" is deleted, the execution results of the getStudentList() and getStudent("Tom") functions change, and the data in the cache will become invalid;

[0131] Step 2. After Spring AOP executes the method of deleting the target data, it will execute the cache clearing notification device, and the cache clearing notification device will obtain the class name "StudentDao" of the executed function;

[0132] Step 3. The cache removal notification device clears the data whose cacheMap key name starts with "StudentDao".

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a method and a system for caching a function execution result based on the AOP technology. The method and the system are achieved through the AOP function provided by the Spring development framework, a Spring AOP caching disposition notice is performed before and after a business logic manipulation function which needs execution result caching, the business logic manipulation function is intercepted, and the execution result of the business logic manipulation function is stored in a data caching device. Additionally, the method includes performing a Spring AOP caching clearing notice after the business logic manipulation function updates target data (such as appending, modifying and deleting data) and emptying data in the data caching device. According to the method, a caching function module and a business logic module are decoupled completely, a pluggable caching mechanism is achieved, and the caching function is added to or removed from the business logic manipulation function through file configuration flexibly.

Description

technical field [0001] The invention relates to the fields of computer information processing and software development, in particular to a method and system for caching function execution results based on AOP (Aspect Oriented Programming, aspect-oriented programming) technology. Background technique [0002] In the process of software development, a function is the smallest unit of a program. A large software system is composed of many functions based on certain business logic. The execution speed of the function determines the operating efficiency of the entire software system. Usually, when the function is called, the entire function body is executed from the beginning of the function according to the program logic, so as to obtain the calculation result of the entire function, which is absolutely necessary in the case of fast data changes. However, in some applications, such as system data in enterprise business systems, such as organization, personnel, and authority data...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F9/44G06F12/08G06F12/0875
Inventor 乐以长梁学勇陈永华
Owner PEKING UNIV
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Eureka Blog
Learn More
PatSnap group products