CN109343860A - A kind of method, apparatus, server and medium for clearing up Game patches - Google Patents

A kind of method, apparatus, server and medium for clearing up Game patches Download PDF

Info

Publication number
CN109343860A
CN109343860A CN201810965688.5A CN201810965688A CN109343860A CN 109343860 A CN109343860 A CN 109343860A CN 201810965688 A CN201810965688 A CN 201810965688A CN 109343860 A CN109343860 A CN 109343860A
Authority
CN
China
Prior art keywords
node
version number
patch file
markup language
extensible markup
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
CN201810965688.5A
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201810965688.5A priority Critical patent/CN109343860A/en
Publication of CN109343860A publication Critical patent/CN109343860A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/62Uninstallation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Abstract

The invention discloses a kind of method, apparatus, server and media for clearing up Game patches, which comprises calls scanning engine;End of scan, to obtain the patch file of Games Software;Determine the version number of the version number of patch file got and the currently used patch file of the Games Software;When the version number of the patch file got is less than or equal to the version number of the currently used patch file of the Games Software, the patch file that is got described in cleaning.Scanning engine is called, the patch file of Games Software is obtained by end of scan, using version number's comparison, clears up expired patch file.It solves the problems, such as to leak clear, mistake is clear etc. when cleaning patch file, releases the memory space of terminal, be supplied to the better use environment of user.Expansible and efficient characteristic is realized using scanning engine, more flexible function can be improved and be safeguarded in the exploitation link to cleaning Game patches.

Description

A kind of method, apparatus, server and medium for clearing up Game patches
Technical field
The present invention relates to field of computer technology more particularly to it is a kind of clear up the method, apparatus of Game patches, server and Medium.
Background technique
With the fast development of computer and Internet technology, user is using whole such as smart phone, tablet computer During end, it will use various softwares to realize respective function, software may include system software and application software etc..It is soft Part will appear BUG (defect, program bug etc.) unavoidably, patch is special production to repair these BUG, with to software by Walk perfect, the patch of terminal downloads is also more and more.
Game products can correct BUG by frequently providing Game patches, and adjustment improves game content, improves user's Usage experience.Not only output is frequently but also often file is larger for Game patches, can occupy a large amount of memory space of terminal.In addition It is easy also to clean out also uninstalled Game patches when clearing up Game patches, it is also possible to it is expired not clean up those , the Game patches that should be cleaned, these all affect user terminal play game experience.Meanwhile cleaning game is mended The development of fourth also can use and feed back etc. constantly perfect with software, certainly will need to clear up the exploitation ring of Game patches Section has efficient and flexible property.
Summary of the invention
Apply the cleaning in Game patches cleaning inaccurate and to cleaning Game patches to solve the prior art Link Efficiency low the problem of waiting are developed, the present invention provides a kind of method, apparatus, server and media for clearing up Game patches:
In a first aspect, the present invention provides a kind of methods for clearing up Game patches, which comprises
Call scanning engine;
End of scan, to obtain the patch file of Games Software;
Determine the version number of the version number of patch file got and the currently used patch file of the Games Software;
When the version number of the patch file got is less than or equal to the currently used patch text of the Games Software When the version number of part, the patch file that is got described in cleaning.
Second aspect provides a kind of device for clearing up Game patches, and described device includes:
Calling module: for calling scanning engine;
Scan module: it is used for end of scan, to obtain the patch file of Games Software;
Version number's determining module: the version number and the Games Software for determining the patch file got are currently used Patch file version number;
Cleaning modul: it is current that the version number of the patch file for getting described in is less than or equal to the Games Software When the version number of the patch file used, the patch file that is got described in cleaning.
The third aspect provides a kind of server, and the server includes processor and memory, deposits in the memory Contain at least one instruction, at least one section of program, code set or instruction set, at least one instruction, at least one section of journey Sequence, the code set or instruction set are loaded by the processor and are executed to realize cleaning Game patches as described in relation to the first aspect Method.
Fourth aspect provides a kind of computer readable storage medium, and at least one finger is stored in the storage medium Enable, at least one section of program, code set or instruction set, at least one instruction, at least one section of program, the code set or The method that instruction set is loaded by processor and executed to realize cleaning Game patches as described in relation to the first aspect.
A kind of method, apparatus, server and medium for clearing up Game patches provided by the invention, has following technology effect Fruit:
The present invention calls scanning engine, and the patch file of Games Software is obtained by end of scan, utilizes pair of version number Than, the expired patch file of cleaning.It solves the problems, such as to leak clear, mistake is clear etc. when cleaning patch file, releases the storage of terminal Space is supplied to the better use environment of user.Expansible and efficient characteristic is realized using scanning engine, and developer is right Clearing up in the exploitation link of Game patches more flexible can be improved and be safeguarded to function.
Detailed description of the invention
It in order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology and advantage, below will be to implementation Example or attached drawing needed to be used in the description of the prior art are briefly described, it should be apparent that, the accompanying drawings in the following description is only It is only some embodiments of the present invention, for those of ordinary skill in the art, without creative efforts, It can also be obtained according to these attached drawings other attached drawings.
Fig. 1 is a kind of schematic diagram of application environment provided in an embodiment of the present invention;
Fig. 2 is a kind of flow diagram of method for clearing up Game patches provided in an embodiment of the present invention;
Fig. 3 be the patch file that determination provided in an embodiment of the present invention is got version number and the Games Software it is current A kind of flow diagram of the version number of the patch file used;
Fig. 4 is provided in an embodiment of the present invention by the matched a kind of process signal of parsing result and the progress of the first keyword Figure;
Fig. 5 is also that the version number for the patch file that determination provided in an embodiment of the present invention is got and the Games Software are worked as A kind of flow diagram of the version number of the preceding patch file used;
Fig. 6 is provided in an embodiment of the present invention the parsing result and the second keyword are carried out a kind of matched process to show It is intended to;
Fig. 7 is also a kind of flow diagram of method for clearing up Game patches provided in an embodiment of the present invention;
Fig. 8 is a kind of composition block diagram of device for clearing up Game patches provided in an embodiment of the present invention;
Fig. 9 is the composition block diagram of scan module provided in an embodiment of the present invention;
Figure 10 is the composition block diagram of version number's determining module provided in an embodiment of the present invention;
Figure 11 is a kind of structural schematic diagram of server provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, those of ordinary skill in the art without making creative work it is obtained it is all its His embodiment, shall fall within the protection scope of the present invention.
It should be noted that term " includes " and " tool in description and claims of this specification and above-mentioned attached drawing Have " and their any deformation, it is intended that cover it is non-exclusive include, for example, containing a series of steps or units Process, method, system, product or server those of are not necessarily limited to be clearly listed step or unit, but may include not having Other step or units being clearly listed or intrinsic for these process, methods, product or equipment.
Referring to Fig. 1, Fig. 1 is a kind of schematic diagram of application environment provided in an embodiment of the present invention, as shown in Figure 1, this is answered It can be used as an application program with the device for clearing up patch in environment to be present in terminal, for example can be cleaning engine.Clearly Reason engine can have the multiple functions including cleaning patch, such as cleaning caching, cleaning installation kit, the invalid registration of cleaning Invalid temporary file, the clearing and retrieving station rubbish, cleaning system that table information, cleaning computer are generated using trace, cleaning software operation Temporary file, cleaning system cache file, cleaning malicious plugins, cleaning unite more than downloading file of certain time etc..Cleaning is drawn It holds up and calls scanning engine, load scan script by scanning engine Lai the scanning of the memory space of complete paired terminal.It needs to illustrate It is that Fig. 1 is only a kind of example.
In embodiments of the present invention, cleaning engine calling scanning engine is for clearing up expired Game patches.Game patches (patch file) is usually exe (executable program, executable program) file etc., and Game patches after operation can be certainly The resource inside release is moved into the specified directory of game file, can be newly-increased module, replace old module etc., adjustment changes Kind game content, improves the usage experience of user.In game file, Game patches by extensible markup language (XML, Extensible Markup Language) file carries out the record to each version number.Extensible markup language document Chang You It is used as configuration file in actor's part or lines part, multiple extensible markup language documents can occurs in game file, in the storage to terminal The configuration file for needing to obtain the version number of record patch file in the scanning in space is recording matching for the version number of patch file Set the storage location that also will record patch file in file.The embodiment of the present invention passes through some filtering rules such as exe file type It obtains Game patches for clearance, then passes through parsing to extensible markup language document in corresponding game file and keyword Matching is accurately obtained the version number of Game patches, compares by the version number of the patch file currently used with Games Software, Complete the cleaning to expired Game patches.The interval of game products output Game patches is short, Game patches occupies memory space It is larger, in practical applications, the period cleared up Game patches can be set, it is more expired than that can clean up in time as such Game patches.
For the present invention introduced below to the method for terminal storage space cleaning Game patches, Fig. 2,7 are that the embodiment of the present invention mentions A kind of flow diagram of the method for the cleaning Game patches supplied, present description provides the sides as described in embodiment or flow chart Method operating procedure, but based on routine or may include more or less operating procedure without creative labor.Embodiment In the step of enumerating sequence be only one of numerous step execution sequences mode, do not represent and unique execute sequence.In reality When system or server product in border execute, it can be executed according to embodiment or method shown in the drawings sequence or parallel It executes (such as environment of parallel processor or multiple threads).Specifically as shown in Fig. 2,7, the method may include:
S201: scanning engine is called;
Scanning engine can use Lua engine, a kind of python (explanation type computer program design language of object-oriented Speech) engine etc., by the corresponding script of the loads such as Lua engine, python engine.
Lua is a small and exquisite scripting language, and the purpose of design of the language is in order to be embedded in application program, thus to answer Flexible extension and customization function are provided with program.There is the modernizations machine such as garbage collection, reflection, object-oriented in Lua script System, efficiency are very high.Lua language has following characteristics: lightweight configuration language;Extensible language, it is often embedding without program entry Enter a host program job.Host program can by variable transferring to Lua script, otherwise can also be with.Both sides can be with simultaneously The code snippet of other side is called mutually.In embodiments of the present invention, it is adjusted by the device of cleaning Game patches (such as cleaning engine) With Lua engine.Lua engine after compiling only has the volume of more than 100 KB, and Lua engine is abandoned pursuing large and complete built-in library Function and main target is concentrated on into succinct code ingeniously in quick execution efficiency.There are three main function moulds for Lua engine Block: data structure functional module, script execution module (nucleus module) and built-in library module.
The scan script of the scanning engine binding is loaded, the Lua engine is by Lua script processing for described in confession The interface of Lua engine Complied executing, the Lua engine calling scanning function to the interface are swept by loading the Lua script Retouch the memory space of terminal.Specifically, Lua engine supplies the processing of Lua script according to the virtual machine form based on register The interface of Lua engine Complied executing, by the good rule of data deposit Lua engine definitions, data include the related letter such as context Breath, language version, parameter, function name, filename etc., these data are stored in corresponding data structure.As shown in Figure 1, described Scanning function be exist and cleaning engine in a function for realizing scanning, except of course that scanning function can be with there are also other It is scanned the power function or other that script calls.
S202: end of scan, to obtain the patch file of Games Software;
Specifically, load cleaning Game patches configuration file -> according to the scanning element of configuration file establish a task pool -> (thread opens a scan task, according to the catalogue of profile information end of scan memory space, according to matching for multithreading scanning The filtering rule for setting file will be defined as the file information of patch and be loaded into memory) notice cleaning engine is swept after the completion of -> scanning The process of retouching terminates, and obtains internal storage data.
In embodiments of the present invention, the patch file of Games Software is usually that (executable program can be held exe Line program) file etc., pass through the patch file of the available Games Software of some filtering rules such as exe file type.Scanning is eventually It holds the filtering rule of the catalogue of memory space can be with good grounds game attributes, for example there is the title of game characteristic: Game (game), LOL (a kind of specific game) etc..It can be traversed using recursive function when scanning the catalogue of memory space.? It can be traversed, be stated: walk (top, func, arg) by os.path.walk (), wherein parameter top indicates needs time The path for the directory tree gone through, parameter func indicate call back function, handle traverse path.The call back function is conduct The parameter of some function uses, and when some time trigger, the call back function that routine call defines handles some task, readjustment Function must provide three parameters, and first parameter is the parameter arg of walk (), and second parameter is directory listing, third Parameter indicates listed files, and parameter arg is the first ancestral for passing to call back function, can be empty tuple.It can also pass through Os.walk () is traversed, and os module also provides the traversal of walk () for catalogue, similar with os.path.walk (). But effect is higher, and does not need call back function, be easier to using.Statement: walk (top, topdown=True, onerror= None), wherein parameter top indicates the path of the directory tree needed to be traversed for;Parameter topdown default value is True, is indicated first File under Returning catalogue tree and then the subdirectory under traversing directories tree;Parameter topdown value is False, then it represents that first time It goes through the subdirectory under directory tree, return to the file under subdirectory, then return to the file under root;Parameter onerror's is silent Recognizing value is None, indicates the mistake generated when ignoring file traversal, if being not sky, needing to provide a customized function table Continue termination traversal after traversal or throw exception after showing error message, which returns to a tuple, which there are 3 members Element is the pathname, directory listing and listed files traversed every time respectively.
S203: the version of the version number of patch file got and the currently used patch file of the Games Software is determined This number;
As shown in Fig. 3,5, the version number of patch file got and the currently used patch of the Games Software are determined The step of version number of file, comprising:
S301: extensible markup language document is obtained;
In game file, Game patches passes through extensible markup language (XML, Extensible Markup Language) File carries out the record to each version number.Extensible markup language document is often used as configuration file, game text in game file Can occur multiple extensible markup language documents in part.Record the extensible markup language text of the version number of the patch file Part can show as mmog_data.xml.
S302: the extensible markup language document is parsed;
Parsing to extensible markup language document can be parsed using SAX, SAX (simpleAPI forXML) parsing It is a kind of alternative of XML parsing.Compared to DOM (XML is converted to the accessible object of JavaScript), SAX is one Kind of speed is faster, committed memory is smaller, more effective way.It progressively scans document, parses while scanning.And it compares It can stop parsing in any time of parsing document in DOM, SAX.SAX analysis mode is carried out based on event driven mode , at the time of specific (such as read element starts Start ElementEvent, element terminates End ElementEvent, When text character Characters Event) the relevant event of triggering carries out processing work.
S303: parsing result is matched with the first keyword, and first keyword is directed toward the patch file;
As shown in figure 4, the step of parsing result is matched with the first keyword, comprising:
S401: establishing extensible markup language tree, and the extensible markup language tree includes multiple nodes;
Processing majority for XML file is realized based on the parsing to XML tree.It is several in XML tree, including in this way The node of type: node element (ElementNode), each node element has a label (tag), without textual value;Belong to Property node (Attribute Node), each attribute node has a label, also there is textual value, during the treatment for letter Change, attribute node can be regarded to node element as to handle;Text node (TextNode), each text node do not have label, Only textual value.
S402: the extensible markup language tree traversed by the preamble of bottom to top layer;
According to the definition of SLCA (Smallest Lowest CommonAncestor, minimum last common ancestor), SLCA Node needs to meet two such condition: (1) all keywords appear in the descendant nodes that this node is root, and (2) any descendant nodes of the node are all unsatisfactory for condition (1).So, descendants can preferentially be selected when equally meeting condition (1) Node is as SLCA node.Therefore, when parsing XML file, by the node in the preamble traversal tree of bottom to top layer.
S403: establishing the data base of corresponding first keyword, and the data base stores the institute that current preamble traverses State the information of node, the information of the node includes location information of the node in the extensible markup language tree, institute State node number and the node whether include first keyword record information;
Each of data base entrance is a nodal information.The node whether include first keyword note Record information may be local record's information (only recording the information that present node includes the first keyword) during processing, when connecing Receiving will be updated into present node after the record information of child node and completely records information (recording whole stalk tree includes the first pass The information of keyword).
In embodiments of the present invention, the first keyword can be including one or more in Patch, Patchs and patch etc. It is a, it is only an example here certainly.
S304: when the parsing result and first Keywords matching, the extensible markup language document is determined For record the patch file version number configuration file;
When node is minimum last common ancestor node, determine that the extensible markup language document is the patch text Part.As soon as according to the semantic feature of SLCA it is found that if there is SLCA node in the descendants of XML node, then this node is not It can be SLCA node.In SAX parsing, retain a nodal information for each XML node.When XML file preamble traversal When, the information stacking of all nodes traversed.When descendants's node processing terminates, the information of descendant nodes can pass to higher level Node updates the information in stack, timely feedbacks once finding SLCA node.
S305: the parsing result is matched with the second keyword, and second keyword is directed toward the version number;
As shown in fig. 6, the step of parsing result is matched with the second keyword, comprising:
S501: establishing extensible markup language tree, and the extensible markup language tree includes multiple nodes;
Processing majority for XML file is realized based on the parsing to XML tree.It is several in XML tree, including in this way The node of type: node element (Element Node), each node element has a label (tag), without textual value;Belong to Property node (Attribute Node), each attribute node has a label, also there is textual value, during the treatment for letter Change, attribute node can be regarded to node element as to handle;Text node (Text Node), each text node does not have label, Only textual value.
S502: the extensible markup language tree traversed by the preamble of bottom to top layer;
According to the definition of SLCA (Smallest Lowest Common Ancestor, minimum last common ancestor), SLCA Node needs to meet two such condition: (1) all keywords appear in the descendant nodes that this node is root, and (2) any descendant nodes of the node are all unsatisfactory for condition (1).So, descendants can preferentially be selected when equally meeting condition (1) Node is as SLCA node.Therefore, when parsing XML file, by the node in the preamble traversal tree of bottom to top layer.
S503: establishing the data base of corresponding second keyword, and the data base stores the institute that current preamble traverses State the information of node, the information of the node includes location information of the node in the extensible markup language tree, institute State node number and the node whether include second keyword record information;
Each of data base entrance is a nodal information.The node whether include second keyword note Record information may be local record's information (only recording the information that present node includes the second keyword) during processing, when connecing Receiving will be updated into present node after the record information of child node and completely records information (recording whole stalk tree includes the second pass The information of keyword).
In embodiments of the present invention, the second keyword can be including one or more of version, V and version etc., It certainly is only an example here.In addition, here can be by obtaining version number for different game configuration strategies.Than Such as, the title of the corresponding patch file of different game is different, but the name of the patch file of the same game has centainly The title of rule, resolution patch file can be obtained version number.
S306: when the parsing result and second Keywords matching, the version of the patch file is determined Number.
When node is minimum last common ancestor node, the version number of the patch file is determined.
According to the semantic feature of SLCA it is found that if there is SLCA node in the descendants of an XML node, this node It cannot be SLCA node.
In SAX parsing, retain a nodal information for each XML node.When XML file preamble traversal, The information stacking of all nodes traversed.When descendants's node processing terminates, the information of descendant nodes can pass to superior node The information in stack is updated, is timely feedbacked once finding SLCA node.
S204: when the version number of the patch file got is less than or equal to the currently used benefit of the Games Software When the version number of fourth file, the patch file that is got described in cleaning.
If the version number of the patch file got is less than the version of the currently used patch file of the Games Software This number, then the patch file got is expired patch;If the version number of the patch file got is equal to described The version number of the currently used patch file of Games Software, then the patch file got was installed, was also Phase patch.
Specifically, establishing a clean-up task pond -> multithreading cleaning (thread unlatching one according to the internal storage data of scanning Clean-up task, the file path traversed in memory take file handle, and the file of calling system is deleted) -> complete cleaning times Business.
S205: in response to the trigger event of the patch file got described in cleaning, interaction page is pushed into man-machine friendship Mutual interface is shown.
When completing the cleaning to expired patch file in preset time range, interaction page will be shown in people On machine interactive interface.
In a possible embodiment, interaction page can be user and obtain virtual objects and use the virtual object Product.For example, cleaning engine will be from server when user logs in cleaning engine daily and carries out expired patch file cleaning One public good " love " (virtual objects) of request, then user, which can click, contributes oneself same day because obtained by cleaning behavior " love ", be accumulated to it is current activity contribute sum in, applied after current period activity end according to completeness non-profit foundation, come It puts into corresponding public good action.
Specifically, cleaning engine obtains action message for display;It receives and is protected in the memory space of user's cleaning terminal The instruction of the expired patch file for the software deposited obtains virtual objects;Receive the donations information that server is sent, the donations letter Breath carries the purpose and donations entrance of the action message, donates the virtual objects by the donations entrance, user;It rings The operations of the virtual objects should be donated in user, show the donations record of user.
Firstly, the step of obtaining action message for display includes: the activity mark for obtaining the action message (Active ID);Inquiry whether there is the corresponding data of the action message;If it does not exist, it is identified according to the activity (Active ID) obtains the corresponding data of the action message;Parse the corresponding data of the action message.
Cleaning engine is communicated with two servers respectively, and one is data server (passing through communication identifier), and one It is Resource Server (being identified by activity).If clearing up engine during activity, when needing to show different action messages, need It looks for Resource Server to obtain the corresponding data of action message, clears up engine parsing corresponding data then to show current activity Information.
Clearing up in the infrastructure component of engine has a set of switchgear distribution system, can be done according to the switch value of configuration relevant Logical process.Movable activity mark is pulled using switching mechanism, cleaning Resource Server request is then gone according to activity mark Corresponding resource.One Active ID of activity can be all given when each phase activity, then named according to this Active ID Resource packet, resource packs perform after can upload to resource management platform, cleaning engine can according to this Active ID come The corresponding resource file of downloading is pulled to local directory, can normally show operation position content after having parsed resource packet.
Certain resource is pulled and can also be pulled with idle to improve efficiency, or is done the pre- of resource according to movable waiting and issued Etc. logics, achieve the purpose that activity at the beginning at once can all be shown in user side.
Wherein, the step of parsing the corresponding data of the action message includes: the communication for obtaining the action message later Mark;Whether expired inquire the action message;If expired, action message for display is hidden;If showing institute without expired State action message.
Activity has certain movable time limit, need to do after activity end donations data clearing, then it is movable it is expired after Clear up engine would not again show activity information and donations information.Because the activity data of each phase be all it is independent, clearly Reason engine needs to arrange one with the communication of data server and communicates ID (communication identifier), every time movable different this communication ID It can change accordingly.This communication ID can be configured by above-mentioned switchgear distribution system, wait cleaning engine to pull logical After believing ID, so that it may be communicated according to this communication ID with data server.In this way using automatic offline logic, reduce people The excessive intervention of work.
Meanwhile with the several rules of the communication protocol of data server, data server can be when each activity be online The effective time range of the corresponding communication ID of regulation is waited, it, from the background will be to cleaning engine if the time is not within this range Notify it is expired, cleaning engine learn it is expired after corresponding operation position will be hidden, at the same time cleaning engine can discard This switch value requested, allows its not revival.
Then, receiving user and clearing up the instruction of optimization client, obtain the step of virtual objects includes: to identify stepping on for user Record account;The operation of report of user cleaning optimization client, the cleaning for receiving server transmission report label;Obtain virtual object Product.
User logs in cleaning engine or client associated with cleaning engine, webpage etc., can generate user's identification TOKEN (token), data server according to this TOKEN as database main KEY (database key, refer to one column or The combination of multiple row, value can uniquely identify every a line in table, by it can enforced table entity integrity.Major key is mainly External key association and the modification and deletion of this record for other tables) come a group organization data, all CS (Client- Server, client is to server-side) agreement request can carry TOKEN carry out coded communication.
After user has carried out primary cleaning, be notified that data server has been completed primary cleaning, this when number It can be decided whether to generate a love label to be donated according to the same day behavioral data of this user according to server.If the same day Donations were not reported, love label to be donated just is generated.
Wherein, the step of operation of report of user cleaning optimization client includes: within a preset time, receives server hair That send reports label to be changed to not clear up the instruction for reporting label cleaning.
Data server can be not clear up in the flag bit that daily 0 point or other times section will be updated each user Report waits engine for clearance to send cleaning and reports.
Then, the step of receiving the donations information that server is sent includes: user's donations void in inquiry preset time The state of quasi- article;If user is in the state wait donate the virtual objects, the donations information that server is sent is received;
After completing clean-up task or when engine is cleared up in starting, cleaning engine can send an inquiry request to backstage, look into Whether have love can donate, data server is according to whether in the presence of wait donate label, to notify cleaning engine to have love can if asking With donations.If notice has love that can donate, cleaning engine will receive the donations information of server transmission.Data server The behavior for whether there are donations is made a decision according to the behavior on each TOKEN same day.
Finally, the step of donating the operation of the virtual objects in response to user, showing the donations record of user, comprising: The request for donating the virtual objects is sent to server;The user for receiving server transmission, which is in, has donated the virtual objects State instruction.
Cleaning engine will receive the donations information of server transmission, and the donations information carries the action message Purpose and donations entrance donate the virtual objects by the donations entrance, user.It will if user clicks donations button Love donation in this day is gone out, and cleaning, which should ask, to send donation requests to data server, allow data server by this user to Donations marker bit, which is changed into, have been donated, and indicates that this user has been completed this donations.
Certainly, about the logic of donations can also be packaged into a card module cleaning engine in use.
By above this specification embodiment publication technical solution as it can be seen that in this specification embodiment call scanning engine, The scan script for loading the scanning engine binding, the patch file of Games Software is obtained by end of scan, utilizes version number Comparison, the expired patch file of cleaning.It solves the problems, such as to leak clear, mistake is clear etc. when cleaning patch file, releases terminal Memory space is supplied to the better use environment of user.Expansible and efficient characteristic, developer are realized using scanning engine More flexible function can be improved and be safeguarded in the exploitation link to cleaning Game patches.The present invention is to normal simultaneously The extensible markup language document for the recording game patch release number seen is parsed, and is avoided the intermediate result of redundancy, is directly obtained To SLCA node.It does not need the complicated index structure of construction yet, to reduce the time complexity of whole system.It improves It is convenient and efficient to the accuracy of the patch file for the corresponding version that corresponding Game patches is obtained, confirmed under demand.This hair It is bright to be shown by the action triggers interaction page of cleaning Game patches in human-computer interaction interface, promote the device of cleaning Game patches The utilization rate and permeability of function.
The embodiment of the present invention has also issued a kind of device 80 for clearing up Game patches, as shown in figure 8, described device includes:
Calling module 81: for calling scanning engine;
Scan module 82: it is used for end of scan, to obtain the patch file of Games Software;
Version number's determining module 83: version number and the Games Software for determining the patch file got currently make The version number of patch file;Version number's determining module 83 includes: acquiring unit 831: for obtaining extensible markup Language file;Resolution unit 832: for being parsed to the extensible markup language document;First matching unit 833: it uses In matching parsing result with the first keyword, first keyword is directed toward the patch file;First matching Unit 833 includes: that the first tree construction establishes subelement: for establishing extensible markup language tree, the extensible markup language Tree includes multiple nodes;First traversal subelement: before carrying out the extensible markup language tree by bottom to top layer Sequence traversal;First data base establishes subelement: for establishing the data base of corresponding first keyword, the data base storage The information for the node that current preamble traverses, the information of the node includes the node in the extensible markup language The number of location information, the node in tree and the node whether include first keyword record information;It mends Fourth document determining unit 824: for determining the extensible markup when the parsing result and first Keywords matching Language file is the configuration file for recording the version number of the patch file;The patch file determination unit 824 includes: patch File determines subelement, for determining the extensible markup language document when node is minimum last common ancestor node For record the patch file version number configuration file;Second matching unit 835: it is used for the parsing result and second Keyword is matched, and second keyword is directed toward the version number;Second matching unit 835 includes: the second tree knot Construct vertical subelement: for establishing extensible markup language tree, the extensible markup language tree includes multiple nodes;Second time Go through subelement: for traversed by the preamble of bottom to top layer to the extensible markup language tree;Second data base is established Subelement: for establishing the data base of corresponding second keyword, the data base store current preamble traverse it is described The information of node, the information of the node includes location information of the node in the extensible markup language tree, described The number of node and the node whether include second keyword record information;Version number's determination unit 836: it is used for When the parsing result and second Keywords matching, the version number of the patch file is determined;The version number Determination unit 832 includes: that version number determines subelement, described in determining when node is minimum last common ancestor node The version number of patch file.
Cleaning modul 84: for working as when the version number of the patch file got is less than or equal to the Games Software When the version number of the preceding patch file used, the patch file that is got described in cleaning.
Pushing module: for the trigger event of the patch file in response to being got described in cleaning, interaction page is pushed It is shown to human-computer interaction interface.
It should be noted that the apparatus and method embodiment in described device embodiment is based on same inventive concept.
The embodiment of the invention provides a kind of server, which includes processor and memory, is deposited in the memory At least one instruction, at least one section of program, code set or instruction set are contained, which at least one section of program, is somebody's turn to do Code set or instruction set are loaded as the processor and are executed to realize and clear up Game patches as provided by above method embodiment Method.
Memory can be used for storing software program and module, and processor is stored in the software program of memory by operation And module, thereby executing various function application and data processing.Memory can mainly include storing program area and storage number According to area, wherein storing program area can application program needed for storage program area, function etc.;Storage data area can store basis The equipment uses created data etc..In addition, memory may include high-speed random access memory, can also include Nonvolatile memory, for example, at least a disk memory, flush memory device or other volatile solid-state parts.Phase Ying Di, memory can also include Memory Controller, to provide access of the processor to memory.
The embodiment of the invention also provides a kind of structural schematic diagrams of server, referring to Fig. 10, the server 1000 is used In the method for the cleaning Game patches for implementing to provide in above-described embodiment.The server 1000 can be produced because configuration or performance are different Raw bigger difference, may include one or more central processing units (Central Processing Units, CPU) 1010 (for example, one or more processors) and memory 1030, one or more storage application programs 1023 or The storage medium 1020 (such as one or more mass memory units) of data 1022.Wherein, memory 1030 and storage Medium 1020 can be of short duration storage or persistent storage.Be stored in storage medium 1020 program may include one or one with Upper module, each module may include to the series of instructions operation in server.Further, central processing unit 1010 can To be set as communicating with storage medium 1020, the series of instructions operation in storage medium 1020 is executed on server 1000. Server 1000 can also include one or more power supplys 1060, one or more wired or wireless network interfaces 1050, one or more input/output interfaces 1040, and/or, one or more operating systems 1021, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM etc..
The embodiments of the present invention also provide a kind of storage medium, the storage medium be may be disposed among server to protect Deposit for realizing in embodiment of the method it is a kind of clear up relevant at least one instruction of method of Game patches, at least one section of program, Code set or instruction set, at least one instruction, at least one section of program, the code set or instruction set are loaded simultaneously by the processor for this Execute the method to realize the cleaning Game patches of above method embodiment offer.
By method, apparatus, server and the medium of a kind of cleaning Game patches that aforementioned present invention provides, scanning is called to draw It holds up, the patch file of Games Software is obtained by end of scan, utilize the patch file that the comparison of version number, cleaning are expired.Solution Determined cleaning patch file when leakage is clear, wrong clear etc. problem, release the memory space of terminal, be supplied to user and preferably use Environment.Expansible and efficient characteristic is realized using scanning engine, and developer is in the exploitation link to cleaning Game patches More flexible function can be improved and be safeguarded.
It should be understood that embodiments of the present invention sequencing is for illustration only, do not represent the advantages or disadvantages of the embodiments. And above-mentioned this specification specific embodiment is described.Other embodiments are within the scope of the appended claims.One In a little situations, the movement recorded in detail in the claims or step can be executed according to the sequence being different from embodiment and Still desired result may be implemented.In addition, process depicted in the drawing not necessarily requires the particular order shown or company Continuous sequence is just able to achieve desired result.In some embodiments, multitasking and parallel processing it is also possible or It may be advantageous.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for system and For server example, since it is substantially similar to the method embodiment, so being described relatively simple, related place is referring to side The part of method embodiment illustrates.
Those of ordinary skill in the art will appreciate that realizing that all or part of the steps of above-described embodiment can pass through hardware It completes, relevant hardware can also be instructed to complete by program, the program can store in a kind of computer-readable In storage medium, storage medium mentioned above can be read-only memory, disk or CD etc..
The foregoing is merely presently preferred embodiments of the present invention, is not intended to limit the invention, it is all in spirit of the invention and Within principle, any modification, equivalent replacement, improvement and so on be should all be included in the protection scope of the present invention.

Claims (12)

1. a kind of method for clearing up Game patches, which is characterized in that the described method includes:
Call scanning engine;
End of scan, to obtain the patch file of Games Software;
Determine the version number of the version number of patch file got and the currently used patch file of the Games Software;
When the version number of the patch file got is less than or equal to the currently used patch file of the Games Software When version number, the patch file that is got described in cleaning.
2. the method according to claim 1, wherein the version number and institute of the patch file that the determination is got The step of stating the version number of the currently used patch file of Games Software, comprising:
Obtain extensible markup language document;
The extensible markup language document is parsed;
Parsing result is matched with the first keyword, first keyword is directed toward the patch file;
When the parsing result and first Keywords matching, determine the extensible markup language document for described in record The configuration file of the version number of patch file.
3. according to the method described in claim 2, it is characterized in that, described that parsing result and the progress of the first keyword is matched Step, comprising:
Extensible markup language tree is established, the extensible markup language tree includes multiple nodes;
The extensible markup language tree traversed by the preamble of bottom to top layer;
The data base of corresponding first keyword is established, the data base stores the letter for the node that current preamble traverses Breath, the information of the node include the volume of location information of the node in the extensible markup language tree, the node Number and the node whether include first keyword record information;
When the parsing result and first Keywords matching, determine the extensible markup language document for described in record The step of configuration file of the version number of patch file, comprising:
When node is minimum last common ancestor node, determine that the extensible markup language document is to record the patch text The configuration file of the version number of part.
4. according to any method of claim 2-3, which is characterized in that described to be closed when the parsing result with described first When keyword matches, determine that the extensible markup language document is the step for recording the configuration file of version number of the patch file After rapid, comprising:
The parsing result is matched with the second keyword, second keyword is directed toward the version number;
When the parsing result and second Keywords matching, the version number of the patch file is determined.
5. according to the method described in claim 4, it is characterized in that, described by the parsing result and the progress of the second keyword With the step of, comprising:
Extensible markup language tree is established, the extensible markup language tree includes multiple nodes;
The extensible markup language tree traversed by the preamble of bottom to top layer;
The data base of corresponding second keyword is established, the data base stores the letter for the node that current preamble traverses Breath, the information of the node include the volume of location information of the node in the extensible markup language tree, the node Number and the node whether include second keyword record information;
When the parsing result and when second Keywords matching, the step of determining the version number of the patch file, Include:
When node is minimum last common ancestor node, the version number of the patch file is determined.
6. a kind of device for clearing up Game patches, which is characterized in that described device includes:
Calling module: for calling scanning engine;
Scan module: it is used for end of scan, to obtain the patch file of Games Software;
Version number's determining module: for determining the currently used benefit of the version number and the Games Software of the patch file got The version number of fourth file;
Cleaning modul: it is currently used that the version number of the patch file for getting described in is less than or equal to the Games Software Patch file version number when, the patch file that gets described in cleaning.
7. device according to claim 6, which is characterized in that version number's determining module includes:
Acquiring unit: for obtaining extensible markup language document;
Resolution unit: for being parsed to the extensible markup language document;
First matching unit: for matching parsing result with the first keyword, first keyword is directed toward the benefit Fourth file;
Configuration file determination unit: for determining described expansible when the parsing result and first Keywords matching Making language document is the configuration file for recording the version number of the patch file.
8. device according to claim 7, which is characterized in that first matching unit includes:
First tree construction establishes subelement: for establishing extensible markup language tree, the extensible markup language tree includes more A node;
First traversal subelement: for traversed by the preamble of bottom to top layer to the extensible markup language tree;
First data base establishes subelement: for establishing the data base of corresponding first keyword, the data base storage is worked as The information for the node that preamble traverses, the information of the node include the node in the extensible markup language tree In location information, the node number and the node whether include first keyword record information;
The configuration file determination unit includes: that patch file determines subelement, for being minimum last common ancestor when node When node, determine that the extensible markup language document is the configuration file for recording the version number of the patch file.
9. according to any device of claim 7-8, which is characterized in that version number's determining module further include:
Second matching unit: for matching the parsing result of the patch file with the second keyword, described second is closed Keyword is directed toward the version number;
Version number's determination unit: for determining the patch file when the parsing result and second Keywords matching The version number.
10. device according to claim 9, which is characterized in that second matching unit includes:
Second tree construction establishes subelement: for establishing extensible markup language tree, the extensible markup language tree includes more A node;
Second traversal subelement: for traversed by the preamble of bottom to top layer to the extensible markup language tree;
Second data base establishes subelement: for establishing the data base of corresponding second keyword, the data base storage is worked as The information for the node that preamble traverses, the information of the node include the node in the extensible markup language tree In location information, the node number and the node whether include second keyword record information;
Version number's determination unit includes: that version number determines subelement, for being minimum last common ancestor node when node When, determine the version number of the patch file.
11. a kind of server, which is characterized in that the server includes processor and memory, is stored in the memory At least one instruction, at least one section of program, code set or instruction set, at least one instruction, at least one section of program, institute Code set or instruction set is stated to be loaded by the processor and executed to realize cleaning game as claimed in claim 1 to 5 The method of patch.
12. a kind of computer readable storage medium, which is characterized in that be stored at least one instruction, extremely in the storage medium Few one section of program, code set or instruction set, at least one instruction, at least one section of program, the code set or the instruction Collection is loaded by processor and is executed to realize the method such as cleaning Game patches as claimed in claim 1 to 5.
CN201810965688.5A 2018-08-23 2018-08-23 A kind of method, apparatus, server and medium for clearing up Game patches Pending CN109343860A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810965688.5A CN109343860A (en) 2018-08-23 2018-08-23 A kind of method, apparatus, server and medium for clearing up Game patches

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810965688.5A CN109343860A (en) 2018-08-23 2018-08-23 A kind of method, apparatus, server and medium for clearing up Game patches

Publications (1)

Publication Number Publication Date
CN109343860A true CN109343860A (en) 2019-02-15

Family

ID=65296643

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810965688.5A Pending CN109343860A (en) 2018-08-23 2018-08-23 A kind of method, apparatus, server and medium for clearing up Game patches

Country Status (1)

Country Link
CN (1) CN109343860A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112433964A (en) * 2020-04-17 2021-03-02 上海哔哩哔哩科技有限公司 Method and equipment for cleaning cache dirty data

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103646087A (en) * 2013-12-13 2014-03-19 北京奇虎科技有限公司 Junk file data cleaning method and device
CN104199704A (en) * 2014-09-10 2014-12-10 北京金山安全软件有限公司 Application program installation package clearing method and device
CN104572819A (en) * 2014-12-02 2015-04-29 深圳市腾讯计算机系统有限公司 Clearing method and system for junk data
US20160162277A1 (en) * 2014-12-05 2016-06-09 Johannes Fenzl Remote update of software components
US20160335078A1 (en) * 2014-01-06 2016-11-17 Apple Inc. Logging operating system updates of a secure element of an electronic device
CN107783766A (en) * 2016-08-25 2018-03-09 腾讯科技(深圳)有限公司 The method and apparatus cleared up the file of application program

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103646087A (en) * 2013-12-13 2014-03-19 北京奇虎科技有限公司 Junk file data cleaning method and device
US20160335078A1 (en) * 2014-01-06 2016-11-17 Apple Inc. Logging operating system updates of a secure element of an electronic device
CN104199704A (en) * 2014-09-10 2014-12-10 北京金山安全软件有限公司 Application program installation package clearing method and device
CN104572819A (en) * 2014-12-02 2015-04-29 深圳市腾讯计算机系统有限公司 Clearing method and system for junk data
US20160162277A1 (en) * 2014-12-05 2016-06-09 Johannes Fenzl Remote update of software components
CN107783766A (en) * 2016-08-25 2018-03-09 腾讯科技(深圳)有限公司 The method and apparatus cleared up the file of application program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112433964A (en) * 2020-04-17 2021-03-02 上海哔哩哔哩科技有限公司 Method and equipment for cleaning cache dirty data
CN112433964B (en) * 2020-04-17 2022-06-14 上海哔哩哔哩科技有限公司 Method and equipment for cleaning cache dirty data

Similar Documents

Publication Publication Date Title
US10152488B2 (en) Static-analysis-assisted dynamic application crawling architecture
JP4406609B2 (en) Techniques for managing multiple hierarchies of data from a single interface
d’Aquin et al. Where to publish and find ontologies? A survey of ontology libraries
US8122017B1 (en) Enhanced retrieval of source code
US8301588B2 (en) Data storage for file updates
US20120066218A1 (en) Solution search for software support
US20090158161A1 (en) Collaborative search in virtual worlds
US20100269096A1 (en) Creation, generation, distribution and application of self-contained modifications to source code
CN100498771C (en) System and method for managing structured document
US11720631B2 (en) Tool to build and store a data model and queries for a graph database
US9892191B2 (en) Complex query handling
US20170185679A1 (en) Computerized Identification Of App Search Functionality For Search Engine Access
Biswas et al. Boa meets python: A boa dataset of data science software in python language
CN103946794A (en) Cross-reference and priority claim to related applications
Chasins et al. Skip blocks: reusing execution history to accelerate web scripts
Cheng et al. Conflict-aware inference of python compatible runtime environments with domain knowledge graph
Daniel et al. Advanced prefetching and caching of models with PrefetchML
KR20120122959A (en) Method and Device for Collecting Web Contents and Computer-readable Recording Medium for the same
CN109343860A (en) A kind of method, apparatus, server and medium for clearing up Game patches
US10606805B2 (en) Object-level image query and retrieval
JP4309818B2 (en) Structured document management device, search device, storage method, search method, and program
JP3777666B2 (en) Database processing method and system
CN106649462B (en) A kind of implementation method for mass data full-text search scene
Hedeler et al. Chapter 7: dataspaces
JP2011138223A (en) Search device, search method and program

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