CN109933508A - Method and apparatus for sending information - Google Patents

Method and apparatus for sending information Download PDF

Info

Publication number
CN109933508A
CN109933508A CN201910228593.XA CN201910228593A CN109933508A CN 109933508 A CN109933508 A CN 109933508A CN 201910228593 A CN201910228593 A CN 201910228593A CN 109933508 A CN109933508 A CN 109933508A
Authority
CN
China
Prior art keywords
daily record
record data
data set
programming interface
application programming
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
CN201910228593.XA
Other languages
Chinese (zh)
Other versions
CN109933508B (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 Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201910228593.XA priority Critical patent/CN109933508B/en
Publication of CN109933508A publication Critical patent/CN109933508A/en
Application granted granted Critical
Publication of CN109933508B publication Critical patent/CN109933508B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Telephonic Communication Services (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the present disclosure discloses the method and apparatus for sending information.One specific embodiment of this method includes: at least one daily record data for obtaining gateway server and generating in preset duration;At least one daily record data is divided, at least one daily record data set is obtained, wherein the recalls information that the daily record data in same daily record data set includes indicates same application programming interface;For the daily record data set at least one daily record data set, the daily record data in the daily record data set is analyzed, obtain the called number of application programming interface corresponding to the daily record data set and returns to total amount of data;It sends the called number of obtained application programming interface and returns to total amount of data.The embodiment, which is realized, to be analyzed called number by application programming interface and returns to total amount of data, and the called number of each application programming interface is sent with total amount of data is returned.

Description

Method and apparatus for sending information
Technical field
The embodiment of the present disclosure is related to field of computer technology, and in particular to the method and apparatus for sending information.
Background technique
API (Application Programming Interface, application programming interface) is used for capability service The service ability of device is opened to the outside world.In use, usually calling API to realize the access to capable server by gateway.Every tune With an API, gateway can generate an API Calls daily record data.API Calls daily record data is that charging, monitoring etc. make in the process Critical data.
Summary of the invention
The embodiment of the present disclosure proposes the method and apparatus for sending information.
In a first aspect, the embodiment of the present disclosure provides a kind of method for sending information, this method comprises: obtaining gateway At least one daily record data that server generates in preset duration, wherein daily record data includes application programming interface Recalls information and returned data amount;Above-mentioned at least one daily record data is divided, at least one daily record data set is obtained, Wherein, the recalls information that the daily record data in same daily record data set includes indicates same application programming interface;For Daily record data set at least one above-mentioned daily record data set, divides the daily record data in the daily record data set Analysis obtains the called number of application programming interface corresponding to the daily record data set and returns to total amount of data;It sends The called number and return total amount of data of obtained application programming interface.
In some embodiments, the above method further include: for the log number at least one above-mentioned daily record data set According to set, following monitoring step is executed: application programming interface corresponding to the daily record data set obtained to analysis Called number and return total amount of data carry out anomalous identification;In response to determining application program corresponding to the daily record data set There is exception in the called number and/or return total amount of data of programming interface, send abnormal prompt information to preset recipient.
In some embodiments, application programming interface corresponding to above-mentioned daily record data set obtained to analysis Called number and return to total amount of data and carry out anomalous identification, comprising: will be corresponding to the obtained daily record data set of analysis Application programming interface called number and return to total amount of data, return to total data be called number and history of history Amount is compared;Anomalous identification result is determined according to comparison result.
In some embodiments, the above method further include: store at least one above-mentioned daily record data set to preset Database, wherein the data in above-mentioned database are classified by application programming interface.
In some embodiments, the above method further include: receive inquiry request, wherein above-mentioned inquiry request includes interface Mark and query time section;According to above-mentioned interface identifier and above-mentioned query time section, daily record data is obtained from above-mentioned database, with And send acquired daily record data.
Second aspect, the embodiment of the present disclosure provide it is a kind of for sending the device of information, above-mentioned apparatus include: obtain it is single Member is configured to obtain at least one daily record data that gateway server generates in preset duration, wherein daily record data includes The recalls information and returned data amount of application programming interface;Division unit is configured to above-mentioned at least one log number According to being divided, at least one daily record data set is obtained, wherein the tune that the daily record data in same daily record data set includes Same application programming interface is indicated with information;Analytical unit is configured at least one above-mentioned daily record data set In daily record data set, the daily record data in the daily record data set is analyzed, it is right to obtain daily record data set institute The called number and return total amount of data for the application programming interface answered;Transmission unit is configured to send obtained The called number and return total amount of data of application programming interface.
In some embodiments, above-mentioned apparatus further include: monitoring unit is configured at least one above-mentioned log number According to the daily record data set in set, following monitoring step is executed: answering corresponding to the daily record data set obtained to analysis Anomalous identification is carried out with the called number of Program Interfaces and return total amount of data;In response to determining the daily record data set There is exception in the called number and/or return total amount of data of corresponding application programming interface, to preset recipient Send abnormal prompt information.
In some embodiments, application programming interface corresponding to above-mentioned daily record data set obtained to analysis Called number and return to total amount of data and carry out anomalous identification, comprising: will be corresponding to the obtained daily record data set of analysis Application programming interface called number and return to total amount of data, return to total data be called number and history of history Amount is compared;Anomalous identification result is determined according to comparison result.
In some embodiments, above-mentioned apparatus further include: storage unit is configured at least one above-mentioned daily record data Preset database is arrived in set storage, wherein the data in above-mentioned database are classified by application programming interface.
In some embodiments, above-mentioned apparatus further include: receiving unit is configured to receive inquiry request, wherein above-mentioned Inquiry request includes interface identifier and query time section;Query unit is configured to according to above-mentioned interface identifier and above-mentioned inquiry Period obtains daily record data from above-mentioned database, and sends acquired daily record data.
The third aspect, the embodiment of the present disclosure provide a kind of server, which includes: one or more processors; Storage device is stored thereon with one or more programs, when said one or multiple programs are by said one or multiple processors When execution, so that said one or multiple processors realize the method as described in implementation any in first aspect.
Fourth aspect, the embodiment of the present disclosure provide a kind of computer-readable medium, are stored thereon with computer program, In, the method as described in implementation any in first aspect is realized when which is executed by processor.
The method and apparatus for sending information that the embodiment of the present disclosure provides, acquisition gateway server first is when default At least one daily record data generated in long, wherein daily record data includes the recalls information and return of application programming interface Data volume.Later, at least one daily record data is divided, obtains at least one daily record data set, wherein same log The recalls information that daily record data in data acquisition system includes indicates same application programming interface.Then, at least one Each of daily record data set daily record data set is analyzed the daily record data in the daily record data set, is obtained The called number and return total amount of data of application programming interface corresponding to the daily record data set.Finally, sending institute The called number and return total amount of data of obtained application programming interface.To realize by application programming interface It analyzes called number and returns to total amount of data, and by the called number of each application programming interface and return to total amount of data It is sent.
Detailed description of the invention
By reading a detailed description of non-restrictive embodiments in the light of the attached drawings below, the disclosure is other Feature, objects and advantages will become more apparent upon:
Fig. 1 is that one embodiment of the disclosure can be applied to exemplary system architecture figure therein;
Fig. 2 is the flow chart according to one embodiment of the method for sending information of the disclosure;
Fig. 3 is the schematic diagram according to an application scenarios of the method for sending information of the disclosure;
Fig. 4 is the flow chart according to another embodiment of the method for sending information of the disclosure;
Fig. 5 is the structural schematic diagram according to one embodiment of the device for sending information of the disclosure;
Fig. 6 is adapted for the structural schematic diagram for the computer system for realizing the server of the embodiment of the present disclosure.
Specific embodiment
The disclosure 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, part relevant to related invention is illustrated only in attached drawing.
It should be noted that in the absence of conflict, the feature in embodiment and embodiment in the disclosure can phase Mutually combination.The disclosure is described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Fig. 1 is shown can the method for sending information using the embodiment of the present disclosure or the device for sending information Exemplary system architecture 100.
As shown in Figure 1, system architecture 100 may include terminal device 101,102,103, network 104, gateway server 105, capable server 106 and server 107.Network 104 is in terminal device 101,102,103 and gateway server 105 Between, it is provided between gateway server 105 and capable server 106 and between gateway server 105 and server 107 logical Believe the medium of link.Network 104 may include various connection types, such as wired, wireless communication link or fiber optic cables etc. Deng.
User can be used terminal device 101,102,103 and call API by network 104 and gateway server 105, come real Now with the interaction of capable server 106, with access ability server 106.It can be equipped on terminal device 101,102,103 each Kind telecommunication customer end application, such as web browser applications, shopping class application, searching class application, instant messaging tools, mailbox visitor Family end, social platform software etc..
Terminal device 101,102,103 can be hardware, be also possible to software.When terminal device 101,102,103 is hard When part, it can be the various electronic equipments with display screen and supported web page browsing, including but not limited to smart phone, plate Computer, E-book reader, pocket computer on knee and desktop computer etc..When terminal device 101,102,103 is soft When part, it may be mounted in above-mentioned cited electronic equipment.Its may be implemented into multiple softwares or software module (such as Distributed Services are provided), single software or software module also may be implemented into.It is not specifically limited herein.
Gateway server 105 can provide various services, for example, being sent out according to user by terminal device 101,102,103 The API Calls request sent, the API of call capability server 106 realize access of the user to capable server 106.In another example The daily record data of generation is sent to server 107, so that server 107 is analyzed and processed.
Capable server 106 is the server that service ability is opened to the outside world by API.
Server 107 can be to provide the server of various services, for example, to gateway server 105 send daily record data into The background server of row analysis processing.Backstage web page server can carry out the daily record data received the processing such as analyzing, and Processing result (such as the called number of application programming interface and return total amount of data) is sent.
It, can also be with it should be noted that gateway server 105, capable server 106 and server 107 can be hardware It is software.When gateway server 105, capable server 106 and server 107 are hardware, multiple servers may be implemented into The distributed server cluster of composition, also may be implemented into individual server.When above-mentioned gateway server 105, capable server 106 and server 107 be software when, multiple softwares or software module (such as providing Distributed Services) may be implemented into, Also single software or software module may be implemented into.It is not specifically limited herein.
It should be understood that the number of terminal device, network, gateway server, capable server and server in Fig. 1 is only It is schematical.According to needs are realized, any number of terminal device, network, gateway server, capable server can have And server.
It should be noted that the method provided by the embodiment of the present disclosure for sending information is generally held by server 107 Row, correspondingly, the device for sending information is generally positioned in server 107.
With continued reference to Fig. 2, the process of one embodiment of the method for sending information according to the disclosure is shown 200.The method for being used to send information, comprising the following steps:
Step 201, at least one daily record data that gateway server generates in preset duration is obtained.
It in the present embodiment, can be with for sending the executing subject (such as server 107 shown in FIG. 1) of the method for information Gateway server (such as gateway server 105 shown in FIG. 1) is obtained by wired connection mode or radio connection to exist At least one daily record data generated in preset duration.Wherein, daily record data may include the calling of application programming interface Information and returned data amount.Here, preset duration can be set according to actual needs, for example, in one day, in one month etc. Deng.
In general, user's (or caller) wants to provide using capable server (such as capable server 106 shown in FIG. 1) Processing capacity, can use terminal (such as terminal device shown in FIG. 1 101,102,103) by gateway server and call energy The API of power server, to realize the access to capable server.As soon as every calling time API, gateway server generate a log Data.Daily record data may include the recalls information and returned data amount of API.Here, the recalls information of API may include calling Time, caller mark etc..Returned data amount can refer to the number that terminal used in caller is obtained from capable server According to data volume.In practice, gateway server can manage multiple API.Therefore, above-mentioned at least one daily record data can be needle The daily record data that multiple API are generated.
Step 202, at least one daily record data is divided, obtains at least one daily record data set.
In the present embodiment, executing subject can divide at least one daily record data obtained in step 201, from And obtain at least one daily record data set.Wherein, the recalls information that the daily record data in same daily record data set includes refers to Show same API.Specifically, the daily record data generated for same API can be divided into same log data set by executing subject It closes.
Step 203, for the daily record data set at least one daily record data set, in the daily record data set Daily record data is analyzed, and called number and the return of application programming interface corresponding to the daily record data set are obtained Total amount of data.
In the present embodiment, for each of at least one daily record data set for being divided in step 202 day Will data acquisition system, executing subject can analyze the daily record data in the daily record data set, to obtain the log number According to the called number for gathering targeted API and return to total amount of data.As an example, executing subject can count the log number According to the item number of daily record data included in set, and using the obtained item number API's targeted as the daily record data set Called number.Executing subject can also carry out the returned data amount in each log information in the daily record data set It is added, and the return total amount of data of the value that the will add up API targeted as the daily record data set.
Step 204, it sends the called number of obtained application programming interface and returns to total amount of data.
In the present embodiment, executing subject can by obtained in step 203 be directed to each API called number and return It returns total amount of data and is sent to preset receiving party.By taking receiving party is scheduled financial system as an example, executing subject can Financial system is sent to will be directed to the called number of each API and return to total amount of data.Financial system can be according to being directed to The called number and return total amount of data of each API generates metering data, which can be used as the publisher to API The foundation and reference charged.For example, financial system can with charging that prespecified API is called primary unit price, with And return to the charging unit price of unit data quantity.In this way, in conjunction with the called number and return total amount of data of each API, finance System, which can be calculated, to be needed for the API to publisher's fee charged.In some scenarios, some publisher may send out The multiple API of cloth, at this point it is possible to the expense for multiple API that the publisher is issued is overlapped, and using stack result as this The expense paid required for publisher.
In some optional implementations of the present embodiment, the above-mentioned method for sending information can also include as follows Content: by least one daily record data set storage to preset database, wherein the data in database are compiled by application program Journey interface is classified.
In this implementation, executing subject can be stored at least one daily record data set obtained in step 202 To preset database.Here, the data in database can classify by API.For example, it is raw will to be directed to same API At daily record data be divided into same class, and stored after of a sort daily record data is ranked up by allocating time.
In some optional implementations, the above-mentioned method for sending information can also include following content:
Firstly, receiving inquiry request.
In this implementation, executing subject can receive the inquiry request of other equipment transmission.Wherein, above-mentioned inquiry is asked Ask may include interface identifier and query time section.Here, above-mentioned interface identifier can be used for one application program of unique identification Programming interface.Query time section may include inquiry initial time and poll-final time.
Then, according to interface identifier and query time section, daily record data is obtained from database, and send acquired day Will data.
In this implementation, executing subject can determine that inquiry is targeted according to the interface identifier in inquiry request first Target API.Later, from obtaining in above-mentioned database, target API is corresponding and allocating time is located at log in query time section Data.Then, acquired daily record data is sent to the equipment for sending inquiry request.
With continued reference to the signal that Fig. 3, Fig. 3 are according to the application scenarios of the method for sending information of the present embodiment Figure.In the application scenarios of Fig. 3, server 301 obtains at least one that gateway server 302 generates in preset duration first Daily record data, wherein daily record data includes the recalls information and returned data amount of API.Later, server 301 is at least one Daily record data is divided, at least one daily record data set is obtained, wherein the daily record data packet in same daily record data set The recalls information included indicates same API.Then, for each of at least one daily record data set daily record data set, Server 301 can analyze the daily record data in the daily record data set, obtain corresponding to the daily record data set The called number and return total amount of data of API.Finally, server 301 sends the called number of obtained each API and returns Return total amount of data.In this application scene, server 301 can be sent the called number of each API and return total amount of data To scheduled financial system, so that financial system carries out charging.
The method provided by the above embodiment of the disclosure realize by application programming interface analyze called number and Total amount of data is returned, and the called number of each application programming interface and return total amount of data are sent.
With further reference to Fig. 4, it illustrates the processes 400 of another embodiment of the method for sending information.The use In the process 400 for the method for sending information, comprising the following steps:
Step 401, at least one daily record data that gateway server generates in preset duration is obtained.
In the present embodiment, step 401 is similar with the step 201 of embodiment illustrated in fig. 2, and details are not described herein again.
Step 402, at least one daily record data is divided, obtains at least one daily record data set.
In the present embodiment, step 402 is similar with the step 202 of embodiment illustrated in fig. 2, and details are not described herein again.
Step 403, for the daily record data set at least one daily record data set, in the daily record data set Daily record data is analyzed, and called number and the return of application programming interface corresponding to the daily record data set are obtained Total amount of data.
In the present embodiment, step 403 is similar with the step 203 of embodiment illustrated in fig. 2, and details are not described herein again.
Step 404, it sends the called number of obtained application programming interface and returns to total amount of data.
In the present embodiment, step 404 is similar with the step 204 of embodiment illustrated in fig. 2, and details are not described herein again.
Step 405, for the daily record data set at least one daily record data set, monitoring step 4051~step is executed Rapid 4052.
In the present embodiment, for each of at least one daily record data set log number obtained in step 402 According to set, executing subject can execute step 4051~step 4052.
Step 4051, called time of application programming interface corresponding to the daily record data set obtained to analysis Number and return total amount of data carry out anomalous identification.
In the present embodiment, API's corresponding to the daily record data set that executing subject can obtain analysis is adjusted Anomalous identification is carried out with number and return total amount of data.As an example, called frequency threshold value can be preset and returned total Data-quantity threshold.In this way, if the called number of API corresponding to the daily record data set is more than preset called number It is abnormal can then to determine that the called number of API corresponding to the daily record data set occurs for threshold value.If the log data set The return total amount of data for closing corresponding API is more than preset return total amount of data threshold value, then can determine the log data set There is exception in the return total amount of data for closing corresponding API.
In some optional implementations of the present embodiment, step 4051 specific as follows can be carried out:
Firstly, by the called number of application programming interface corresponding to the obtained daily record data set of analysis and Total amount of data is returned, total amount of data is returned be called number and history of history and is compared.
In this implementation, the quilt of API corresponding to the daily record data set that executing subject can obtain analysis Call number and return total amount of data return to total amount of data with the called number of the history of the API and history respectively and are compared. It is compared for example, returning to total amount of data with the called number of the history in the upper preset duration of the API and history.
Then, anomalous identification result is determined according to comparison result.
In this implementation, executing subject can determine anomalous identification result according to comparison result.For example, if Difference between the called number of API corresponding to the daily record data set and the called number of the history of the API is greater than pre- If threshold value, then it can determine that the anomalous identification result of the called number of API corresponding to the daily record data set is abnormal.Such as The return total amount of data of API corresponding to the fruit daily record data set and the history of the API return to the difference between total amount of data Greater than preset threshold, then the anomalous identification result of the return total amount of data of API corresponding to the daily record data set can be determined For exception.
Step 4052, in response to the called number of application programming interface corresponding to the determining daily record data set And/or return to total amount of data and exception occur, abnormal prompt information is sent to preset recipient.
In this implementation, if it is determined that the called number of API corresponding to the daily record data set and/or return There is exception in total amount of data, then executing subject can send abnormal prompt information to preset recipient.Wherein, abnormal prompt is believed Breath may include the interface identifier of API corresponding to the daily record data set.Abnormal prompt information can be used for prompting recipient The calling of API corresponding to interface identifier occurs abnormal.
Figure 4, it is seen that the method for sending information compared with the corresponding embodiment of Fig. 2, in the present embodiment Process 400 highlight to the called number of API and return to the step of total amount of data is monitored.The present embodiment is retouched as a result, The scheme stated also achieves the monitoring to data, improves while being analyzed called number by API and being returned to total amount of data The safety of the opening of API.
With further reference to Fig. 5, as the realization to method shown in above-mentioned each figure, present disclose provides one kind for sending letter One embodiment of the device of breath, the Installation practice is corresponding with embodiment of the method shown in Fig. 2, which can specifically answer For in various electronic equipments.
As shown in figure 5, the present embodiment includes: acquiring unit 501, division unit for sending the device 500 of information 502, analytical unit 503 and transmission unit 504.Wherein, acquiring unit 501 is configured to obtain gateway server in preset duration At least one daily record data of interior generation, wherein daily record data includes the recalls information and return number of application programming interface According to amount;Division unit 502 is configured to divide above-mentioned at least one daily record data, obtains at least one log data set It closes, wherein the recalls information that the daily record data in same daily record data set includes indicates same application programming interface;Point Analysis unit 503 is configured to for the daily record data set at least one above-mentioned daily record data set, to the log data set Daily record data in conjunction is analyzed, and the called number of application programming interface corresponding to the daily record data set is obtained With return total amount of data;Transmission unit 504 be configured to send obtained application programming interface called number and Return to total amount of data.
In the present embodiment, for sending acquiring unit 501, the division unit 502, analytical unit of the device 500 of information 503 and transmission unit 504 specific processing and its brought technical effect can be respectively with reference to step in Fig. 2 corresponding embodiment 201, the related description of step 202, step 203 and step 204, details are not described herein.
In some optional implementations of the present embodiment, above-mentioned apparatus 500 further include: monitoring unit (does not show in figure Out), it is configured to execute following monitoring step: right for the daily record data set at least one above-mentioned daily record data set Analyze the called number of application programming interface corresponding to the obtained daily record data set and return total amount of data into Row anomalous identification;In response to determine the daily record data set corresponding to application programming interface called number and/or It returns to total amount of data and exception occurs, send abnormal prompt information to preset recipient.
In some optional implementations of the present embodiment, corresponding to above-mentioned daily record data set obtained to analysis Application programming interface called number and return total amount of data carry out anomalous identification, comprising: by analysis obtain should The called number and return total amount of data of application programming interface corresponding to daily record data set, with history called time Several and history returns to total amount of data and is compared;Anomalous identification result is determined according to comparison result.
In some optional implementations of the present embodiment, above-mentioned apparatus 500 further include: storage unit (is not shown in figure Out), it is configured to store at least one above-mentioned daily record data set to preset database, wherein in above-mentioned database Data are classified by application programming interface.
In some optional implementations of the present embodiment, above-mentioned apparatus 500 further include: receiving unit (does not show in figure Out), it is configured to receive inquiry request, wherein above-mentioned inquiry request includes interface identifier and query time section;Query unit (not shown), is configured to according to above-mentioned interface identifier and above-mentioned query time section, obtains log number from above-mentioned database According to, and send acquired daily record data.
Below with reference to Fig. 6, it illustrates the electronic equipment that is suitable for being used to realize embodiment of the disclosure, (example is as shown in figure 1 Server) 600 structural schematic diagram.Server shown in Fig. 6 is only an example, should not be to the function of embodiment of the disclosure Any restrictions can be brought with use scope.
As shown in fig. 6, electronic equipment 600 may include processing unit (such as central processing unit, graphics processor etc.) 601, random access can be loaded into according to the program being stored in read-only memory (ROM) 602 or from storage device 608 Program in memory (RAM) 603 and execute various movements appropriate and processing.In RAM 603, it is also stored with electronic equipment Various programs and data needed for 600 operations.Processing unit 601, ROM 602 and RAM603 are connected with each other by bus 604. Input/output (I/O) interface 605 is also connected to bus 604.
In general, following device can connect to I/O interface 605: including such as touch screen, touch tablet, keyboard, mouse, taking the photograph As the input unit 606 of head, microphone, accelerometer, gyroscope etc.;Including such as liquid crystal display (LCD), loudspeaker, vibration The output device 607 of dynamic device etc.;Storage device 608 including such as tape, hard disk etc.;And communication device 609.Communication device 609, which can permit electronic equipment 600, is wirelessly or non-wirelessly communicated with other equipment to exchange data.Although Fig. 6 shows tool There is the electronic equipment 600 of various devices, it should be understood that being not required for implementing or having all devices shown.It can be with Alternatively implement or have more or fewer devices.Each box shown in Fig. 6 can represent a device, can also root According to needing to represent multiple devices.
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 from network by communication device 609, or from storage device 608 It is mounted, or is mounted from ROM 602.When the computer program is executed by processing unit 601, the implementation of the disclosure is executed The above-mentioned function of being limited in the method for example.
It is situated between it should be noted that computer-readable medium described in embodiment of the disclosure can be computer-readable signal Matter or computer readable storage medium either the two any combination.Computer readable storage medium for example can be with System, device or the device of --- but being not limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor, or it is any more than Combination.The more specific example of computer readable storage medium can include but is not limited to: have one or more conducting wires Electrical connection, portable computer diskette, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type are programmable Read-only memory (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic are deposited Memory device or above-mentioned any appropriate combination.In embodiment of the disclosure, computer readable storage medium, which can be, appoints What include or the tangible medium of storage program that the program can be commanded execution system, device or device use or and its It is used in combination.And in embodiment of the disclosure, computer-readable signal media may include in a base band or as carrier wave The data-signal that a part is propagated, wherein carrying computer-readable program code.The data-signal of this propagation can be adopted With diversified forms, including but not limited to electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal is situated between Matter can also be any computer-readable medium other than computer readable storage medium, which can be with It sends, propagate or transmits for by the use of instruction execution system, device or device or program in connection.Meter The program code for including on calculation machine readable medium can transmit with any suitable medium, including but not limited to: electric wire, optical cable, RF (radio frequency) etc. or above-mentioned any appropriate combination.
Above-mentioned computer-readable medium can be included in above-mentioned electronic equipment;It is also possible to individualism, and not It is fitted into the electronic equipment.Above-mentioned computer-readable medium carries one or more program, when said one or more When a program is executed by the electronic equipment, so that the electronic equipment: obtaining gateway server and generated at least in preset duration One daily record data, wherein daily record data includes the recalls information and returned data amount of application programming interface;To it is above-mentioned extremely A few daily record data is divided, and obtains at least one daily record data set, wherein the log in same daily record data set The recalls information that data include indicates same application programming interface;For the day at least one above-mentioned daily record data set Will data acquisition system analyzes the daily record data in the daily record data set, obtains answering corresponding to the daily record data set With the called number and return total amount of data of Program Interfaces;Send the called of obtained application programming interface Number and return total amount of data.
The behaviour for executing embodiment of the disclosure can be write with one or more programming languages or combinations thereof The computer program code of work, described program design language include object oriented program language-such as Java, Smalltalk, C++ further include conventional procedural programming language-such as " C " language or similar program design language Speech.Program code can be executed fully on the user computer, partly be executed on the user computer, as an independence Software package execute, part on the user computer part execute on the remote computer or completely in remote computer or It is executed on server.In situations involving remote computers, remote computer can pass through the network of any kind --- packet It includes local area network (LAN) or wide area network (WAN)-is connected to subscriber computer, or, it may be connected to outer computer (such as benefit It is connected with ISP by internet).
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the disclosure, 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 of one module, program segment or code of table, a part of the module, program segment or code include one or more use The executable instruction of the logic function as defined in realizing.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, and this depends on the function involved.Also it to infuse 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 embodiment of the disclosure can be realized by way of software, can also be passed through The mode of hardware is realized.Described unit also can be set in the processor, for example, can be described as: a kind of processor Including acquiring unit, division unit, analytical unit and transmission unit.Wherein, the title of these units is not under certain conditions The restriction to the unit itself is constituted, for example, acquiring unit is also described as " obtaining gateway server in preset duration The unit of at least one daily record data generated ".
Above description is only the preferred embodiment of the disclosure and the explanation to institute's application technology principle.Those skilled in the art Member it should be appreciated that embodiment of the disclosure involved in invention scope, however it is not limited to the specific combination of above-mentioned technical characteristic and At technical solution, while should also cover do not depart from foregoing invention design in the case where, by above-mentioned technical characteristic or its be equal Feature carries out any combination and other technical solutions for being formed.Such as disclosed in features described above and embodiment of the disclosure (but It is not limited to) technical characteristic with similar functions is replaced mutually and the technical solution that is formed.

Claims (12)

1. a kind of method for sending information, comprising:
Obtain at least one daily record data that gateway server generates in preset duration, wherein daily record data includes applying journey The recalls information and returned data amount of sequence programming interface;
At least one daily record data is divided, obtains at least one daily record data set, wherein same daily record data The recalls information that daily record data in set includes indicates same application programming interface;
For the daily record data set at least one described daily record data set, to the daily record data in the daily record data set It is analyzed, obtain the called number of application programming interface corresponding to the daily record data set and returns to total data Amount;
It sends the called number of obtained application programming interface and returns to total amount of data.
2. according to the method described in claim 1, wherein, the method also includes:
For the daily record data set at least one described daily record data set, executes following monitoring step: analysis is obtained The daily record data set corresponding to application programming interface called number and return to total amount of data and carry out abnormal knowledge Not;In response to determining the called number of application programming interface corresponding to the daily record data set and/or returning to sum There is exception according to amount, sends abnormal prompt information to preset recipient.
3. according to the method described in claim 2, wherein, described pair is analyzed application corresponding to the obtained daily record data set The called number and return total amount of data of Program Interfaces carry out anomalous identification, comprising:
The called number and return sum of application programming interface corresponding to the daily record data set that analysis is obtained According to amount, number is called with history and history returns to total amount of data and is compared;
Anomalous identification result is determined according to comparison result.
4. according to the method described in claim 1, wherein, the method also includes:
Will at least one daily record data set storage to preset database, wherein data in the database are by answering Classified with Program Interfaces.
5. according to the method described in claim 4, wherein, the method also includes:
Receive inquiry request, wherein the inquiry request includes interface identifier and query time section;
According to the interface identifier and the query time section, daily record data is obtained from the database, and acquired in transmission Daily record data.
6. a kind of for sending the device of information, comprising:
Acquiring unit is configured to obtain at least one daily record data that gateway server generates in preset duration, wherein day Will data include the recalls information and returned data amount of application programming interface;
Division unit is configured to divide at least one daily record data, obtains at least one daily record data set, Wherein, the recalls information that the daily record data in same daily record data set includes indicates same application programming interface;
Analytical unit is configured to for the daily record data set at least one described daily record data set, to the log number It is analyzed according to the daily record data in set, obtains the called of application programming interface corresponding to the daily record data set Number and return total amount of data;
Transmission unit is configured to send the called number of obtained application programming interface and returns to total amount of data.
7. device according to claim 6, wherein described device further include:
Monitoring unit is configured to execute following prison for the daily record data set at least one described daily record data set Control step: the called number of application programming interface corresponding to the daily record data set obtained to analysis and return are total Data volume carries out anomalous identification;In response to determining called time of application programming interface corresponding to the daily record data set There is exception in number and/or return total amount of data, send abnormal prompt information to preset recipient.
8. device according to claim 7, wherein described pair is analyzed application corresponding to the obtained daily record data set The called number and return total amount of data of Program Interfaces carry out anomalous identification, comprising:
The called number and return sum of application programming interface corresponding to the daily record data set that analysis is obtained According to amount, number is called with history and history returns to total amount of data and is compared;
Anomalous identification result is determined according to comparison result.
9. device according to claim 6, wherein described device further include:
Storage unit is configured to store at least one described daily record data set to preset database, wherein the number Classify according to the data in library by application programming interface.
10. device according to claim 9, wherein described device further include:
Receiving unit is configured to receive inquiry request, wherein the inquiry request includes interface identifier and query time section;
Query unit, is configured to according to the interface identifier and the query time section, obtains log number from the database According to, and send acquired daily record data.
11. a kind of server, comprising:
One or more processors;
Storage device is stored thereon with 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 Now such as method as claimed in any one of claims 1 to 5.
12. a kind of computer-readable medium, is stored thereon with computer program, wherein real when described program is executed by processor Now such as method as claimed in any one of claims 1 to 5.
CN201910228593.XA 2019-03-25 2019-03-25 Method and apparatus for transmitting information Active CN109933508B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910228593.XA CN109933508B (en) 2019-03-25 2019-03-25 Method and apparatus for transmitting information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910228593.XA CN109933508B (en) 2019-03-25 2019-03-25 Method and apparatus for transmitting information

Publications (2)

Publication Number Publication Date
CN109933508A true CN109933508A (en) 2019-06-25
CN109933508B CN109933508B (en) 2023-02-24

Family

ID=66988096

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910228593.XA Active CN109933508B (en) 2019-03-25 2019-03-25 Method and apparatus for transmitting information

Country Status (1)

Country Link
CN (1) CN109933508B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110673973A (en) * 2019-09-27 2020-01-10 聚好看科技股份有限公司 Application programming interface API (application programming interface) abnormity determining method and device
CN111756579A (en) * 2020-06-24 2020-10-09 北京百度网讯科技有限公司 Abnormity early warning method, device, equipment and storage medium
CN114185848A (en) * 2020-09-15 2022-03-15 中国移动通信集团山东有限公司 Interface state generation method and device, computer equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070294673A1 (en) * 2006-06-16 2007-12-20 Microsoft Corporation Automated method and system for collecting and reporting API performance profiles
CN106096034A (en) * 2016-06-27 2016-11-09 乐视控股(北京)有限公司 application log management method and device
CN107330034A (en) * 2017-06-26 2017-11-07 百度在线网络技术(北京)有限公司 A kind of log analysis method and device, computer equipment, storage medium
CN108076090A (en) * 2016-11-11 2018-05-25 华为技术有限公司 Data processing method and storage management system
CN108933695A (en) * 2018-06-25 2018-12-04 百度在线网络技术(北京)有限公司 Method and apparatus for handling information

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070294673A1 (en) * 2006-06-16 2007-12-20 Microsoft Corporation Automated method and system for collecting and reporting API performance profiles
CN106096034A (en) * 2016-06-27 2016-11-09 乐视控股(北京)有限公司 application log management method and device
CN108076090A (en) * 2016-11-11 2018-05-25 华为技术有限公司 Data processing method and storage management system
CN107330034A (en) * 2017-06-26 2017-11-07 百度在线网络技术(北京)有限公司 A kind of log analysis method and device, computer equipment, storage medium
CN108933695A (en) * 2018-06-25 2018-12-04 百度在线网络技术(北京)有限公司 Method and apparatus for handling information

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110673973A (en) * 2019-09-27 2020-01-10 聚好看科技股份有限公司 Application programming interface API (application programming interface) abnormity determining method and device
CN110673973B (en) * 2019-09-27 2024-02-13 聚好看科技股份有限公司 Abnormality determination method and device for application programming interface API
CN111756579A (en) * 2020-06-24 2020-10-09 北京百度网讯科技有限公司 Abnormity early warning method, device, equipment and storage medium
CN114185848A (en) * 2020-09-15 2022-03-15 中国移动通信集团山东有限公司 Interface state generation method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN109933508B (en) 2023-02-24

Similar Documents

Publication Publication Date Title
US11593400B1 (en) Automatic triage model execution in machine data driven monitoring automation apparatus
US10942960B2 (en) Automatic triage model execution in machine data driven monitoring automation apparatus with visualization
CN109299348A (en) A kind of data query method, apparatus, electronic equipment and storage medium
CN106547578A (en) The loading method and device of terminal applies APP
CN109933508A (en) Method and apparatus for sending information
EP3373142A1 (en) Systems and methods for real time message processing using an event driven framework
CN109446309A (en) Problem feedback method and device
CN108897854A (en) A kind of monitoring method and device of overtime task
CN109447635A (en) Information storage means and device for block chain
CN109471976A (en) Processing method, device, electronic equipment and the storage medium of web page operation data
US8687772B2 (en) Global tree rules for an interactive voice response system
CN110008050A (en) Method and apparatus for handling information
CN109918146A (en) Page generation method and device
CN109656799A (en) Test method and device
CN110059172A (en) The method and apparatus of recommendation answer based on natural language understanding
CN109885564A (en) Method and apparatus for sending information
CN109165077A (en) A kind of web page processing method, device, electronic equipment and storage medium
CN108021462A (en) Method and apparatus for calling cloud service
CN108011936A (en) Method and apparatus for pushed information
CN108959294A (en) A kind of method and apparatus accessing search engine
CN110134872A (en) Determination method, apparatus, server and the readable medium on information notice opportunity
CN110517415A (en) Method and apparatus for output information
CN111448551A (en) Method and system for tracking application activity data from a remote device and generating corrective action data structures for the remote device
CN112260933B (en) Communication method, communication device, electronic equipment and medium
CN112363716A (en) Method, system and device for dynamically assembling evaluation model

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