CN108628909A - Information-pushing method and device - Google Patents

Information-pushing method and device Download PDF

Info

Publication number
CN108628909A
CN108628909A CN201710182717.6A CN201710182717A CN108628909A CN 108628909 A CN108628909 A CN 108628909A CN 201710182717 A CN201710182717 A CN 201710182717A CN 108628909 A CN108628909 A CN 108628909A
Authority
CN
China
Prior art keywords
data base
statement
database
base manipulation
execution
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.)
Granted
Application number
CN201710182717.6A
Other languages
Chinese (zh)
Other versions
CN108628909B (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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke 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 Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201710182717.6A priority Critical patent/CN108628909B/en
Publication of CN108628909A publication Critical patent/CN108628909A/en
Application granted granted Critical
Publication of CN108628909B publication Critical patent/CN108628909B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3034Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a storage system, e.g. DASD based or network based
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3409Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
    • G06F11/3419Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment by assessing time
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/55Push-based network services

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Mathematical Physics (AREA)
  • Debugging And Monitoring (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

This application discloses information-pushing methods and device.One specific implementation mode of this method includes:Determine pending data base manipulation statement whether with default identification marking;In response to determining the data base manipulation statement with the default identification marking, execute the database manipulation indicated by the data base manipulation statement, it determines the execution duration and implementing result of the database manipulation, and obtains the execution duration threshold value to match with the data base manipulation statement from cache server;In response to determining that the execution duration is more than the execution duration threshold value or implementing result instruction executes failure, giver identification to be pushed that is preset, matching with the data base manipulation statement is extracted, and will wait for push personnel indicated by the alarm information pushing comprising the data base manipulation statement to the giver identification to be pushed.This embodiment improves the efficiency of the monitoring to data base manipulation statement executive condition and flexibilities.

Description

Information-pushing method and device
Technical field
This application involves field of computer technology, and in particular to Internet technical field more particularly to information-pushing method And device.
Background technology
With the development of computer technology, it is more and more common to carry out data storage using database.It is often necessary to use base In structured query language (Structured Query Language, SQL) constitute data base manipulation statement to database into Row operation.In these data base manipulation statements, usually there are some slow data base manipulation statements of execution, cause to count According to library penalty.It is then desired to which the execution speed to data base manipulation statement is monitored and alarms, to ensure database High availability.
The monitor mode of the existing execution speed to data base manipulation statement is usually that database administrator carries out manually Investigation, or unified time-out time is set and is monitored and alarms.Artificial investigation mode has that monitoring efficiency is relatively low, The mode that unified time-out time is arranged has that the flexibility of monitoring is relatively low.
Invention content
The purpose of the embodiment of the present application is to propose a kind of improved information-pushing method and device, to solve background above The technical issues of technology segment is mentioned.
In a first aspect, the embodiment of the present application provides a kind of information-pushing method, this method includes:Determine pending number According to library action statement whether with default identification marking;In response to determining that data base manipulation statement carries default identification marking, hold Database manipulation indicated by row data base manipulation statement, determines the execution duration and implementing result of database manipulation, and postpones Deposit the execution duration threshold value for obtaining in server and matching with data base manipulation statement;In response to determining that executing duration is more than execution Duration threshold value or implementing result instruction execute failure, and extraction is preset, waits for push personnel with what data base manipulation statement matched Mark, and will wait for push personnel indicated by the alarm information pushing comprising data base manipulation statement to giver identification to be pushed.
In some embodiments, before executing the database manipulation indicated by data base manipulation statement, this method is also wrapped It includes:In response to determining that data base manipulation statement carries default identification marking, determine whether be stored in cache server and data The execution duration threshold value that library action statement matches, if it is not, using preset execution duration default value as with database manipulation language The execution duration threshold value that sentence matches, is sent to cache server.
In some embodiments, in response to determining that data base manipulation statement carries default identification marking, database behaviour is executed Make the database manipulation indicated by sentence, determines the execution duration and implementing result of database manipulation, including:In response to determining number Default identification marking is carried according to library action statement, executes the database manipulation indicated by data base manipulation statement, and record execution The initial time of database manipulation;In response to determining that database manipulation executes completion, when the execution of database of record operation is completed Between and database manipulation implementing result, and the time difference for executing deadline and initial time is determined as database manipulation Execute duration.
In some embodiments, after the execution duration and implementing result for determining database manipulation, this method further includes: Data base manipulation statement, execution duration and implementing result are stored into the database log file being pre-created.
In some embodiments, this method further includes:In response to not extracting giver identification to be pushed, preset people is extracted Member logo collection, and by the alarm information pushing comprising data base manipulation statement to giver identification gather in each giver identification Indicated personnel.
Second aspect, the embodiment of the present application provide a kind of information push-delivery apparatus, which includes:Determination unit, configuration For determining pending data base manipulation statement whether with default identification marking;Execution unit is configured in response to true Determine data base manipulation statement and carry default identification marking, executes the database manipulation indicated by data base manipulation statement, determine number According to the execution duration and implementing result of library operation, and the execution to match with data base manipulation statement is obtained from cache server Duration threshold value;First push unit is configured in response to determining that execute duration refers to more than execution duration threshold value or implementing result Show and execute failure, extract giver identification to be pushed that is preset, matching with data base manipulation statement, and will include that database is grasped Make to wait for push personnel indicated by the alarm information pushing to giver identification to be pushed of sentence.
In some embodiments, execution unit is further configured to:In response to determining data base manipulation statement with pre- If identification marking, the execution duration threshold value for whether being stored in cache server and matching with data base manipulation statement determined, if It is no, using preset execution duration default value as the execution duration threshold value to match with data base manipulation statement, it is sent to caching Server.
In some embodiments, execution unit is further configured to:In response to determining data base manipulation statement with pre- When if identification marking, executing the database manipulation indicated by data base manipulation statement, and recording the starting for executing database manipulation Between;In response to determining that database manipulation executes completion, the execution deadline of database of record operation and holding for database manipulation The time difference for executing deadline and initial time as a result, and is determined as the execution duration of database manipulation by row.
In some embodiments, which further includes:Storage unit, when being configured to data base manipulation statement, execution Long and implementing result is stored into the database log file being pre-created.
In some embodiments, which further includes:Second push unit is configured to wait pushing in response to not extracting Giver identification extracts preset giver identification's set, and the alarm information pushing comprising data base manipulation statement to personnel is marked Know the personnel indicated by each giver identification in set.
Information-pushing method and device provided by the embodiments of the present application are by the pending data base manipulation statement of determination It is no to carry default identification marking, then in response to determining with default identification marking, execute indicated by the data base manipulation statement Database manipulation, determine the execution duration and implementing result of database manipulation, and determine and execute duration threshold value, it is last if it is determined that Go out to execute duration and execute failure more than execution duration threshold value or implementing result instruction, then by the alarm comprising data base manipulation statement Information is pushed to waits for push personnel accordingly, so as to not depend on the prison of the artificial executive condition for carrying out data base manipulation statement Control, improves the efficiency of monitoring, meanwhile, different execution duration threshold values can be preset for different sentences, improve monitoring Flexibility.
Description of the drawings
By reading a detailed description of non-restrictive embodiments in the light of the attached drawings below, the application's is other Feature, objects and advantages will become more apparent upon:
Fig. 1 is that this application can be applied to exemplary system architecture figures therein;
Fig. 2 is the flow chart according to one embodiment of the information-pushing method of the application;
Fig. 3 is the schematic diagram according to an application scenarios of the information-pushing method of the application;
Fig. 4 is the flow chart according to another embodiment of the information-pushing method of the application;
Fig. 5 is the structural schematic diagram according to one embodiment of the information push-delivery apparatus of the application;
Fig. 6 is adapted for the structural schematic diagram of the computer system of the server for realizing the embodiment of the present application.
Specific implementation mode
The application is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining related invention, rather than the restriction to the invention.It also should be noted that in order to Convenient for description, is illustrated only in attached drawing and invent relevant part with related.
It should be noted that in the absence of conflict, the features in the embodiments and the embodiments of the present application can phase Mutually combination.The application is described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Fig. 1 shows the exemplary system architecture of the information-pushing method or information push-delivery apparatus that can apply the application 100。
As shown in Figure 1, system architecture 100 may include server 101,103,105, network 102,104,106 and terminal Equipment 107,108,109.Network 102,104,106 to server 101,103,105 and terminal device 107,108,109 it Between provide communication link medium.Network 102,104,106 may include various connection types, such as wired, wireless communication link Road or fiber optic cables etc..
Server 101 can be equipped with wide area information server server, and above-mentioned database can be various relationship types Database, and above-mentioned database can be used for storing various data, for example, generated in e-commerce platform product information, transaction Information etc..
Server 105 can be equipped with can based on memory also can persistence log type database (such as redis) Cache server.The execution duration corresponding to pre-set multiple data base manipulation statements can be stored in cache server Threshold value.
Terminal device 107,108,109 can be the various electronic equipments for having display screen and supporting network communication, packet Include but be not limited to smart mobile phone, tablet computer, pocket computer on knee and desktop computer etc..
Server 103 can be to provide the server of various services, such as the application for process database operations sentence Server.Application server can be communicated to connect with server 101, server 105 and terminal device 107,108,109.Using Server can carry out data base manipulation statement the processing such as to analyze, and be grasped to the database installed in server 101 Make, stored data in server 105 can also be inquired and be read and write, it can also be by handling result (such as warning message) It is pushed to terminal device 107,108,109.
It should be pointed out that the database installed in server 101 can also be mounted on the local of server 103, clothes Business device 103 can directly operate local data base, at this point, server 101 or network 102 can be not present in Fig. 1.
It should be noted that the webpage generating method that the embodiment of the present application is provided generally is executed by server 105, accordingly Ground, auto-building html files device are generally positioned in server 103.
It should be understood that the number of the terminal device, network and server in Fig. 1 is only schematical.According to realization need It wants, can have any number of terminal device, network and server.
With continued reference to Fig. 2, the flow 200 of one embodiment of the information-pushing method according to the application is shown.It is described Information-pushing method, include the following steps:
Step 201, determine pending data base manipulation statement whether with default identification marking.
In the present embodiment, the electronic equipment (such as server 103 shown in FIG. 1) of information-pushing method operation thereon Pending data base manipulation statement can be determined whether with default identification marking.Wherein, above-mentioned pending database behaviour It can be various SQL statements to make sentence, and above-mentioned default identification marking can be pre-set various marks, for example, it may be Pre-defined note being made of character "@" and arbitrary preset characters string, certain Object-Oriented Programming Language (such as java) (Annotation)。
In practice, java, which is explained, is also referred to as metadata, is a kind of other explanation of code level, it can be stated in packet, class, word Before section, method, local variable, method parameter etc., for these elements are illustrated and are annotated.
Step 202, in response to determining that data base manipulation statement carries default identification marking, data base manipulation statement institute is executed The database manipulation of instruction determines the execution duration and implementing result of database manipulation, and obtains and count from cache server The execution duration threshold value to match according to library action statement.
In the present embodiment, in response to determining that data base manipulation statement carries default identification marking, above-mentioned electronic equipment can It is signified to execute above-mentioned data base manipulation statement to database (such as the database installed in server shown in FIG. 1 101) The database manipulation shown, determines the execution duration and implementing result of above-mentioned database manipulation, and is communicated from above-mentioned electronic equipment When obtaining the execution to match with data base manipulation statement in the cache server (such as server 105 shown in FIG. 1) of connection Long threshold value.In practice, above-mentioned cache server can be equipped with can based on memory also can persistence log type database (such as redis).It can be stored in the database that cache server is installed corresponding to pre-set multiple data base manipulation statements Execution duration threshold value, execution duration threshold value corresponding from each data base manipulation statement can be different.As an example, Fig. 1 institutes Two tables of data are stored in the database installed in the server 101 shown, the first tables of data is used to store user information, the Two tables of data are for storing national title.Data volume in first tables of data is much larger than the data volume in the second tables of data, thus, It, can for being used to indicate the data base manipulation statement that the data in the first tables of data in the database are inquired or changed To pre-set larger execution duration threshold value (such as 500 milliseconds);For being used to indicate to the number in above-mentioned second tables of data According to the data base manipulation statement inquired or changed, smaller duration threshold value (such as 100 milliseconds) can be pre-set.
In some optional realization methods of the present embodiment, in response to the above-mentioned data base manipulation statement of determination with above-mentioned Default identification marking, above-mentioned electronic equipment can determine in the following way executes duration:It is possible, firstly, to execute above-mentioned database Database manipulation indicated by action statement, while recording the initial time for executing above-mentioned database manipulation;Later, in response to true Fixed above-mentioned database manipulation executes completion, records the execution deadline of above-mentioned database manipulation and holding for above-mentioned database manipulation Row by the time difference of above-mentioned execution deadline and above-mentioned initial time as a result, and when being determined as the execution of above-mentioned database manipulation It is long.In practice, reversion can be controlled based on certain lightweight and the container frame (such as Spring frames) towards section provides Towards specified note (such as the@Around note in tangent plane programming (Aspect Oriented Programming, AOP) function Solution) state that the mode around notice realizes the determination for executing the time.It is above-mentioned above-mentioned electronic equipment to be indicated upper around notice The operation for carrying out the record time before and after the execution of data base manipulation statement is stated, that is, record above-mentioned initial time and above-mentioned executes completion Time, alternatively, it is also possible to indicate that above-mentioned electronic equipment being determined after recording the above-mentioned execution deadline executes duration Operation.
In some optional realization methods of the present embodiment, in response to the above-mentioned data base manipulation statement of determination with above-mentioned Default identification marking, above-mentioned electronic equipment can pair server communicated to connect with above-mentioned electronic equipment (such as clothes shown in FIG. 1 Business device 101) database operating instruction for including above-mentioned data base manipulation statement is sent, and record the hair of the database operating instruction Send the time.Later, the database manipulation of above-mentioned server return can be received as a result, and recording returning for the database manipulation result Return the time.Above-mentioned sending time can be determined as initial time by above-mentioned electronic equipment, and above-mentioned time of return is determined as holding The row deadline, and above-mentioned execution deadline and the time difference of above-mentioned initial time are determined as holding for above-mentioned database manipulation Row duration.
In some optional realization methods of the present embodiment, determine above-mentioned execution duration and above-mentioned implementing result it Afterwards, above-mentioned electronic equipment can also store above-mentioned data base manipulation statement, above-mentioned execution duration and above-mentioned implementing result to pre- In the database log file first created.
Step 203, in response to determining that execute duration executes failure more than execution duration threshold value or implementing result instruction, extracts Giver identification to be pushed that is preset, matching with data base manipulation statement, and by the alarm signal comprising data base manipulation statement Breath pushes to waits for push personnel indicated by giver identification to be pushed.
In the present embodiment, preset and above-mentioned data can have been recorded in the pre-defined note described in step 201 The giver identification to be pushed that library action statement matches, wherein above-mentioned giver identification to be pushed can be made of any character Character string, can serve to indicate that and determine and wait for push personnel.It is acquired to determine that above-mentioned execution duration is more than in response to step 202 The execution duration threshold value to match with above-mentioned data base manipulation statement or above-mentioned implementing result instruction execute failure, above-mentioned electronics Equipment can extract above-mentioned giver identification to be pushed, and by the alarm information pushing comprising above-mentioned data base manipulation statement to above-mentioned Push personnel are waited for indicated by giver identification to be pushed.It is above-mentioned to wait for that push personnel utilize various equipment (such as shown in FIG. 1 Terminal device 107,108,109) receive above-mentioned warning message.In practice, it can be stated based on the specified note described in step 202 Around notice, above-mentioned electronic equipment is made to execute the comparison operation of above-mentioned execution duration and above-mentioned execution duration threshold value, extract and wait pushing away It send the operation of giver identification and pushes the operation of warning message.
In some optional realization methods of the present embodiment, in response to not extracting above-mentioned giver identification to be pushed, on Preset giver identification's set, and the alarm information pushing that will include above-mentioned data base manipulation statement can be extracted by stating electronic equipment To the personnel indicated by each giver identification in above-mentioned giver identification set.
It should be noted that the basic skills of above-mentioned note is the known technology studied and applied extensively at present, herein not It repeats again.
It is a schematic diagram according to the application scenarios of the information-pushing method of the present embodiment with continued reference to Fig. 3, Fig. 3. In the application scenarios of Fig. 3, first, application server determines whether pending data base manipulation statement is marked with default identification Know.Later, however, it is determined that with default identification marking, then execute the database manipulation indicated by the data base manipulation statement, determine The execution duration and implementing result of the database manipulation are executed, and obtains corresponding execution duration threshold value from cache server. Finally, application server is after determining that execute duration executes failure more than execution duration threshold value or implementing result instruction, acquisition phase The giver identification to be pushed answered, and the warning message 301 comprising the database statement is pushed into above-mentioned giver identification to be pushed Indicated waits for push personnel, waits for that push personnel can browse the warning message 301 in used terminal device.
Whether the method that above-described embodiment of the application provides is by the pending data base manipulation statement of determination with pre- If identification marking, then in response to determining with default identification marking, the database indicated by the data base manipulation statement is executed Operation determines the execution duration and implementing result of database manipulation, and determines and execute duration threshold value, last if it is determined that when executing It is long to execute failure more than execution duration threshold value or implementing result instruction, then by the alarm information pushing comprising data base manipulation statement To push personnel are waited for accordingly, so as to not depend on the monitoring of the artificial executive condition for carrying out data base manipulation statement, improve The efficiency of monitoring, meanwhile, different execution duration threshold values can be preset for different sentences, improves the flexible of monitoring Property.
With further reference to Fig. 4, it illustrates the flows 400 of another embodiment of information-pushing method.The information pushes The flow 400 of method, includes the following steps:
Step 401, determine pending data base manipulation statement whether with default identification marking.
In the present embodiment, the electronic equipment (such as server 103 shown in FIG. 1) of information-pushing method operation thereon Pending data base manipulation statement can be determined whether with default identification marking.
Step 402, in response to determining that data base manipulation statement carries default identification marking, determine in cache server whether Be stored with the execution duration threshold value to match with data base manipulation statement, if it is not, using preset execution duration default value as with The execution duration threshold value that data base manipulation statement matches, is sent to cache server.
In the present embodiment, above-mentioned default identification marking, above-mentioned electricity are carried in response to the above-mentioned data base manipulation statement of determination Sub- equipment can determine the execution duration for whether being stored in above-mentioned cache server and matching with above-mentioned data base manipulation statement Threshold value, if it is not, can by preset execution duration default value (such as 800 milliseconds) as with above-mentioned data base manipulation statement phase The execution duration threshold value matched, is sent to above-mentioned cache server.Later, above-mentioned electronic equipment can execute step 403.Practice In, the transmission for the database that above-mentioned electronic equipment can be installed to above-mentioned cache server includes SETNX (SET if Not EXists, if there is no being then arranged) order information, to determine whether be stored in above-mentioned cache server and above-mentioned data The execution duration threshold value that library action statement matches, if it is not, indicated, above-mentioned data base manipulation statement is then written in the information Corresponding execution duration threshold value.It should be noted that user can be right in the configuration page that above-mentioned cache server is presented The corresponding execution duration threshold value of each data base manipulation statement is modified in real time.
In some optional realization methods of the present embodiment, configuration text can also be previously stored in above-mentioned electronic equipment Part can record preset duration in above-mentioned configuration file.In response to the above-mentioned data base manipulation statement of determination with above-mentioned default Identification marking, above-mentioned electronic equipment can determine whether be stored in above-mentioned cache server and above-mentioned data base manipulation statement phase Matched execution duration threshold value, if it is not, above-mentioned preset duration can be extracted from above-mentioned configuration file, and when determining above-mentioned default Whether long be empty;Then, in response to the above-mentioned preset duration of determination be sky, can using preset execution duration default value as with it is upper The execution duration threshold value that data base manipulation statement matches is stated, above-mentioned cache server is sent to;Later, above-mentioned number can be executed According to the database manipulation indicated by the action statement of library.
Step 403, it is stored with the execution duration to match with data base manipulation statement in response to determining in cache server Threshold value, or be sent to using preset execution duration default value as the execution duration threshold value to match with data base manipulation statement slow After depositing server, the database manipulation indicated by above-mentioned data base manipulation statement is executed, determines holding for above-mentioned database manipulation Row duration and implementing result, and the execution duration threshold to match with above-mentioned data base manipulation statement is obtained from cache server Value.
In the present embodiment, it is stored with the execution to match with data base manipulation statement in response to determining in cache server Duration threshold value, or preset execution duration default value is sent as the execution duration threshold value to match with data base manipulation statement To cache server, above-mentioned electronic equipment can be to database (such as the number installed in server shown in FIG. 1 101 According to library) database manipulation indicated by above-mentioned data base manipulation statement is executed, while recording and executing rising for above-mentioned database manipulation Begin the time;Completion is executed in response to the above-mentioned database manipulation of determination, records execution deadline of above-mentioned database manipulation and upper The implementing result of database manipulation is stated, and the time difference of above-mentioned execution deadline and above-mentioned initial time is determined as above-mentioned number The execution duration operated according to library;Finally, from cache server (such as the clothes shown in FIG. 1 communicated to connect with above-mentioned electronic equipment Business device 105) in obtain the execution duration threshold value to match with data base manipulation statement.
Step 404, in response to determining that execute duration executes failure more than execution duration threshold value or implementing result instruction, extracts Giver identification to be pushed that is preset, matching with data base manipulation statement, and by the alarm signal comprising data base manipulation statement Breath pushes to waits for push personnel indicated by giver identification to be pushed.
In the present embodiment, preset and above-mentioned database manipulation language can have been recorded in above-mentioned pre-defined note The giver identification to be pushed that sentence matches.It is more than in response to the above-mentioned execution duration of determination acquired with above-mentioned database manipulation language The execution duration threshold value that matches of sentence or the instruction of above-mentioned implementing result execute failure, and above-mentioned electronic equipment, which can extract, above-mentioned to be waited pushing away Giver identification is sent, and will be indicated by the alarm information pushing comprising above-mentioned data base manipulation statement to above-mentioned giver identification to be pushed Wait for push personnel.It is above-mentioned to wait for that push personnel utilize various equipment (such as terminal device shown in FIG. 1 107,108,109) Receive above-mentioned warning message.
It should be noted that the operation and the operation of step 201-203 of above-mentioned steps 401,403,404 are essentially identical, This is repeated no more.
Figure 4, it is seen that compared with the corresponding embodiments of Fig. 2, the flow of the information-pushing method in the present embodiment 400 highlight the determination for whether having been stored to cache server and having executed duration threshold value.The scheme of the present embodiment description is into one as a result, Step improves the flexibility of the efficiency and monitoring of the monitoring to the executive condition of data base manipulation statement.
With further reference to Fig. 5, as the realization to method shown in above-mentioned each figure, this application provides a kind of push of information to fill The one embodiment set, the device embodiment is corresponding with embodiment of the method shown in Fig. 2, which specifically can be applied to respectively In kind electronic equipment.
As shown in figure 5, the above-mentioned information push-delivery apparatus 500 of the present embodiment includes:Determination unit 501 is configured to determine Whether pending data base manipulation statement is with default identification marking;Execution unit 502 is configured to above-mentioned in response to determination Data base manipulation statement carries above-mentioned default identification marking, executes the database manipulation indicated by above-mentioned data base manipulation statement, It determines the execution duration and implementing result of above-mentioned database manipulation, and is obtained and above-mentioned database manipulation language from cache server The execution duration threshold value that sentence matches;First push unit 503 is configured to be more than in response to the above-mentioned execution duration of determination above-mentioned It executes duration threshold value or the instruction of above-mentioned implementing result executes failure, extraction is preset, matches with above-mentioned data base manipulation statement Giver identification to be pushed, and by the alarm information pushing comprising above-mentioned data base manipulation statement to above-mentioned giver identification to be pushed Indicated waits for push personnel.
In the present embodiment, whether above-mentioned determination unit 501 can determine pending data base manipulation statement with pre- If identification marking.
In the present embodiment, in response to determining that data base manipulation statement carries default identification marking, above-mentioned execution unit 502 Above-mentioned data base manipulation statement institute can be executed to database (such as the database installed in server shown in FIG. 1 101) The database manipulation of instruction, determines the execution duration and implementing result of above-mentioned database manipulation, and (such as schemes from cache server Server 105 shown in 1) in obtain the execution duration threshold value to match with data base manipulation statement.
In the present embodiment, it is more than in response to the above-mentioned execution duration of determination acquired with above-mentioned data base manipulation statement phase Matched execution duration threshold value or the instruction of above-mentioned implementing result execute failure, and above-mentioned first push unit 503 can extract default , the giver identification to be pushed to match with above-mentioned data base manipulation statement, and the report that above-mentioned data base manipulation statement will be included Alert information pushes to waits for push personnel indicated by above-mentioned giver identification to be pushed.It is above-mentioned to wait for that push personnel utilize various set Standby (such as terminal device shown in FIG. 1 107,108,109) receives above-mentioned warning message.
In some optional realization methods of the present embodiment, above-mentioned execution unit 502 can further be configured to ring Should in determine above-mentioned data base manipulation statement carry above-mentioned default identification marking, determine whether be stored in cache server with it is upper State the execution duration threshold value that data base manipulation statement matches, if it is not, using preset execution duration default value as with above-mentioned number The execution duration threshold value to match according to library action statement, is sent to above-mentioned cache server.
In some optional realization methods of the present embodiment, above-mentioned execution unit 502 can further be configured to ring Above-mentioned default identification marking should be carried in determining above-mentioned data base manipulation statement, executed indicated by above-mentioned data base manipulation statement Database manipulation, and record the initial time for executing above-mentioned database manipulation;It has been executed in response to the above-mentioned database manipulation of determination At, the implementing result of the execution deadline and above-mentioned database manipulation of above-mentioned database manipulation is recorded, and it is above-mentioned execution is complete It is determined as the execution duration of above-mentioned database manipulation at the time difference of time and above-mentioned initial time.
In some optional realization methods of the present embodiment, above- mentioned information pusher 500 can also include that storage is single Member.Wherein, said memory cells may be configured to above-mentioned data base manipulation statement, above-mentioned execution duration and above-mentioned execution knot Fruit stores into the database log file being pre-created.
In some optional realization methods of the present embodiment, above- mentioned information pusher 500 can also be pushed away including second Send unit.Wherein, above-mentioned second push unit may be configured to, in response to not extracting above-mentioned giver identification to be pushed, extract Preset giver identification's set, and the alarm information pushing comprising above-mentioned data base manipulation statement to above-mentioned giver identification is gathered In each giver identification indicated by personnel.
The device that above-described embodiment of the application provides, pending database manipulation language is determined by determination unit 501 Whether sentence is with default identification marking, then in response to determining that, with default identification marking, execution unit 502 executes the database Database manipulation indicated by action statement determines the execution duration and implementing result of database manipulation, and determines and execute duration Threshold value, last if it is determined that execute duration executes failure more than execution duration threshold value or implementing result instruction, then the first push is single Alarm information pushing comprising data base manipulation statement is given and waits for push personnel accordingly by member 503, artificial so as to not depend on The monitoring for carrying out the executive condition of data base manipulation statement, improves the efficiency of monitoring, meanwhile, it is advance different sentences can be directed to Different execution duration threshold values are set, the flexibility of monitoring is improved.
Below with reference to Fig. 6, it illustrates the computer systems 600 suitable for the server for realizing the embodiment of the present application Structural schematic diagram.Server shown in Fig. 6 is only an example, should not be to the function and use scope band of the embodiment of the present application Carry out any restrictions.
As shown in fig. 6, computer system 600 includes central processing unit (CPU) 601, it can be read-only according to being stored in Program in memory (ROM) 602 or be loaded into the program in random access storage device (RAM) 603 from storage section 608 and Execute various actions appropriate and processing.In RAM 603, also it is stored with system 600 and operates required various programs and data. CPU 601, ROM 602 and RAM 603 are connected with each other by bus 604.Input/output (I/O) interface 605 is also connected to always Line 604.
It is connected to I/O interfaces 605 with lower component:Importation 606 including keyboard, mouse etc.;It is penetrated including such as cathode The output par, c 607 of spool (CRT), liquid crystal display (LCD) etc. and loud speaker etc.;Storage section 608 including hard disk etc.; And the communications portion 609 of the network interface card including LAN card, modem etc..Communications portion 609 via such as because The network of spy's net executes communication process.Driver 610 is also according to needing to be connected to I/O interfaces 605.Detachable media 611, such as Disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on driver 610, as needed in order to be read from thereon Computer program be mounted into storage section 608 as needed.
Particularly, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description Software program.For example, embodiment of the disclosure includes a kind of computer program product comprising be carried on computer-readable medium On computer program, which includes the program code for method shown in execution flow chart.In such reality It applies in example, which can be downloaded and installed by communications portion 609 from network, and/or from detachable media 611 are mounted.When the computer program is executed by central processing unit (CPU) 601, limited in execution the present processes Above-mentioned function.It should be noted that computer-readable medium described herein can be computer-readable signal media or Computer readable storage medium either the two arbitrarily combines.Computer readable storage medium for example can be --- but Be not limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or arbitrary above combination. The more specific example of computer readable storage medium can include but is not limited to:Electrical connection with one or more conducting wires, Portable computer diskette, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed read-only deposit Reservoir (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory Part or above-mentioned any appropriate combination.In this application, computer readable storage medium can any be included or store The tangible medium of program, the program can be commanded the either device use or in connection of execution system, device.And In the application, computer-readable signal media may include the data letter propagated in a base band or as a carrier wave part Number, wherein carrying computer-readable program code.Diversified forms may be used in the data-signal of this propagation, including but not It is limited to electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be computer Any computer-readable medium other than readable storage medium storing program for executing, the computer-readable medium can send, propagate or transmit use In by instruction execution system, device either device use or program in connection.Include on computer-readable medium Program code can transmit with any suitable medium, including but not limited to:Wirelessly, electric wire, optical cable, RF etc., Huo Zheshang Any appropriate combination stated.
Flow chart in attached drawing and block diagram, it is illustrated that according to the system of the various embodiments of the application, method and computer journey The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation A part for a part for one module, program segment, or code of table, the module, program segment, or code includes one or more uses The executable instruction of the logic function as defined in realization.It should also be noted that in some implementations as replacements, being marked in box The function of note can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are actually It can be basically executed in parallel, they can also be executed in the opposite order sometimes, this is depended on the functions involved.Also it to note Meaning, the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart can be with holding The dedicated hardware based system of functions or operations as defined in row is realized, or can use specialized hardware and computer instruction Combination realize.
Being described in unit involved in the embodiment of the present application can be realized by way of software, can also be by hard The mode of part is realized.Described unit can also be arranged in the processor, for example, can be described as:A kind of processor packet Include determination unit, execution unit and the first push unit.Wherein, the title of these units is not constituted to this under certain conditions The restriction of unit itself, for example, determination unit is also described as " determining whether pending data base manipulation statement carries The unit of default identification marking ".
As on the other hand, present invention also provides a kind of computer-readable medium, which can be Included in device described in above-described embodiment;Can also be individualism, and without be incorporated the device in.Above-mentioned calculating Machine readable medium carries one or more program, when said one or multiple programs are executed by the device so that should Device:In response to determining that the data base manipulation statement with the default identification marking, executes indicated by the data base manipulation statement Database manipulation, determine the execution duration and implementing result of the database manipulation, and obtained and the number from cache server The execution duration threshold value to match according to library action statement;In response to determining that the execution duration is more than the execution duration threshold value or this is held The instruction of row result executes failure, extracts giver identification to be pushed that is preset, matching with the data base manipulation statement, and will packet Push personnel are waited for indicated by alarm information pushing containing the data base manipulation statement to the giver identification to be pushed.
Above description is only the preferred embodiment of the application and the explanation to institute's application technology principle.People in the art Member should be appreciated that invention scope involved in the application, however it is not limited to technology made of the specific combination of above-mentioned technical characteristic Scheme, while should also cover in the case where not departing from foregoing invention design, it is carried out by above-mentioned technical characteristic or its equivalent feature Other technical solutions of arbitrary combination and formation.Such as features described above has similar work(with (but not limited to) disclosed herein Can technical characteristic replaced mutually and the technical solution that is formed.

Claims (12)

1. a kind of information-pushing method, which is characterized in that the method includes:
Determine pending data base manipulation statement whether with default identification marking;
The default identification marking is carried in response to the determination data base manipulation statement, executes the data base manipulation statement institute The database manipulation of instruction, determines the execution duration and implementing result of the database manipulation, and is obtained from cache server The execution duration threshold value to match with the data base manipulation statement;
It is more than the execution duration threshold value in response to the determination execution duration or implementing result instruction executes failure, extracts Giver identification to be pushed that is preset, matching with the data base manipulation statement, and will include the data base manipulation statement Alarm information pushing to the giver identification to be pushed indicated by wait for push personnel.
2. information-pushing method according to claim 1, which is characterized in that execute the data base manipulation statement described Before indicated database manipulation, the method further includes:
The default identification marking is carried in response to the determination data base manipulation statement, determines in cache server whether store Have the execution duration threshold value to match with the data base manipulation statement, if it is not, using preset execution duration default value as with The execution duration threshold value that the data base manipulation statement matches, is sent to the cache server.
3. according to the information-pushing method described in one of claim 1-2, which is characterized in that described in response to the determination data Library action statement carries the default identification marking, executes the database manipulation indicated by the data base manipulation statement, determines The execution duration and implementing result of the database manipulation, including:
The default identification marking is carried in response to the determination data base manipulation statement, executes the data base manipulation statement institute The database manipulation of instruction, and record the initial time for executing the database manipulation;
Completion is executed in response to the determination database manipulation, records the execution deadline of the database manipulation and the number It is determined as the database according to the implementing result that library operates, and by the execution deadline and the time difference of the initial time The execution duration of operation.
4. information-pushing method according to claim 3, which is characterized in that in holding for the determination database manipulation After row duration and implementing result, the method further includes:
The data base manipulation statement, the execution duration and the implementing result are stored to the database journal being pre-created In file.
5. information-pushing method according to claim 1, which is characterized in that the method further includes:
In response to not extracting the giver identification to be pushed, preset giver identification's set is extracted, and will include the data The personnel indicated by each giver identification in the alarm information pushing of library action statement to giver identification set.
6. a kind of information push-delivery apparatus, which is characterized in that described device includes:
Whether determination unit is configured to determine pending data base manipulation statement with default identification marking;
Execution unit is configured to carry the default identification marking in response to the determination data base manipulation statement, executes institute The database manipulation indicated by data base manipulation statement is stated, determines the execution duration and implementing result of the database manipulation, and The execution duration threshold value to match with the data base manipulation statement is obtained from cache server;
First push unit is configured to be more than the execution duration threshold value or the execution in response to the determination execution duration As a result instruction executes failure, extracts giver identification to be pushed that is preset, matching with the data base manipulation statement, and will packet Push personnel are waited for indicated by alarm information pushing containing the data base manipulation statement to the giver identification to be pushed.
7. information push-delivery apparatus according to claim 6, which is characterized in that the execution unit is further configured to:
The default identification marking is carried in response to the determination data base manipulation statement, determines in cache server whether store Have the execution duration threshold value to match with the data base manipulation statement, if it is not, using preset execution duration default value as with The execution duration threshold value that the data base manipulation statement matches, is sent to the cache server.
8. according to the information push-delivery apparatus described in one of claim 6-7, which is characterized in that the execution unit further configures For:
The default identification marking is carried in response to the determination data base manipulation statement, executes the data base manipulation statement institute The database manipulation of instruction, and record the initial time for executing the database manipulation;In response to the determination database manipulation Completion is executed, records the implementing result of the execution deadline and the database manipulation of the database manipulation, and will be described Execution deadline and the time difference of the initial time are determined as the execution duration of the database manipulation.
9. information push-delivery apparatus according to claim 8, which is characterized in that described device further includes:
Storage unit is configured to store the data base manipulation statement, the execution duration and the implementing result to pre- In the database log file first created.
10. information push-delivery apparatus according to claim 6, which is characterized in that described device further includes:
Second push unit is configured to, in response to not extracting the giver identification to be pushed, extract preset giver identification Set, and each personnel in the alarm information pushing comprising the data base manipulation statement to giver identification set are marked Know indicated personnel.
11. a kind of server, including:
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors so that one or more of processors are real The now method as described in any in claim 1-5.
12. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is by processor The method as described in any in claim 1-5 is realized when execution.
CN201710182717.6A 2017-03-24 2017-03-24 Information pushing method and device Active CN108628909B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710182717.6A CN108628909B (en) 2017-03-24 2017-03-24 Information pushing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710182717.6A CN108628909B (en) 2017-03-24 2017-03-24 Information pushing method and device

Publications (2)

Publication Number Publication Date
CN108628909A true CN108628909A (en) 2018-10-09
CN108628909B CN108628909B (en) 2022-04-12

Family

ID=63707850

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710182717.6A Active CN108628909B (en) 2017-03-24 2017-03-24 Information pushing method and device

Country Status (1)

Country Link
CN (1) CN108628909B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109933601A (en) * 2019-01-24 2019-06-25 深圳壹账通智能科技有限公司 Data base management method, system, computer installation and readable storage medium storing program for executing
CN113032412A (en) * 2021-03-03 2021-06-25 北京沃东天骏信息技术有限公司 Data synchronization method and device, electronic equipment and computer readable medium

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070260644A1 (en) * 2006-02-09 2007-11-08 Mats Ljungqvist Method for enhancing the operation of a database
US20100153431A1 (en) * 2008-12-11 2010-06-17 Louis Burger Alert triggered statistics collections
CN101763389A (en) * 2008-12-23 2010-06-30 中兴通讯股份有限公司 Device and method for controlling database resource
CN103842973A (en) * 2011-10-05 2014-06-04 国际商业机器公司 Monitoring stored procedure execution
CN104486109A (en) * 2014-12-09 2015-04-01 大唐移动通信设备有限公司 Fault detection and recovery methods and devices
CN104778185A (en) * 2014-01-15 2015-07-15 中国移动通信集团北京有限公司 Determination method for abnormal SQL (structured query language) statement and server
CN104820663A (en) * 2014-01-30 2015-08-05 西门子公司 Method and device for discovering low performance structural query language (SQL) statements, and method and device for forecasting SQL statement performance
CN105183614A (en) * 2015-11-03 2015-12-23 华夏银行股份有限公司 Database failure prediction method and device
CN105512239A (en) * 2015-11-30 2016-04-20 中国建设银行股份有限公司 Database data push method and device
CN105653607A (en) * 2015-12-23 2016-06-08 北京奇虎科技有限公司 SQL (Structured Query Language) log collection and analysis method and device
CN106294075A (en) * 2016-08-17 2017-01-04 浪潮软件股份有限公司 A kind of SQL is monitored method, Apparatus and system

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070260644A1 (en) * 2006-02-09 2007-11-08 Mats Ljungqvist Method for enhancing the operation of a database
US20100153431A1 (en) * 2008-12-11 2010-06-17 Louis Burger Alert triggered statistics collections
CN101763389A (en) * 2008-12-23 2010-06-30 中兴通讯股份有限公司 Device and method for controlling database resource
CN103842973A (en) * 2011-10-05 2014-06-04 国际商业机器公司 Monitoring stored procedure execution
CN104778185A (en) * 2014-01-15 2015-07-15 中国移动通信集团北京有限公司 Determination method for abnormal SQL (structured query language) statement and server
CN104820663A (en) * 2014-01-30 2015-08-05 西门子公司 Method and device for discovering low performance structural query language (SQL) statements, and method and device for forecasting SQL statement performance
CN104486109A (en) * 2014-12-09 2015-04-01 大唐移动通信设备有限公司 Fault detection and recovery methods and devices
CN105183614A (en) * 2015-11-03 2015-12-23 华夏银行股份有限公司 Database failure prediction method and device
CN105512239A (en) * 2015-11-30 2016-04-20 中国建设银行股份有限公司 Database data push method and device
CN105653607A (en) * 2015-12-23 2016-06-08 北京奇虎科技有限公司 SQL (Structured Query Language) log collection and analysis method and device
CN106294075A (en) * 2016-08-17 2017-01-04 浪潮软件股份有限公司 A kind of SQL is monitored method, Apparatus and system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
BJÖRN ANDERSSON ET AL.: "Using a prioritized MAC protocol to execute the database operation join in networked embedded computer systems", 《2010 8TH WORKSHOP ON INTELLIGENT SOLUTIONS IN EMBEDDED SYSTEMS》 *
陈逸菲: "基于模糊理论的关系数据库查询技术研究", 《中国优秀博硕士学位论文全文数据库 (硕士) 信息科技辑》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109933601A (en) * 2019-01-24 2019-06-25 深圳壹账通智能科技有限公司 Data base management method, system, computer installation and readable storage medium storing program for executing
CN113032412A (en) * 2021-03-03 2021-06-25 北京沃东天骏信息技术有限公司 Data synchronization method and device, electronic equipment and computer readable medium
CN113032412B (en) * 2021-03-03 2023-12-05 北京沃东天骏信息技术有限公司 Data synchronization method, device, electronic equipment and computer readable medium

Also Published As

Publication number Publication date
CN108628909B (en) 2022-04-12

Similar Documents

Publication Publication Date Title
US10942708B2 (en) Generating web API specification from online documentation
CN108459953A (en) test method and device
CN108549673A (en) Pre-add support method, client, server and the network system of web page resources
CN108293081A (en) Pass through the program playback deep linking of user interface event to mobile application state
CN109683998A (en) Internationalize implementation method, device and system
CN110196790A (en) The method and apparatus of abnormal monitoring
CN108846753A (en) Method and apparatus for handling data
CN109271403A (en) A kind of operating method of data query, device, medium and electronic equipment
CN110554874A (en) Method and device for reusing webpage components of SaaS platform
CN108228906A (en) For generating the method and apparatus of information
CN110019263A (en) Information storage means and device
CN109684188A (en) Test method and device
CN109241722A (en) For obtaining method, electronic equipment and the computer-readable medium of information
CN107766106B (en) The method and apparatus for generating configuration file
CN109388551A (en) There are the method for loophole probability, leak detection method, relevant apparatus for prediction code
CN109002385A (en) Method for testing pressure and device for data flow system
CN110019437A (en) A kind of method and system exporting data
CN109582317A (en) Method and apparatus for debugging boarding application
CN109284367A (en) Method and apparatus for handling text
CN109002282A (en) A kind of method and apparatus for realizing animation effect in web page exploitation
CN108959642A (en) Method and apparatus for information to be written
CN108628909A (en) Information-pushing method and device
CN109684027A (en) The method and apparatus of dynamically track Java Virtual Machine operation
CN110119386A (en) Data processing method, data processing equipment, medium and calculating equipment
CN109213824A (en) Data grabber system, method and apparatus

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
GR01 Patent grant
GR01 Patent grant