CN110321287A - A kind of detection method of server capability, device and electronic equipment - Google Patents
A kind of detection method of server capability, device and electronic equipment Download PDFInfo
- Publication number
- CN110321287A CN110321287A CN201910537771.7A CN201910537771A CN110321287A CN 110321287 A CN110321287 A CN 110321287A CN 201910537771 A CN201910537771 A CN 201910537771A CN 110321287 A CN110321287 A CN 110321287A
- Authority
- CN
- China
- Prior art keywords
- server
- service function
- destination service
- test case
- solicited message
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/18—File system types
- G06F16/1873—Versioning file systems, temporal file systems, e.g. file system supporting different historic versions of files
Abstract
The embodiment of the invention provides a kind of detection method of server capability, device and electronic equipments.This method comprises: obtaining the test case tested the destination service function of server;The first solicited message in the test case is executed, corresponding first response message of first solicited message is obtained;If intended response status code and the first responsive state code be not identical, or expected file fingerprint and first file fingerprint it is not identical, it is determined that the server does not have destination service function.Due in the embodiment of the present application, by periodically testing server, so that whether the version for realizing the corresponding storage configuration file of certain component on real-time detection server is latest edition.
Description
Technical field
The present invention relates to Internet technical fields, more particularly to a kind of detection method of server capability, device and electricity
Sub- equipment.
Background technique
Every server has multiple components with certain service function, and the corresponding configuration file of each component.By
Which type of service can be provided by controlling server in configuration file.Therefore, research staff can be by updating every clothes
The corresponding configuration file of component on business device, to realize that updating this server is the service type that the network user provides.When grinding
Hair staff development goes out on server after the corresponding configuration file of some component, directly stores it in storage server.It deposits
After storage server receives updated configuration file, configuration file will not be sent to the server and update prompt information.
In the prior art, after server receives the request information on services of terminal device transmission, if the server is not
When can respond to the solicited message, then the server sends response failed message to the terminal device.When server is to end
When end equipment sends preset number response failed message, which sends configuration file to storage server and detects message,
And receive the updated configuration file of storage server transmission.
Obviously, the condition detected in the prior art to the corresponding configuration file of component on server is to reach present count
Mesh responds failed message.In general, the corresponding configuration file of each component is not latest edition on server, and therefore, service
If whether the version that device fails the corresponding configuration file of each component on the detection service device of timely active is latest edition, can
Server is caused normally not provide service for terminal device, to reduce the availability of server.
Summary of the invention
The detection method for being designed to provide a kind of server capability, device and the electronic equipment of the embodiment of the present invention, with
Improve the availability of server.
Specific technical solution is as follows:
In a first aspect, the embodiment of the invention provides a kind of detection methods of server capability, which comprises obtain
The test case that the destination service function of server is tested;
Obtain the test case tested the destination service function of server;Wherein, include in the test case
Analog subscriber requests the first solicited message and expected expectation information of the destination service function, and the expected expectation information includes
Intended response status code and expected file fingerprint;
First solicited message in the test case is executed, corresponding first sound of first solicited message is obtained
Answer information, wherein first response message includes the first responsive state code and the first file fingerprint;
If the intended response status code and the first responsive state code be identical or the expected file fingerprint and institute
It is not identical to state the first file fingerprint, it is determined that the server does not have destination service function.
It optionally, may include target identity information in first solicited message;
In first solicited message executed in the test case, it is corresponding to obtain first solicited message
Before first response message, can also include:
Judge to the target identity information in first solicited message, if having and request the destination service function
The permission of energy;
If the target identity information has the permission for requesting the destination service function, the test case is executed
In first solicited message, the step of obtaining first solicited message corresponding first response message.
Optionally, the target identity information may include account identification;
The judgement is to the target identity information in first solicited message, if has and requests the target clothes
The step of permission for function of being engaged in, may include:
Based on preset hash function, the first private key and the account identification, the account identification corresponding first is calculated
Random value;
Based on preset hash function, the second private key and the account identification, the account identification corresponding second is calculated
Random value;
Judge whether first random value and the second random value are identical;
If first random value and the second random value are identical, it is determined that the target identities letter in the test case
Ceasing has the permission for requesting the destination service function.
Optionally, the method can also include:
If the server does not have destination service function, the destination service function pair is obtained from storage server
The configuration file answered.
Optionally, the number of the test case is multiple;It is described that the destination service function is obtained from storage server
The step of energy corresponding configuration file, may include:
Count the successful test case number of the destination service functional test to the server;
If the test case number is less than preset threshold, the destination service function pair is obtained from storage server
The configuration file answered.
Second aspect, the embodiment of the invention provides the detection device of server capability, described device includes:
Test case obtains module, the test case that the destination service function for obtaining to server is tested;Its
In, request the first solicited message of the destination service function and expected expectation to be believed comprising analog subscriber in the test case
Breath, the expected expectation information includes intended response status code and expected file fingerprint;
First response message obtains module, for executing first solicited message in the test case, obtains institute
State corresponding first response message of the first solicited message, wherein first response message includes the first responsive state code and the
One file fingerprint;
Destination service function determining module, if for the intended response status code and the first responsive state code not phase
Together or the expected file fingerprint and first file fingerprint it is not identical, it is determined that the server does not have destination service
Function.
It optionally, can also include target identity information in first solicited message, described device can also include:
Judgment module judges to the target identity information in first solicited message, if has described in request
The permission of destination service function;
Determining module is adjusted if having the permission for requesting the destination service function for the target identity information
Module is obtained with the first response message.
Optionally, the target identity information may include account identification;
The judgment module may include:
First computing unit calculates the account for being based on preset hash function, the first private key and the account identification
Family identifies corresponding first random value;
Second computing unit calculates the account for being based on preset hash function, the second private key and the account identification
Family identifies corresponding second random value;
Judging unit, for judging whether first random value and the second random value are identical;
Determination unit, if identical for first random value and the second random value, it is determined that first solicited message
In the target identity information there is the permission for requesting the destination service function.
Optionally, described device can also include:
Configuration file obtains module and obtains from storage server if the server does not have destination service function
The corresponding configuration file of the destination service function.
Optionally, the configuration file obtains module, may include:
Statistic unit, for counting the successful test case number of the destination service functional test to the server
Mesh;
Configuration file acquiring unit, if being less than preset threshold for the test case number, from storage server
Obtain the corresponding configuration file of the destination service function.
The third aspect, the embodiment of the invention provides a kind of electronic equipment, including processor, communication interface, memory and
Communication bus, wherein processor, communication interface, memory complete mutual communication by communication bus;
Memory, for storing computer program;
Processor when for executing the program stored on memory, realizes following methods step:
Obtain the test case tested the destination service function of server;Wherein, include in the test case
Analog subscriber requests the first solicited message and expected expectation information of the destination service function, and the expected expectation information includes
Intended response status code and expected file fingerprint;
First solicited message in the test case is executed, corresponding first sound of first solicited message is obtained
Answer information, wherein first response message includes the first responsive state code and the first file fingerprint;
If the intended response status code and the first responsive state code be identical or the expected file fingerprint and institute
It is not identical to state the first file fingerprint, it is determined that the server does not have destination service function.
Fourth aspect, it is described computer-readable to deposit the embodiment of the invention also provides a kind of computer readable storage medium
Computer program is stored in storage media, the computer program realizes any of the above-described server capability when being executed by processor
Detection method step.
The embodiment of the invention provides a kind of detection method of server capability, device and electronic equipments.This method comprises:
Obtain the test case tested the destination service function of server;Execute the first request letter in the test case
Breath, obtains corresponding first response message of first solicited message;If the intended response status code and first response
Status code is identical or the expected file fingerprint and first file fingerprint it is not identical, it is determined that the server does not have
Standby destination service function.Due to by periodically testing server, being examined in real time to realize in the embodiment of the present application
Whether the version for surveying the corresponding storage configuration file of certain component on server is latest edition.
Certainly, it implements any of the products of the present invention or method must be not necessarily required to reach all the above excellent simultaneously
Point.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described.
Fig. 1 is a kind of system schematic provided in an embodiment of the present invention;
Fig. 2 is a kind of flow diagram of the detection method of server capability provided in an embodiment of the present invention;
Fig. 3 is a kind of exemplary diagram of test case provided in an embodiment of the present invention;
Fig. 4 is a kind of structural schematic diagram of the detection device of server capability provided in an embodiment of the present invention;
Fig. 5 is the structural schematic diagram of a kind of electronic equipment provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description.
In order to improve the availability of server, the embodiment of the invention provides a kind of detection methods of server capability, dress
It sets and electronic equipment, is described in detail separately below.
A kind of detection method of server capability provided in an embodiment of the present invention is introduced first below.
The present invention provides a kind of detection method of server capability, the executing subject of this method can be a service
Device.Wherein, the server can be and meanwhile have to preset test case carry out authentication and to the test case after authentication into
The server of the functions such as row test.Meanwhile the executing subject of this method is also possible to multiple servers, i.e., is total to by multiple servers
With execution this method.As shown in Figure 1, being by multiple clothes in a kind of detection method of server capability provided in an embodiment of the present invention
In the case that business device executes jointly, a kind of system schematic provided in an embodiment of the present invention may include that storage takes in the system
Business device 10, test case management server 20, dispatch server 30 and testing service device 40.
Wherein, storage server 10 is for storing the corresponding latest edition of each service function possessed by different server
Configuration file.Test case management server 20 is for storing preset test case.The preset test case be for
Whether detection service device has the test case of service function recorded in the configuration file of its latest edition.Dispatch server
30 test case for sending to test case management server authenticates, and filters out for carrying out this to tested server
The test case of secondary test.Testing service device 40 is the tested server of pending destination service Function detection.
It is below the angle for thering are multiple servers to execute jointly from method provided by the invention, to one kind provided by the invention
The detection method of server capability is described in detail.
Fig. 2 is participated in, Fig. 2 is a kind of flow diagram of the detection method of server capability provided in an embodiment of the present invention,
Include the following steps:
S201 obtains the test case tested the destination service function of server.
In practical applications, the configuration file of the corresponding latest edition of research staff's various components on developing server
Later, the configuration file of the latest edition is stored in storage server.Meanwhile in the configuration text for each latest edition
Part, research staff are requested by the user of analog subscriber request target service function, to develop at least one for detecting
Certain server whether its latest edition configuration file record service function, and by the test case of generation be stored in test use
During example management server is used.For example, in order to test whether web page server is able to respond user's request with range parameter
(being referred to as the first solicited message), can be generated comprising test case as shown in Figure 3.As shown in figure 3, the test case
It specifically may include HTTP (hypertext transfer protocol, hypertext transfer protocol) request and expected expectation.It should
It is expected that expectation may include responsive state code status and file fingerprint MD5 (Message-Digest Algorithm5, message
Digest algorithm 5).Also, can also be comprising path (Chinese: environment) field in the test case, the meaning of the field is environment
Variable;Args (Chinese: reference parameter) field, the meaning of the field is reference to variable;RES_HEADER(request_
Header, request header) field, the meaning of the field is global request variable;(response_header is rung RPS_HEADER
Answer head), the meaning of the field is global response variable;Cache-Control (Chinese: buffer control) field, the field
Meaning is buffer control variable;Content-Length (Chinese: content-length) field, the meaning of the field is response contents word
Save length variable;Content-Range (Chinese: context) field, the meaning of the field is response contents bound variable;
Content-Type (Chinese: content type) field, the meaning of the field is response contents categorical variable;Access-
Control-Allow-Origin (Chinese: allows to control access domain) field, and the meaning of the field is domain variable.
Wherein, it may include the first solicited message of analog subscriber request target service function in test case and be expected the phase
Hope information, it is contemplated that expectation information includes intended response status code and expected file fingerprint.
In an implementation, every server (being referred to as tested server) can have a variety of service functions, in this hair
In bright embodiment, the service function of test pending in server can be known as destination service function.Server is according to default
Test case Selection Strategy the mesh to the server is obtained from test case management server for example, randomly select strategy
The test case that mark service function is tested.Wherein, the test case number got is at least 1.
S202, the first solicited message in implementation of test cases, obtains corresponding first response message of the first solicited message.
Wherein, the first response message may include the first responsive state code and the first file fingerprint.Responsive state code and text
Part fingerprint is all used to identify different data contents.Responsive state code is the state for indicating request results, for example, response shape
State code 200 indicates data acquisition success, and responsive state code 404 indicates that request data is not present.File fingerprint is according to preset
Hash function, the corresponding cryptographic Hash of each data file stored in calculated server.
In practical applications, when user needs to watch video (or webpage), user can be in the broadcasting of certain application program
The target video for needing to play is clicked in interface, terminal then generates corresponding user request information.Later, terminal asks the user
It asks information to be sent to dispatch server and carries out access privilege authentication.Only when the terminal device for sending the user request information
When permission with access target video, which is just sent to and is stored with the target video by dispatch server
In server, which is sent to terminal device for the target video again.
The first solicited message in test case obtained due to above-mentioned steps S201 is the request of research staff's analog subscriber
When certain destination service function, user request information that terminal device may be sent.Simultaneously as different servers can provide
Service function it is different, and be directed to different users, the service that can be provided is not also identical.Therefore, the survey that above-mentioned steps obtain
The first solicited message in example on probation, in fact it could happen that terminal device does not access its access authority for requesting access to data.Example
Such as, certain video playing platform, is classified as ordinary user and VIP user for user.The view for only allowing VIP user to watch for certain class
Frequency content allows VIP user to watch when dispatch server receives ordinary user and sends by terminal device comprising such
When the user request information of the video identifier of video, dispatch server then haves no right to access message to terminal device transmission.
In an implementation, server is after the test case that the destination service function of getting to server is tested,
Each test case of acquisition can be authenticated, and the practical user request information authentication logic sent of user will be met
Test case is determined as this test case tested the destination service function of server.Then, server further according to
The test case determined, tests server, that is, the first solicited message in the test case is executed, to be somebody's turn to do
Corresponding first response message of first solicited message.
Optionally, it in order to improve testing efficiency, avoids the occurrence of since the first solicited message in test case is (in the present invention
It is called target identity information) the case where actual user requests authenticate logic is not met, test is being executed in the embodiment of the present invention
The first solicited message in use-case further includes following specific before obtaining corresponding first response message of first solicited message
Treatment process, the process may include steps of:
Judge to the target identity information in the first solicited message, if the permission with request target service function;Such as
Fruit target identity information has the permission of request target service function, thens follow the steps S202.
It wherein, can also include target identity information in test case, target identity information may include account identification, and
It can also include destination service mark and timestamp in the target identity information.
Optionally, the embodiment of the invention provides a kind of to judging to be to the target identity information in the first solicited message
The no processing mode with the permission for requesting the destination service function, specifically comprises the following steps:
Based on preset hash function, the first private key and the account identification, account identification corresponding first is calculated at random
Value;Based on preset hash function, the second private key and account identification, corresponding second random value of account identification is calculated;Judge
Whether one random value and the second random value are identical;If the first random value and the second random value are identical, it is determined that the first solicited message
In target identity information have request target service function permission.Wherein, the first private key and the second private key are identical.
In an implementation, server can be by the mesh in the first solicited message in preset first code key and the test case
The parameters such as the account identification that mark identity information includes are input in preset hash function, so that it is determined that account mark corresponds to out
The first random value.Then, the account identification for then by preset second code key including with target identity information in the test case
Etc. parameters be input in the hash function, determine that the account identifies corresponding second random value.Compare the first random value and
Two random values, if the first random value is identical as the second random value, it is determined that the test case is to meet the practical use sent of user
Family solicited message authenticates the test case of logic, and carries out using the test case as this to the destination service function of server
The test case of test.Then, then the first solicited message in step S202 implementation of test cases is executed, obtains the first request letter
Cease corresponding first response message.If the first random value and the second random value be not identical, it is determined that the first request in test case
Target identity information in information does not have the permission of request target service function, then gives up the test case.
Optionally, the embodiment of the invention provides another kinds to judging to the target identity information in test case, if
Processing mode with the permission for requesting the destination service function, specifically comprises the following steps:
Judge that destination service function is corresponding with reference in account identification in pre-set user authentication information, if there are first to ask
Seek the account identification in information;If it exists with the account identification in the first solicited message, it is determined that the mesh in the first solicited message
Mark the permission that identity information has request target service function.
In an implementation, server can be by the pre-set user authentication information of account identification and acquisition in the first solicited message
In destination service function corresponding multiple compared one by one with reference to account identifications.If there are one and being somebody's turn to do with reference to account identification
Account identification in first solicited message is identical with reference to account identification, then can determine the target body in the first solicited message
Part information has the permission of request target service function.If the corresponding multiple ginsengs of destination service function in pre-set user authentication information
It examines in account identification, refers to account mark there is no identical with the account identification (target identity information) in the first solicited message
Know, it is determined that the target identity information in test case does not have the permission of request target service function.
Using the embodiment of the present invention, server can be according to the destination service of the server recorded in the user authentication information
Function and have the function of to request the destination service is corresponding to refer to account identification corresponding relationship, selects and meet that user is practical to be sent
User request information authentication logic test case, and the target of server is taken using the test case selected as this
The test case that business function is tested improves testing efficiency to save the testing time.
S203: if intended response status code and the first responsive state code be not identical, or expected file fingerprint and the first file
Fingerprint is not identical, it is determined that server does not have destination service function.
Wherein, it is contemplated that expectation information may include intended response status code and expected file fingerprint.
In embodiments of the present invention, if intended response status code and the first responsive state code be not identical, or expected file refers to
Line and the first file fingerprint is not identical can be divided into three kinds of situations.It is respectively as follows: situation one, if intended response status code and the first sound
Answer status code not identical, and expected file fingerprint and the first file fingerprint be not identical;Situation two, if intended response status code and the
One responsive state code is not identical, and expected file fingerprint is identical as the first file fingerprint;Situation three, if intended response status code with
First responsive state code is identical, and expected file fingerprint and the first file fingerprint be not identical.
In an implementation, no matter server after being compared to the first response message and expected expectation information, compares
As a result meet any in above-mentioned three kinds of situations, then all illustrate test crash, i.e. destination service function pair on the server
The configuration file answered is not the configuration file of latest edition.That is, the server does not have destination service function.If it is expected that
Responsive state code is identical as the first responsive state code, and expected file fingerprint is identical with the first file fingerprint, then illustrate to test at
Function, i.e., the corresponding configuration file of destination service function on the server are the configuration file of latest edition, then server is refused
Processing.That is, the server has destination service function.
Due in the embodiment of the present application, by periodically testing server, to realize real-time detection service
Whether the version of the corresponding configuration file of certain component is latest edition on device.
Optionally, if not having destination service function the embodiment of the invention provides one kind server, server is into one
The concrete processing procedure of step, may include steps of:
If server does not have destination service function, the corresponding configuration of destination service function is obtained from storage server
File.
In an implementation, after determining that server does not have destination service function by above-mentioned S203, server can be to
Storage server sends the corresponding latest edition configuration file acquisition instruction of destination service function.When storage server receives this
After acquisition instruction, stored according in the destination service Function Identification and its server of the server for including in the instruction
The current configuration file version identifier of destination service function, with the service function mark stored in storage server and its service
The corresponding configuration file version information of Function Identification is compared.If the configuration file version information stored in storage server with
Configuration file version information in the acquisition instruction is not identical, then the destination service function mark that the storage server is stored
Know the corresponding latest configuration file of corresponding service function and is sent to server.
Due in the embodiment of the present application, by periodically carrying out active test to server, to realize real-time detection
Whether the version of the corresponding storage configuration file of certain component is latest edition on server.It is deposited if certain component is corresponding on server
Storage configuration file is not the configuration file of latest edition, then obtains the configuration file of the corresponding latest edition of the component in real time, from
And the server is allow to provide better service for user.
Optionally, the embodiment of the invention provides one kind obtains the corresponding configuration of destination service function from storage server
The concrete processing procedure of file can also include:
Statistics is to the successful test case number of the destination service functional test of server;If test case number is less than pre-
If threshold value, then the corresponding configuration file of destination service function is obtained from storage server.
In an implementation, server S201 to S203 through the above steps to its own carry out periodically test after,
The successful test case number of destination service functional test to server can be counted.By test case number and preset threshold
It is compared, if test case number less than preset threshold, is obtained from storage server, destination service function is corresponding to match
Set file.
Further, the target of the server can be generated after periodically test to its own in server
The corresponding test record of service function, to obtain server statement-of-health.Wherein, it may include in test record to server
The successful test case number of destination service functional test.Due to including a more than server in a certain local area network, it can
, as basic unit, to count each server for including in each local area network being successfully tested in the target time period by local area network
Number, and generate the corresponding server statement-of-health of the local area network.In this way, can determine to service in each local area network in the whole network
The functional characteristic of device promotes the availability of whole network quickly to stop loss.
The embodiment of the invention provides a kind of detection methods of server capability.This method comprises: obtaining to server
The test case that destination service function is tested;The first solicited message in implementation of test cases, obtains the first solicited message
Corresponding first response message;If intended response status code and the first responsive state code be not identical, or expected file fingerprint and the
One file fingerprint is not identical, it is determined that server does not have destination service function.Due to passing through periodicity in the embodiment of the present application
Server is tested, thus realize the corresponding storage configuration file of certain component on real-time detection server version whether
For latest edition.
Based on the same technical idea, embodiment of the method shown in Fig. 2 is corresponded to, the embodiment of the invention also provides one kind
The detection device of server capability, as shown in figure 4, the device includes:
Test case obtains module 401, the test case that the destination service function for obtaining to server is tested;
Wherein, the first solicited message in test case comprising analog subscriber request target service function and expected expectation information, it is contemplated that
It is expected that information includes intended response status code and expected file fingerprint;
First response message obtains module 402, for the first solicited message in implementation of test cases, obtains the first request
Corresponding first response message of information, wherein the first response message includes the first responsive state code and the first file fingerprint;
Destination service function determining module 403, if it is not identical for intended response status code and the first responsive state code, or
It is expected that file fingerprint and the first file fingerprint be not identical, it is determined that server does not have destination service function.
It in embodiments of the present invention, can also include target identity information in the first solicited message, device can also include:
Judgment module judges to the target identity information in the first solicited message, if has request target service function
Permission;
Determining module calls the first sound if having the permission of request target service function for target identity information
Information is answered to obtain module.
In embodiments of the present invention, target identity information may include account identification;
Judgment module may include:
First computing unit calculates account identification pair for being based on preset hash function, the first private key and account identification
The first random value answered;
Second computing unit calculates account identification pair for being based on preset hash function, the second private key and account identification
The second random value answered;
Judging unit, for judging whether the first random value and the second random value are identical;
Determination unit, if identical for the first random value and the second random value, it is determined that the target in the first solicited message
Identity information has the permission of request target service function.
In embodiments of the present invention, above-mentioned apparatus can also include:
Configuration file obtains module and obtains target from storage server if server does not have destination service function
The corresponding configuration file of service function.
In embodiments of the present invention, the number of above-mentioned test case is multiple;
Above-mentioned configuration file obtains module, may include:
Statistic unit, for counting the successful test case number of destination service functional test to server;
Configuration file acquiring unit is obtained from storage server if being less than preset threshold for test case number
The corresponding configuration file of destination service function.
Specific implementation and relevant explanation content about each step of this method may refer to above-mentioned method shown in Fig. 2
Embodiment, this will not be repeated here.
The embodiment of the invention also provides a kind of electronic equipment, as shown in figure 5, include processor 501, communication interface 502,
Memory 503 and communication bus 504, wherein processor 501, communication interface 502, memory 503 are complete by communication bus 504
At mutual communication,
Memory 503, for storing computer program;
Processor 501 when for executing the program stored on memory 503, realizes following steps:
Obtain the test case tested the destination service function of server;Wherein, simulation is included in test case
First solicited message of user's request target service function and expected expectation information, it is contemplated that expectation information includes intended response state
Code and expected file fingerprint;
The first solicited message in implementation of test cases obtains corresponding first response message of the first solicited message, wherein
First response message includes the first responsive state code and the first file fingerprint;
If intended response status code and the first responsive state code be not identical, or expected file fingerprint and the first file fingerprint are not
It is identical, it is determined that server does not have destination service function.
Specific implementation and relevant explanation content about each step of this method may refer to above-mentioned method shown in Fig. 2
Embodiment, this will not be repeated here.
In addition, processor 501 executes other implementations of the program stored on memory 503 and the method realized,
It is identical as implementation mentioned by preceding method embodiment part, it also repeats no more here.
The communication bus that the detection method of above-mentioned service function is mentioned can be Peripheral Component Interconnect standard (Peripheral
Component Interconnect, PCI) bus or expanding the industrial standard structure (Extended Industry Standard
Architecture, EISA) bus etc..The communication bus can be divided into address bus, data/address bus, control bus etc..For just
It is only indicated with a thick line in expression, figure, it is not intended that an only bus or a type of bus.
Communication interface is for the communication between above-mentioned electronic equipment and other equipment.
Memory may include random access memory (Random Access Memory, RAM), also may include non-easy
The property lost memory (Non-Volatile Memory, NVM), for example, at least a magnetic disk storage.Optionally, memory may be used also
To be storage device that at least one is located remotely from aforementioned processor.
Above-mentioned processor can be general processor, including central processing unit (Central Processing Unit,
CPU), network processing unit (Network Processor, NP) etc.;It can also be digital signal processor (Digital Signal
Processing, DSP), it is specific integrated circuit (Application Specific Integrated Circuit, ASIC), existing
It is field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete
Door or transistor logic, discrete hardware components.
In another embodiment provided by the invention, a kind of computer readable storage medium is additionally provided, which can
It reads to be stored with instruction in storage medium, when run on a computer, so that computer executes any institute in above-described embodiment
The detection method for the server capability stated.
In another embodiment provided by the invention, a kind of computer program product comprising instruction is additionally provided, when it
When running on computers, so that computer executes the processing of the detection of any server function in above-described embodiment.
In the above-described embodiments, can come wholly or partly by software, hardware, firmware or any combination thereof real
It is existing.When implemented in software, it can entirely or partly realize in the form of a computer program product.The computer program
Product includes one or more computer instructions.When loading on computers and executing the computer program instructions, all or
It partly generates according to process or function described in the embodiment of the present invention.The computer can be general purpose computer, dedicated meter
Calculation machine, computer network or other programmable devices.The computer instruction can store in computer readable storage medium
In, or from a computer readable storage medium to the transmission of another computer readable storage medium, for example, the computer
Instruction can pass through wired (such as coaxial cable, optical fiber, number from a web-site, computer, server or data center
User's line (DSL)) or wireless (such as infrared, wireless, microwave etc.) mode to another web-site, computer, server or
Data center is transmitted.The computer readable storage medium can be any usable medium that computer can access or
It is comprising data storage devices such as one or more usable mediums integrated server, data centers.The usable medium can be with
It is magnetic medium, (for example, floppy disk, hard disk, tape), optical medium (for example, DVD) or semiconductor medium (such as solid state hard disk
Solid State Disk (SSD)) etc..
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality
Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation
In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to
Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those
Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment
Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that
There is also other identical elements in process, method, article or equipment including the element.
Each embodiment in this specification is all made of relevant mode and describes, same and similar portion between each embodiment
Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for device,
For electronic equipment and computer readable storage medium embodiment, since it is substantially similar to the method embodiment, so description
It is fairly simple, the relevent part can refer to the partial explaination of embodiments of method.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all
Any modification, equivalent replacement, improvement and so within the spirit and principles in the present invention, are all contained in protection scope of the present invention
It is interior.
Claims (11)
1. a kind of detection method of server capability, which is characterized in that the described method includes:
Obtain the test case tested the destination service function of server;Wherein, simulation is included in the test case
User requests the first solicited message and expected expectation information of the destination service function, and the expected expectation information includes being expected
Responsive state code and expected file fingerprint;
First solicited message in the test case is executed, the corresponding first response letter of first solicited message is obtained
Breath, wherein first response message includes the first responsive state code and the first file fingerprint;
If the intended response status code and the first responsive state code be identical or the expected file fingerprint and described the
One file fingerprint is not identical, it is determined that the server does not have destination service function.
2. the method according to claim 1, wherein including target identity information in first solicited message;
In first solicited message executed in the test case, first solicited message corresponding first is obtained
Before response message, further includes:
Judge to the target identity information in first solicited message, if having and request the destination service function
Permission;
If the target identity information has the permission for requesting the destination service function, execute in the test case
First solicited message, the step of obtaining first solicited message corresponding first response message.
3. according to the method described in claim 2, it is characterized in that, the target identity information includes account identification;
The judgement is to the target identity information in first solicited message, if has and requests the destination service function
The step of permission of energy, comprising:
Based on preset hash function, the first private key and the account identification, the account identification corresponding first is calculated at random
Value;
Based on preset hash function, the second private key and the account identification, the account identification corresponding second is calculated at random
Value;
Judge whether first random value and the second random value are identical;
If first random value and the second random value are identical, it is determined that the target identities letter in first solicited message
Ceasing has the permission for requesting the destination service function.
4. the method according to claim 1, wherein the method also includes:
If the server does not have destination service function, it is corresponding that the destination service function is obtained from storage server
Configuration file.
5. according to the method described in claim 4, it is characterized in that, the number of the test case is multiple;It is described from storage
The step of corresponding configuration file of the destination service function is obtained in server, comprising:
Count the successful test case number of the destination service functional test to the server;
If the test case number is less than preset threshold, it is corresponding that the destination service function is obtained from storage server
Configuration file.
6. a kind of detection device of server capability, which is characterized in that described device includes:
Test case obtains module, the test case that the destination service function for obtaining to server is tested;Wherein, institute
The first solicited message and expected expectation information for requesting the destination service function in test case comprising analog subscriber are stated, it is described
It is expected that expectation information includes intended response status code and expected file fingerprint;
First response message obtains module, for executing first solicited message in the test case, obtains described
Corresponding first response message of one solicited message, wherein first response message includes the first responsive state code and the first text
Part fingerprint;
Destination service function determining module, if not identical for the intended response status code and the first responsive state code,
Or the expected file fingerprint and first file fingerprint it is not identical, it is determined that the server does not have destination service function
Energy.
7. device according to claim 6, which is characterized in that it include target identity information in first solicited message,
Described device further include:
Judgment module judges to the target identity information in first solicited message, if has and requests the target
The permission of service function;
Determining module calls the if having the permission for requesting the destination service function for the target identity information
One response message obtains module.
8. device according to claim 7, which is characterized in that the target identity information includes account identification;
The judgment module, comprising:
First computing unit calculates the account mark for being based on preset hash function, the first private key and the account identification
Know corresponding first random value;
Second computing unit calculates the account mark for being based on preset hash function, the second private key and the account identification
Know corresponding second random value;
Judging unit, for judging whether first random value and the second random value are identical;
Determination unit, if identical for first random value and the second random value, it is determined that in first solicited message
The target identity information has the permission for requesting the destination service function.
9. device according to claim 6, which is characterized in that described device further include:
Configuration file obtains module, if the server does not have destination service function, from storage server described in acquisition
The corresponding configuration file of destination service function.
10. device according to claim 9, which is characterized in that the number of the test case is multiple;
The configuration file obtains module, comprising:
Statistic unit, for counting the successful test case number of the destination service functional test to the server;
Configuration file acquiring unit is obtained from storage server if being less than preset threshold for the test case number
The corresponding configuration file of the destination service function.
11. a kind of electronic equipment, which is characterized in that including processor, communication interface, memory and communication bus, wherein processing
Device, communication interface, memory complete mutual communication by communication bus;
Memory, for storing computer program;
Processor when for executing the program stored on memory, realizes any method and step of claim 1-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910537771.7A CN110321287A (en) | 2019-06-20 | 2019-06-20 | A kind of detection method of server capability, device and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910537771.7A CN110321287A (en) | 2019-06-20 | 2019-06-20 | A kind of detection method of server capability, device and electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110321287A true CN110321287A (en) | 2019-10-11 |
Family
ID=68121070
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910537771.7A Pending CN110321287A (en) | 2019-06-20 | 2019-06-20 | A kind of detection method of server capability, device and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110321287A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111866827A (en) * | 2019-12-31 | 2020-10-30 | 北京骑胜科技有限公司 | Bluetooth device state detection method and device, electronic device and medium |
CN114143565A (en) * | 2021-10-29 | 2022-03-04 | 北京达佳互联信息技术有限公司 | Information display method and device, electronic equipment and storage medium |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050049815A1 (en) * | 2003-08-25 | 2005-03-03 | Fujitsu Limited | Test support program and test support method |
CN106571981A (en) * | 2016-11-15 | 2017-04-19 | 中国互联网络信息中心 | DNS (Domain Name System) server automated testing method and system |
CN107256195A (en) * | 2017-06-08 | 2017-10-17 | 武汉斗鱼网络科技有限公司 | Webpage front-end method of testing and device |
CN107783906A (en) * | 2017-09-28 | 2018-03-09 | 广州酷狗计算机科技有限公司 | Method of testing, device and storage medium |
CN108459953A (en) * | 2017-02-22 | 2018-08-28 | 北京京东尚科信息技术有限公司 | test method and device |
CN109101381A (en) * | 2018-08-02 | 2018-12-28 | Oppo(重庆)智能科技有限公司 | Configuration file update method, system, electronic equipment and storage medium |
CN109308266A (en) * | 2018-11-30 | 2019-02-05 | 北京微播视界科技有限公司 | Construction method, test method, device, equipment and the medium of test case |
CN109446071A (en) * | 2018-09-26 | 2019-03-08 | 深圳壹账通智能科技有限公司 | Interface test method, interface test device, electronic equipment and storage medium |
CN109474838A (en) * | 2018-11-01 | 2019-03-15 | 腾讯科技(深圳)有限公司 | A kind of data processing method, equipment, system and storage medium |
-
2019
- 2019-06-20 CN CN201910537771.7A patent/CN110321287A/en active Pending
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050049815A1 (en) * | 2003-08-25 | 2005-03-03 | Fujitsu Limited | Test support program and test support method |
CN106571981A (en) * | 2016-11-15 | 2017-04-19 | 中国互联网络信息中心 | DNS (Domain Name System) server automated testing method and system |
CN108459953A (en) * | 2017-02-22 | 2018-08-28 | 北京京东尚科信息技术有限公司 | test method and device |
CN107256195A (en) * | 2017-06-08 | 2017-10-17 | 武汉斗鱼网络科技有限公司 | Webpage front-end method of testing and device |
CN107783906A (en) * | 2017-09-28 | 2018-03-09 | 广州酷狗计算机科技有限公司 | Method of testing, device and storage medium |
CN109101381A (en) * | 2018-08-02 | 2018-12-28 | Oppo(重庆)智能科技有限公司 | Configuration file update method, system, electronic equipment and storage medium |
CN109446071A (en) * | 2018-09-26 | 2019-03-08 | 深圳壹账通智能科技有限公司 | Interface test method, interface test device, electronic equipment and storage medium |
CN109474838A (en) * | 2018-11-01 | 2019-03-15 | 腾讯科技(深圳)有限公司 | A kind of data processing method, equipment, system and storage medium |
CN109308266A (en) * | 2018-11-30 | 2019-02-05 | 北京微播视界科技有限公司 | Construction method, test method, device, equipment and the medium of test case |
Non-Patent Citations (1)
Title |
---|
魏元雷等: "Web服务器的性能测试方法", 《上海计量测试》 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111866827A (en) * | 2019-12-31 | 2020-10-30 | 北京骑胜科技有限公司 | Bluetooth device state detection method and device, electronic device and medium |
CN111866827B (en) * | 2019-12-31 | 2024-04-12 | 北京骑胜科技有限公司 | Bluetooth equipment state detection method and device, electronic equipment and medium |
CN114143565A (en) * | 2021-10-29 | 2022-03-04 | 北京达佳互联信息技术有限公司 | Information display method and device, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9154516B1 (en) | Detecting risky network communications based on evaluation using normal and abnormal behavior profiles | |
CA2962228C (en) | Distributed traffic management system and techniques | |
CN103701795B (en) | The recognition methods of the attack source of Denial of Service attack and device | |
CN111176803B (en) | Service processing method, device, server and storage medium | |
Schmerl et al. | Architecture-based self-protection: composing and reasoning about denial-of-service mitigations | |
CN106302346A (en) | The safety certifying method of API Calls, device, system | |
CN105939326A (en) | Message processing method and device | |
CN109274637A (en) | The system and method for determining distributed denial of service attack | |
CN106778260A (en) | Attack detection method and device | |
US20130227687A1 (en) | Mobile terminal to detect network attack and method thereof | |
US9104565B2 (en) | Fault tracing system and method for remote maintenance | |
CN111104675A (en) | Method and device for detecting system security vulnerability | |
CN109743294A (en) | Interface access control method, device, computer equipment and storage medium | |
CN106161396B (en) | A kind of method and device for realizing virtual machine network access control | |
RU2735235C1 (en) | Blockchain monitoring | |
CN110365712A (en) | A kind of defence method and system of distributed denial of service attack | |
RU2738337C1 (en) | Intelligent bots detection and protection system and method | |
CN110321287A (en) | A kind of detection method of server capability, device and electronic equipment | |
CN106209918A (en) | The method of a kind of internet security management and terminal | |
CN106302519A (en) | The method of a kind of internet security management and terminal | |
US20080072321A1 (en) | System and method for automating network intrusion training | |
CN109446807A (en) | The method, apparatus and electronic equipment of malicious robot are intercepted for identification | |
CN108924159A (en) | The verification method and device in a kind of message characteristic identification library | |
CN114138590A (en) | Operation and maintenance processing method and device for Kubernetes cluster and electronic equipment | |
CN109067764A (en) | A kind of method and device for establishing equipment list item |
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 |