CN102117220B - Method and device for emptying data in memory - Google Patents

Method and device for emptying data in memory Download PDF

Info

Publication number
CN102117220B
CN102117220B CN200910244288.6A CN200910244288A CN102117220B CN 102117220 B CN102117220 B CN 102117220B CN 200910244288 A CN200910244288 A CN 200910244288A CN 102117220 B CN102117220 B CN 102117220B
Authority
CN
China
Prior art keywords
function
data
memory
assignment
functions
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.)
Expired - Fee Related
Application number
CN200910244288.6A
Other languages
Chinese (zh)
Other versions
CN102117220A (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.)
New Founder Holdings Development Co ltd
Founder International Beijing Co Ltd
Original Assignee
Founder International Beijing Co Ltd
Peking University Founder Group 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 Founder International Beijing Co Ltd, Peking University Founder Group Co Ltd filed Critical Founder International Beijing Co Ltd
Priority to CN200910244288.6A priority Critical patent/CN102117220B/en
Publication of CN102117220A publication Critical patent/CN102117220A/en
Application granted granted Critical
Publication of CN102117220B publication Critical patent/CN102117220B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

The invention provides a method and a device for emptying data in a memory. The method comprises the following steps: judging whether the data of the data cache type of functions stays in the memory; and invoking the functions and emptying the data of the functions stayed in the memory if the data of the data cache type of functions stays in the memory. The invention further provides a device for emptying the data in the memory, which comprises an identification unit and an assignment unit, wherein the identification unit is used for judging whether the data of the data cache type of functions stays in the memory; if the identification unit judges that the data stays, the functions are invoked, and the data of the functions staying in the memory is emptied. With the adoption of the method and device, as the functions whose data exists in the memory are automatically found out, the problem that the data of the functions is displayed on other irrelevant pages to affect the use of a customer can be effectively avoided when the functions whose data staying in the memory are invoked again, so that the use experience of a user is improved.

Description

Empty the method and apparatus of internal storage data
Technical field
The present invention relates to field of computer technology, in particular to the method and apparatus that empties internal storage data.
Background technology
In the process of software development, the kind that development language is selected is a lot, and java, JSP etc. are arranged.The philtrum that particularly uses java to develop software use the more of STRUTS exploitation framework use, and the user who uses is only second to JSP.
In using STRUTS exploitation framework, if during the shared data cache classes of several jsp pages (FORM), if after having imported data in the page of one of them jsp and submitting to, when opening other jsp pages, the data that last jsp submits to can show in this jsp page.
The reason that has such phenomenon is because the employed data of these metadata cache classes are present in internal memory, after intact these metadata cache classes of a jsp page invocation, the employed data of these metadata cache classes are still in internal memory, when other jsp page is calling these metadata cache classes, can be on other irrelevant page in the internal memory with the data presentation in internal memory of this metadata cache class, thus client's use influenced.
Summary of the invention
The present invention aims to provide a kind of method and apparatus that empties internal storage data, and it can solve in the internal memory can be with the data presentation of this metadata cache class on other irrelevant page, thereby influences client's use problem.
According to an aspect of the present invention, provide a kind of method that empties internal storage data, comprising:
Whether there is assignment function in the function of judgment data cache class;
If exist, then carry out described assignment function and give null value.
Preferably, described deterministic process comprises:
Whether the title of function of judging described metadata cache class is identical with the title of assignment function, if identical, then this function is described assignment function.
Preferably, when the number of the function of described metadata cache class is two when above, after current assignment function is carried out assign operation, also comprise:
Employing order or chain type travel through the function of next described metadata cache class, and carry out described deterministic process.
According to another aspect of the present invention, also provide a kind of device that empties internal storage data, comprising:
Whether recognition unit exists assignment function in the function of judgment data cache class;
The assignment unit is carried out described assignment function and is given null value.
Preferably, also comprise:
The traversal unit, be used for number when the function of described metadata cache class and be two when above, after assign operation was carried out with current assignment function in described assignment unit, employing order or chain type traveled through the function of next described metadata cache class, and triggered described recognition unit and carry out deterministic process.
Method and apparatus of the present invention, owing to search the function that has data in internal memory automatically, therefore, can effectively avoid resident in the internal memory has the function of data when being called once more, can be on other irrelevant page with the data presentation of this function, thus the problem of client's use influenced; Improved user's use experience.
Description of drawings
Accompanying drawing described herein is used to provide further understanding of the present invention, constitutes the application's a part, and illustrative examples of the present invention and explanation thereof are used to explain the present invention, do not constitute improper qualification of the present invention.In the accompanying drawings:
Fig. 1 shows the process flow diagram of the embodiment of the invention one;
Fig. 2 shows the process flow diagram of the embodiment of the invention two;
Fig. 3 shows the structural drawing of the embodiment of the invention three.
Embodiment
Below with reference to the accompanying drawings and in conjunction with the embodiments, describe the present invention in detail.For ease of understanding method and apparatus of the present invention.
Describe method embodiment one of the present invention in detail below in conjunction with Fig. 1, the embodiment one of the inventive method may further comprise the steps:
S11: whether have assignment function in the function of judgment data cache class;
S12:, then carry out described assignment function and give null value if exist.
Method of the present invention can realize in various Object oriented programming environment, as Java, C++ etc., providing embodiments of the invention two below, is example explanation the present invention with the ActionFORM metadata cache class in the STRUTS framework, simply introduces STRTUS exploitation framework below at first:
Struts is the ingredient of Apache Jakarta project.This project goal is for setting up the framework of increasing income that the Java web application provides.By using the Struts framework can improve and improve Java Server Pages (JSP), Servlet, tag library and the application of Object-oriented Technique in web application.Struts is a kind of realization of MVC, and it combines Jsp well, Java Servlet, JavaBean, technology such as Taglib.Visualization model controller MVC is the abbreviation of Model-View-Controller, and it is a Design Mode commonly used during Web uses.MVC has weakened the coupling between service logic interface and the data-interface, allows the view layer more be full of variety simultaneously.
The effect of controller (Controller) is to accept request from client, and selects to carry out correspondent service logic, then response results is sent back to client.Controller is realized by ActionServlet class and Action class in Struts, and ActionServlet mainly is responsible for accepting the HTTP request, and the Action class is responsible for calling the method for model, the flow process of the more state of new model, and help controlling application program.
The view layer mainly is to realize that by JSP the page shows.It receives the data among JavaBean and the Action Form, utilizes html, taglib, bean, label video datas such as logic.
In Struts, mainly there are three kinds of bean objects, be respectively: Action, ActionForm, EJB or Java Bean object.ActionForm is used for encapsulating client requests information, and Action obtains the data among the ActionForm, is handled by EJB or JavaBean again.
Because the function that data in the ActionFORM object is not emptied among the STRUTS manually empties data in the function if adopt, and can cause efficient low excessively, and can not in time empty.
Therefore, increase new function T ools.resetForm (FormName) among the embodiment two, this function can empty the data of metadata cache class in RAM resident.After this function is called, can continuous ergodic data cache class might be at each function of RAM resident data, and judge one by one that each function is whether resident in internal memory data are arranged, this function is resident in internal memory data if judge, then will call this function, give null value this function resident data value in internal memory.
Referring to Fig. 2, comprising:
S21: obtain all functions in the FORM metadata cache class,
For FORM metadata cache class, may at first obtain these functions to a plurality of functions should be arranged;
S22: each function in the traversal FORM metadata cache class;
In when traversal, the structure of arrays that returns travels through each function, or travels through according to the link structure of function, as order, chain type, tree-like etc., travels through according to the form of former method function preservation;
S23: whether first three character of the function of judgement is set;
For each function, whether there is parameter name in the discriminant function to the internal memory assignment, if exist, then carry out S24, in this embodiment, the metadata cache class is in the RAM resident data, be because it has called assignment function set, therefore, as long as function is when having the set parameter name, think that then RAM resident has data in this function; Otherwise execution in step S22 continues traversal;
S24: by invoke function call SET method, and the biography parameter value is an empty string.
Because the function itself that finds out is exactly an assignment function, therefore, directly calls execution and gets final product, and needn't use other assignment function, call and carry out this function, give null value, the data of function in internal memory are emptied.
Method of the present invention can be carried out after function call, also can carry out before function call.By method of the present invention, the data of metadata cache class in internal memory can be emptied, avoid this metadata cache time-like of other routine call, the data of this metadata cache class in internal memory appear on the page.
The present invention also provides a kind of device that empties internal storage data, referring to Fig. 3, comprising:
Whether recognition unit exists assignment function in the function of judgment data cache class;
The assignment unit is carried out described assignment function and is given null value.
Preferably, also comprise:
The traversal unit, be used for number when the function of described metadata cache class and be two when above, after assign operation was carried out with current assignment function in described assignment unit, employing order or chain type traveled through the function of next metadata cache class, and triggered described recognition unit and carry out deterministic process.
From above description, as can be seen, the present invention travels through each function, and empty the resident data of assignment function in internal memory that traveled through, avoided a plurality of page programs to call same metadata cache time-like, with the data presentation of this metadata cache class in internal memory on other irrelevant page, thereby influence client's use.
Obviously, those skilled in the art should be understood that, above-mentioned each module of the present invention or each step can realize with the general calculation device, they can concentrate on the single calculation element, perhaps be distributed on the network that a plurality of calculation element forms, alternatively, they can be realized with the executable program code of calculation element, carry out by calculation element thereby they can be stored in the memory storage, perhaps they are made into each integrated circuit modules respectively, perhaps a plurality of modules in them or step are made into the single integrated circuit module and realize.Like this, the present invention is not restricted to any specific hardware and software combination.
The above only is the preferred embodiments of the present invention; be not limited to the present invention; for a person skilled in the art, various changes and variation can be arranged, revise, be equal to replacement, improvement etc., all should be included within protection scope of the present invention the present invention.

Claims (5)

1. method that empties internal storage data, wherein, described internal storage data is metadata cache class resident data in internal memory, it is characterized in that described method comprises:
Search the function that in internal memory, has data;
Whether there is assignment function in the function of judgment data cache class;
If exist, then carry out described assignment function and give null value.
2. method according to claim 1 is characterized in that, described deterministic process comprises:
Whether the title of discriminant function is identical with the title of assignment function, if identical, then this function is described assignment function.
3. method according to claim 1 is characterized in that, after current assignment function is carried out assign operation, also comprises:
Employing order or chain type travel through next function, and carry out described deterministic process.
4. device that empties internal storage data, wherein, described internal storage data is metadata cache class resident data in internal memory, it is characterized in that described device comprises:
Search the unit, search the function that in internal memory, has data;
Whether recognition unit exists assignment function in the function of judgment data cache class;
The assignment unit is carried out described assignment function and is given null value.
5. device according to claim 4 is characterized in that, also comprises:
The traversal unit is used for number when described function and is two when above, and after assign operation was carried out with current assignment function in described assignment unit, employing order or chain type traveled through next function, and triggered described recognition unit execution deterministic process.
CN200910244288.6A 2009-12-31 2009-12-31 Method and device for emptying data in memory Expired - Fee Related CN102117220B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200910244288.6A CN102117220B (en) 2009-12-31 2009-12-31 Method and device for emptying data in memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200910244288.6A CN102117220B (en) 2009-12-31 2009-12-31 Method and device for emptying data in memory

Publications (2)

Publication Number Publication Date
CN102117220A CN102117220A (en) 2011-07-06
CN102117220B true CN102117220B (en) 2013-07-31

Family

ID=44216002

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200910244288.6A Expired - Fee Related CN102117220B (en) 2009-12-31 2009-12-31 Method and device for emptying data in memory

Country Status (1)

Country Link
CN (1) CN102117220B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101039332A (en) * 2007-03-15 2007-09-19 华为技术有限公司 Method, system and server for transmitting page data

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101039332A (en) * 2007-03-15 2007-09-19 华为技术有限公司 Method, system and server for transmitting page data

Also Published As

Publication number Publication date
CN102117220A (en) 2011-07-06

Similar Documents

Publication Publication Date Title
US9753706B2 (en) Adding directives for versions of source files directly into source code
US7937670B2 (en) Data sharing system, method and software tool
US20160260182A1 (en) Use of stored search results by a travel search system
US8738735B2 (en) System for designing and performing web application
CN105094754B (en) Program developing method, page request response method and its device based on label
CN110442816A (en) Web form configuration method, device and computer readable storage medium
US8543713B2 (en) Computing environment arranged to support predetermined URL patterns
JP2019503538A (en) Method and apparatus for presenting interface data
US20090276764A1 (en) High-level hypermedia synthesis for adaptive web
CN111459503B (en) Web front-end project deployment method, device, server and storage medium
US20070204216A1 (en) System and method for creating layouts using a layout editor
CN109144493A (en) Generation method, electronic device and the readable storage medium storing program for executing of business rule
CN110276074B (en) Distributed training method, device, equipment and storage medium for natural language processing
CN108008944A (en) Regulation engine response method and system, regulation engine, service terminal, memory
CN101739442A (en) System and method for displaying information
CN101185303A (en) System and method for creating a mapping document for binding messages between an application and an associated backend server
CN103744680A (en) Method and device for business process processing
US7996840B2 (en) Method, system, and apparatus for scheduling pattern based web services
US20150149888A1 (en) Systems and methods for executing aspects of a document
US7877434B2 (en) Method, system and apparatus for presenting forms and publishing form data
CN105743955A (en) Method for JavaScript object expansion
CN100492360C (en) Method and system for webpage generation
US20050108388A1 (en) Method, system, and apparatus for scheduling pattern based web services
CN101300559A (en) Extensible remote tag markup system and method
CN103559097B (en) The method of interprocess communication, device and browser in a kind of browser

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20220916

Address after: 3007, Hengqin international financial center building, No. 58, Huajin street, Hengqin new area, Zhuhai, Guangdong 519031

Patentee after: New founder holdings development Co.,Ltd.

Patentee after: Founder International Co.,Ltd. (Beijing)

Address before: 100871, Haidian District Fangzheng Road, Beijing, Zhongguancun Fangzheng building,, 5F

Patentee before: PEKING UNIVERSITY FOUNDER GROUP Co.,Ltd.

Patentee before: Founder International Co.,Ltd. (Beijing)

TR01 Transfer of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20130731

CF01 Termination of patent right due to non-payment of annual fee