Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
With the rapid development of the internet, watching short videos on the network has become a common habit of people in daily life. The current video recommendation system recommends short videos which are relatively concerned or interested to users, and recalling the videos is a very critical step in the process of recommending the videos to the users. The recall of the video is generally implemented by a recall module configured in the video recommendation system, where the recall module corresponds to one or more recall channels, and the recommended video is recalled from the recall channels to the video recommendation system and then recommended to the user by the video recommendation system. Therefore, the performance of the recall channel directly determines the video recommendation quality, so that the performance test of the recall channel is crucial.
However, the inventor found that since different recall channels in a recall module are usually developed by different developers, each recall channel in the recall module cannot be tested individually, and only the performance of multiple recall channels of the recall module can be tested as a whole, which results in a single test result, and only the performance of multiple recall channels can be known, but the performance of single or multiple recall channels cannot be known.
Therefore, in view of the above problems, the inventor proposes a recall test method, apparatus, electronic device and storage medium in the embodiments of the present application, which may be configured to send a test request to a recall module in a recommendation system, where the test request carries a test policy, so that the recall module determines a target recall channel to be tested from a plurality of recall channels according to the test policy to perform a test, so as to perform an individual test on one or more recall channels of the plurality of recall channels, thereby avoiding a problem that a test result is single due to an existing test that only a plurality of recall channels can be integrally tested, and improving flexibility and comprehensiveness of the test.
An application environment of the recall test method provided by the embodiment of the present application is described below.
Referring to fig. 1, fig. 1 shows a video recommendation system and a database 6 for providing recommended videos for the video recommendation system, wherein the video recommendation system may include an experiment module 1, a scheduling module 2, a recall module 3, a ranking module 4, and a mechanism module 5. The experiment module 1 is used for providing experiment configuration data of each module on the line. The scheduling module 2 is used for scheduling the recall module 3, the sorting module 4, the mechanism module 5 and the like, and finally returning the scheduling result to the caller. The recall module 3 is used for recalling the video list from the database 6 and performing rough ranking on the video list. The sorting module 4 is used for performing personalized sorting on the recalled results. The mechanism module 5 is used to add some artificial rules to the sorted results.
As shown in fig. 2, the recall module 3 may be composed of a plurality of recall channels, and each recall channel may be different from each other, for example, in the short video recommendation system, the recall module 3 may include a popular short video recall channel, a personalized short video recall channel, and the like.
Referring to fig. 3, fig. 3 is a flowchart illustrating a recall test method according to an embodiment of the present application, where the method may be applied to an electronic device, where the electronic device may be a networking-enabled electronic device, and the recommendation system shown in fig. 2 may be configured in the electronic device. As shown in fig. 4, the recommendation system may be communicatively connected to a pressure test system 7 and a database 6, respectively, for testing the recall module 3 in the recommendation system. Optionally, the electronic device includes, but is not limited to: smart phones, tablet computers, personal computers, e-book readers, audio players, video players, and the like.
The recall test method may include:
s110, receiving a test request, wherein the test request carries a test strategy.
Wherein the test request may be for recalling content data corresponding to the test request from the recall channel. The testing policy may be used to determine which recall channels from the plurality of recall channels are recall channels that need to be tested, or the number of recall channels that need to be tested. It will be appreciated that the test request may be a request according to a protocol and the test policy may be a field in the test request.
In some embodiments, the pressure testing system 7 may send a test request to the recall module 3, where the recall module 3 may receive the test request and recall content data corresponding to the test request from a different recall channel according to the test request. As an example, for example, the test request may include an Identity Document (ID), and then a video previously associated with the user may be recalled from a different recall channel according to the ID of the user, specifically, a browsing record of the video may be associated according to the ID of the user, and a video of interest to the user may be recalled according to the browsing record. Also for example, the test request may include a search keyword, and the recall module 3 may recall news, articles, videos, and the like associated with the keyword from different recall channels according to the keyword.
As an example, for example, the pressure testing system 7 sends a test request to the recall module 3, and the recall module 3 returns a result to be recommended, specifically, each recall channel corresponding to the recall module 3 recalls content that may be of interest to the corresponding user. For example, an account 123 requests to pull 10 results, the account 123 just sees a video ID which may be denoted as vidxx, and the pull result may be obtained by the following codes:
getRecommend?
flag=2&uid=123&getnum=10&last=vidxx;
getResponse:vid1:info1;vid2:info2;……vid10:info10;
based on this code, the user can view vid1, vid2 to vid10 by refreshing the video list through account 123. Wherein each recall channel gives 1-N results.
In other embodiments, the test request may further include a recall number for the content data, and as an example, the test request may include a keyword and a recall number, specifically, for example, the keyword is "make" and the recall number is 10, and then 10 pieces of content data related to "make" may be recalled from the recall channel according to the test request. Wherein, the 10 pieces of content data can be recalled from different channels.
Alternatively, the content data may include articles, news, videos, merchandise information, and the like.
And S120, responding to the test request, and determining a target recall channel from the plurality of recall channels according to the test strategy.
In some embodiments, the recall module 3 responds to the test request, and determines one or more recall channels to be tested as target recall channels from a plurality of recall channels corresponding to the recall module 3 according to a test policy carried in the test request. As an example, for example, each of the plurality of recall channels corresponding to the recall module 3 is marked with a serial number, and the test policy may include the serial number of the recall channel to be tested, so that one or more recall channels to be tested may be determined from the plurality of recall channels as the target recall channel according to the serial number in the test policy. As another example, the test policy may include the number of recall channels that need to be tested each time the test is performed, so that the number of recall channels corresponding to the test policy may be selected from the plurality of recall channels as the target recall channel according to the test policy.
And S130, recalling the content data corresponding to the test request from the target recall channel, and acquiring the performance data of the target recall channel in the recall process of the content data.
The performance data may include a response time length of the target recall channel to the test request, and may also include memory occupancy recorded by the target recall channel in the recall process of the content data. It can be understood that the memory occupancy rate in this embodiment refers to a Central Processing Unit (CPU) memory occupancy rate corresponding to the recall channel.
In some embodiments, the test request may include screening condition information for the content data, such as the number of content data to be recalled, the subject of the content data to be recalled, the format of the content data to be recalled, and the like. As an example, if the screening condition information of the test request includes 10 recalls, the subject is classical, and the format is audio, the recall module 3 may recall 10 audios, the subject is classical, from the target recall channel as the content data corresponding to the test request according to the test request. In the process of recalling content data, the state parameter of the target recall channel (such as the memory occupancy rate of the CPU) may also change due to the recall action made by the target recall channel, so the changed state parameter may be recorded as the performance parameter of the target recall channel, that is, the performance parameter is obtained, for example, when the target recall channel does not make a recall action, the memory occupancy rate of the corresponding CPU is 10%, and when the target recall channel makes a recall action, the memory occupancy rate of the corresponding CPU changes from 10% to 25%, then the memory occupancy rate of the 25% CPU may be used as the performance parameter of the target recall channel.
And S140, acquiring a performance test result of the target recall channel based on the performance data.
The performance test result can represent whether the performance and the stability of the target recall channel are in a normal state or not. Specifically, the performance test result of the recall channel can be determined according to the response time, the memory occupancy rate and other performance data. Alternatively, the performance test result may be obtained by determining whether the performance data exceeds the performance data threshold, for example, when the response time length exceeds a preset time length, the performance test result of the target recall channel may be determined to be abnormal, and when the response time length does not exceed the preset time length, the performance test result of the target recall channel may be determined to be normal.
In some embodiments, the performance test results may also include a score made on the performance of the targeted recall channel based on the performance data. As one example, for example, when the performance data includes a response duration, the shorter the response duration, the higher the score corresponding to the performance of the targeted recall channel. For example, when the performance data includes memory occupancy, the smaller the memory occupancy, the higher the score corresponding to the performance of the target recall channel. In some embodiments, the performance data may include a response duration and a memory occupancy rate, and the score corresponding to the performance of the recall target channel may be determined by both the response duration and the memory occupancy rate. Optionally, the scoring weight corresponding to the response duration and the scoring weight corresponding to the memory occupancy rate may be set according to the actual requirement, for example, the scoring weight corresponding to the response duration and the scoring weight corresponding to the memory occupancy rate may both be 50%.
In this embodiment, a test request is received by the recall module 3, where the test request carries a test policy, and then the test request is responded, and a target recall channel is determined from a plurality of recall channels according to the test policy, so that one or more recall channels to be tested can be accurately selected from the plurality of recall channels. And recalling the content data corresponding to the test request from the target recall channel, acquiring the performance data of the target recall channel in the recall process of the content data, and finally acquiring the performance test result of the target recall channel based on the performance data, so that the performance test result of the recall channel selected according to the test strategy can be obtained, the test on a single or a plurality of recall channels can be realized based on different test strategies, different test results can be obtained, the problem that the test result is single because the test can only be carried out on a plurality of recall channels at present is avoided, and the flexibility and the comprehensiveness of the test on the recall channel are improved.
Referring to fig. 5, fig. 5 is a flowchart illustrating a recall test method according to another embodiment of the present application, where the method may include:
s210, receiving a test request, wherein the test request carries a test strategy, and the test strategy comprises the number of the recall channels to be tested.
The recall channel to be tested may be a recall channel that needs to be tested for the current test request. For example, the current test request is directed to a recall channel named "hot video", that is, the current test request is used to request to test the recall channel named "hot video", and the recall channel named "hot video" is the recall channel to be tested.
The number of the recall channels to be tested included in the test strategy may be one, multiple, or the total number of multiple recall channels.
S220, responding to the test request, and selecting the recall channels corresponding to the number from the plurality of recall channels as target recall channels.
In some embodiments, the plurality of recall channels may be numbered in advance, and the recall channels may be sorted in the order from small to large, and then recall channels corresponding to the number of the plurality of recall channels may be sequentially selected as the target recall channel from the plurality of recall channels in the order of the numbers when the test request is responded.
As an example, for example, the plurality of recall channels include recall channel 1, recall channel 2, recall channel 3 … and recall channel 10, assuming that the number of recall channels to be tested in the test policy is two, when the recall module 3 responds to the first test request, recall channel 1 and recall channel 2 may be used as the target recall channels, when the recall module 3 responds to the second test request, recall channel 3 and recall channel 4 may be used as the target recall channels, and so on, and then the plurality of recall channels may be tested comprehensively according to the policy of testing two channels at a time.
As another example, for example, the number of the recall channels to be tested in the test policy is one, when the recall module 3 responds to the first test request, the recall channel 1 may be used as a target recall channel, when the recall module 3 responds to the second test request, the recall channel 2 may be used as a target recall channel, and so on, so that a plurality of recall channels may be comprehensively tested according to the policy of testing one recall channel at a time.
In this embodiment, the test policy includes the number of the recall channels to be tested, and the recall channel corresponding to the number is selected from the plurality of recall channels as the target recall channel. Therefore, the performance of one or more recall channels in the plurality of recall channels can be independently tested, and the flexibility of the test is ensured.
In some embodiments, the test strategy further includes a test label of the recall channel to be tested in addition to the number of the recall channels to be tested, wherein the test label is used for identifying the recall channel to be tested. In an embodiment of S220, the recall channels corresponding to the number of the plurality of recall channels may be selected as the target recall channel according to the test tag.
As a manner, the test tag may be used to identify a name of the recall channel to be detected, where selecting, according to the test tag, the recall channel corresponding to the number from the plurality of recall channels as the target recall channel may be selecting the recall channel corresponding to the specified name as the target recall channel. Alternatively, when the designated name (i.e., the test tag) is one, the recall channel corresponding to the designated name may be directly used as the target recall channel. When there are multiple designated names, the recall channels with the number corresponding to the recall channel to be tested in the test strategy can be selected from the recall channels corresponding to the multiple designated names as the target recall channel. As an example, for example, a test tag includes the recall channel name under test: recall channel a, recall channel B, recall channel C, and recall channel D. If the number of the recall channels to be tested in the test strategy is 3, 3 of the recall channels a, B, C and D can be arbitrarily selected as target recall channels, for example, the recall channels B, C and D are used as target recall channels. Therefore, the recall channel with the designated name in the plurality of recall channels can be tested, the number of the tested recall channels can be adjusted according to actual requirements, and the flexibility of the recall channel test is improved. Optionally, when the number of the designated names is smaller than the number of the recall channels to be tested in the test policy, all of the recall channels corresponding to the designated names may be used as target recall channels.
As another way, the test tag may be used to identify types of the recall channel to be tested, where each type may correspond to a plurality of recall channels to be tested. The method may select the recall channel corresponding to the number from the plurality of recall channels as the target recall channel according to the test tag, and select the recall channel corresponding to the number in the test policy from the plurality of recall channels corresponding to the type of the test tag as the target recall channel. As an example, assuming that the number of recall channels to be tested in the test strategy is 3, and the test label is "sports", each time a test is performed through a test request, 3 recall channels may be selected from a plurality of recall channels of the "sports" type as target recall channels. Therefore, the independent testing of different types of recall channels can be realized, the number of the tested recall channels can be adjusted according to actual requirements, and the accuracy and flexibility of the recall channel testing are improved.
Optionally, when the number of the recall channels corresponding to the test tag is less than the number of the recall channels to be tested in the test policy, all of the recall channels corresponding to the test tag may be used as the target recall channel.
Optionally, the test tag may be used to identify the name and type of the recall channel to be tested, and may also be used to indicate the serial number (e.g., serial numbers of 1, 2 … N, etc.), the format (e.g., video, audio, picture, etc.) of the recall channel to be tested, and so on.
And S230, recalling the content data corresponding to the test request from the target recall channel, and acquiring the performance data of the target recall channel in the recall process of the content data.
And S240, acquiring a performance test result of the target recall channel based on the performance data.
The specific implementation of S230-S240 can refer to S130-S140, and therefore is not described herein.
In this embodiment, the test strategy includes the number of the recall channels to be tested and the test tags, and then the target recall channel is selected from the plurality of recall channels according to the number and the test tags, so that not only can the performance of the designated recall channel be tested according to the test tags, but also the performance of one or more recall channels in the plurality of recall channels can be tested independently, and the flexibility and the accuracy of the test are ensured.
Referring to fig. 6, fig. 6 is a flowchart illustrating a recall test method according to another embodiment of the present application, where the method may include:
s310, receiving a test request, wherein the test request carries a test strategy.
And S320, responding to the test request, and determining a target recall channel from the plurality of recall channels according to the test strategy.
The specific implementation of S310-S320 can refer to S110-S120, and therefore is not described herein.
S330, obtaining a channel control instruction corresponding to the test strategy.
Wherein, the channel control instruction can be used for controlling the opening and closing of the recall channel.
In some embodiments, a plurality of test strategies and a plurality of channel control instructions may be associated in advance, the plurality of test strategies and the plurality of channel control instructions correspond to one another one by one, and a relationship table of the test strategies and the channel control instructions is obtained, so that the channel control instructions corresponding to the current test strategies can be obtained according to the relationship table of the test strategies and the channel control instructions. As an example, for example, there are 7 recall channels, the serial numbers of the 7 recall channels are sequentially 1 to 7, and if the target recall channel corresponding to the current test policy is a recall channel with a serial number of 1, 2, or 4, the control instruction corresponding to the current test policy may be to turn on the switch of the recall channel with a serial number of 1, 2, 4, or 5, and turn off the switch of the recall channel with a serial number of 3, 6, or 7.
S340, closing the recall channels except the target recall channel in the plurality of recall channels according to the channel control instruction.
In some embodiments, when all of the plurality of recall channels are acquiescent with the open state, the recall channels except the target recall channel in the plurality of recall channels can be directly switched to the closed state, and only the target recall channel is kept in the open state to recall the content data, so that the target recall channel can be accurately distinguished from the plurality of recall channels, and the performance test is convenient to perform. Optionally, after the performance test is performed on the target recall channel according to the test request, all of the plurality of recall channels may be restored to the default open state, so that when the performance test is performed on the target recall channel next time, the target recall channel can be quickly made to be in the open state, so as to facilitate recall of the content data.
In other embodiments, the current status of the targeted recall channel and the non-targeted recall channel may be detected when the plurality of recall channels do not default to an open state, wherein the non-targeted recall channel is a recall channel of the plurality of recall channels other than the targeted recall channel. When the current state of the target recall channel is the opening state, the target recall channel can not be processed, otherwise, the target recall channel is controlled to be switched to the opening state according to the control instruction. When the current state of the non-target recall channel is the closing state, the non-target recall channel can not be processed, otherwise, the non-target recall channel is controlled to be switched to the closing state according to the control instruction. Therefore, only the target recall channel in the plurality of recall channels can be reserved quickly and accurately to recall the content data.
And S350, recalling the content data corresponding to the test request from the target recall channel, and acquiring the performance data of the target recall channel in the recalling process of the content data.
The performance data may be obtained from a log generated by the target recall channel in the content data recall process, where the log may include performance parameters such as CPU memory occupancy and input/output (I/O) occupancy corresponding to the target recall channel. In addition, the performance data may also be the response time of the target recall channel to the test request.
And S360, acquiring a performance test result of the target recall channel based on the performance data.
As shown in fig. 7, in some embodiments, the number of the target recall channel is one, and the performance data includes a response duration of the target recall channel, where S360 may include:
S361A, a first time length threshold corresponding to the target recall channel is obtained.
The target recall channel may be associated with the first time threshold in advance, and optionally, the serial number or name of the target recall channel may be associated with the first time threshold, and a relationship table between the target recall channel and the first time threshold is generated. As one approach, the relationship table may be stored locally at the electronic device so that when the relationship table needs to be used, it can be directly invoked locally at the electronic device. As another way, the relationship list may be configured in a cloud server in communication with the electronic device, and when the relationship list needs to be used, the electronic device may send a request to the cloud server to obtain the relationship list, so as to relieve the local storage pressure of the electronic device.
In some embodiments, the first time threshold may be obtained from the relationship table by the serial number or name of the target recall channel currently being tested.
And S362A, when the response time length does not exceed the first time length threshold value, determining that the performance of the target recall channel is normal.
As an example, for example, when the first time threshold corresponding to the target recall channel is 10ms, and the response time of the target recall channel to the test request is 5ms, the performance of the target recall channel may be determined to be normal. When the response duration is 12ms, then the performance of the targeted recall channel may be determined to be abnormal.
In this embodiment, when the number of the target recall channel is one, by acquiring the first time length threshold corresponding to the target recall channel and by determining whether the response time length exceeds the first time length threshold, it is possible to quickly and effectively determine whether the performance test result of the target recall channel is normal or abnormal.
As shown in fig. 8, in some embodiments, the number of the target recall channels is multiple, the performance data includes multiple response durations, and the multiple response durations correspond to the multiple target recall channels one by one, where S360 may include:
and S361B, respectively obtaining second time length thresholds corresponding to the target recall channels to obtain a plurality of second time length thresholds.
In consideration of the fact that different recall channels may have different corresponding performance requirements, for example, the response duration required by a video recall channel may be longer than the response duration required by an article recall channel, and in some embodiments, a relationship table between a plurality of second duration thresholds and a plurality of target recall channels may be pre-established according to the performance requirements of each target recall channel, where the plurality of second duration thresholds and the plurality of target recall channels correspond to one another. As an example, the relationship table of the plurality of second duration thresholds and the plurality of target recall channels may be as shown in table 1:
TABLE 1
Targeted recall channel
|
1
|
2
|
3
|
4
|
Second duration threshold
|
5ms
|
10ms
|
3ms
|
2ms |
And S362B, determining a target duration threshold according to the plurality of second duration thresholds.
In one embodiment, an average value of the plurality of second duration thresholds may be used as the target duration threshold, and as an example, the target duration threshold may be calculated to be 5ms according to the plurality of second duration thresholds in table 1.
In this embodiment, the average value of the second time length thresholds is used as the target time length threshold, so that the target time length threshold can be determined quickly, and the target time length threshold can be used for accurately evaluating the overall performance of the target recall channels.
As an embodiment, the smallest second duration threshold of the plurality of second duration thresholds may be used as the target duration threshold, and as an example, the target duration threshold may be 2ms according to the plurality of second duration thresholds in table 1.
In this embodiment, the target duration threshold can be determined quickly by using the smallest second duration threshold among the plurality of second duration thresholds as the target duration threshold, and the target duration threshold can be used for quickly and effectively evaluating the performance of each target recall channel among the plurality of target recall channels.
As another implementation, the second duration threshold corresponding to the target recall channel may be directly used as the target duration threshold of the target recall channel. For example, as can be seen from table 1, the target duration threshold of the target recall channel 1 is 5ms, the target duration threshold of the target recall channel 2 is 10ms, and the target duration threshold of the target recall channel 3 is 3ms.
And S363B, when each response time length in the plurality of response time lengths does not exceed the target time length threshold value, determining that the performance of the target recall channel is normal.
In some embodiments, when the average value of the second time length thresholds is used as the target time length threshold, and each of the response time lengths does not exceed the average value (e.g., 5 ms), the performance of the target recall channel is determined to be normal. When the minimum second duration threshold of the plurality of second duration thresholds is taken as the target duration threshold, and each response duration of the plurality of response durations does not exceed the average value (e.g., 2 ms), the performance of the target recall channel is determined to be normal. When the second duration threshold corresponding to the target recall channel is directly used as the target duration threshold of the target recall channel, and the response duration of each target recall channel does not exceed the corresponding target duration threshold, for example, when the response duration of the target recall channel 1 does not exceed 5ms, the response duration of the target recall channel 2 does not exceed 10ms, the response duration of the target recall channel 3 does not exceed 3ms, and the response duration of the target recall channel 4 does not exceed 2ms and is satisfied at the same time, it is determined that the performance of the target recall channel is normal.
As shown in fig. 9, in some embodiments, the performance data includes memory occupancy, where S360 may include:
and S361C, acquiring a memory occupancy rate threshold corresponding to the target recall channel.
In some embodiments, a plurality of recall channels and a plurality of memory occupancy thresholds may be associated, where the plurality of recall channels and the plurality of memory occupancy thresholds are in one-to-one correspondence, and a relationship table of the recall channels and the memory occupancy thresholds is obtained. Because the plurality of recall channels include the target recall channel, after the target recall channel is determined, the memory occupancy rate threshold corresponding to the target recall channel can be obtained according to the relationship table of the recall channel and the memory occupancy rate threshold.
And S362C, when the memory occupancy rate does not exceed the memory occupancy rate threshold value, determining that the performance of the target recall channel is normal.
The memory occupancy rate can be obtained from a log generated by the target recall channel in the recall process of the content data. As an example, for example, the memory occupancy threshold corresponding to the target recall channel is 30%, and when the acquired memory occupancy is 25%, the performance of the target recall channel may be normal.
In the embodiment, the memory occupancy rate obtained by the target recall channel during testing is compared with the memory occupancy rate threshold corresponding to the target recall channel to determine whether the performance of the target recall channel is normal or abnormal, so that the performance and recall stability of the target recall channel can be accurately evaluated.
In some embodiments, the performance data includes memory occupancy and IO port occupancy, where the S360 may be implemented by first obtaining an IO port occupancy threshold and a memory occupancy corresponding to the target recall channel. And then judging whether the occupancy rate of the IO port exceeds the occupancy rate threshold of the IO port, and judging whether the occupancy rate of the memory exceeds the occupancy rate threshold of the memory. When the occupancy rate of the IO port does not exceed the occupancy rate threshold of the IO port and the occupancy rate of the memory does not exceed the occupancy rate threshold of the memory, the performance of the target recall channel can be determined to be normal. The obtaining mode of the occupancy rate threshold of the IO port may refer to the obtaining mode of the memory occupancy rate.
In the embodiment, whether the performance of the target recall channel is normal or abnormal is determined by judging whether the memory occupancy rate and the IO port occupancy rate simultaneously meet the IO port occupancy rate threshold and the memory occupancy rate threshold, so that the performance and the recall stability of the target recall channel can be more accurately evaluated.
In other embodiments, the S360 may be implemented by, when the number of the target recall channels is multiple, first specifying a third duration threshold, and as a manner, when the response durations of the multiple target recall channels do not exceed the third duration threshold, determining that the performance of the target recall channel is normal. Alternatively, the number of target recall channels of the plurality of target recall channels whose response time lengths do not exceed the third time length threshold may be obtained, the weight of the number in the total number of the plurality of target recall channels may be calculated, and when the weight is greater than or equal to a preset weight (e.g., 99%), the performance of the target recall channel may be determined to be normal. Therefore, the performance evaluation efficiency of the target recall channel can be improved.
In this embodiment, by obtaining the channel control instruction corresponding to the test policy and closing the recall channels except the target recall channel in the plurality of recall channels according to the channel control instruction, the performance test can be performed on the plurality of recall channels simply and quickly according to the test policy.
Referring to fig. 10, a recall test apparatus 400 according to an embodiment of the present application is shown, where the recall test apparatus 400 includes: the system comprises a receiving module 410, a target recall channel determining module 420, a testing module 430 and a performance test result acquiring module 440.
The target recall channel determining module 420 is configured to, in response to the test request, determine a target recall channel from the plurality of recall channels according to the test policy.
The testing module 430 is configured to recall the content data corresponding to the test request from the target recall channel, and acquire performance data of the target recall channel in a recall process of the content data.
And a performance test result obtaining 440 module, configured to obtain a performance test result of the target recall channel based on the performance data.
Further, the test strategy includes the number of the recall channels to be tested, and the target recall channel determining module 420 is further configured to select a recall channel corresponding to the number from the plurality of recall channels as a target recall channel.
Further, the test strategy further includes test tags of the recall channels to be tested, where the test tags are used to identify the recall channels to be tested, and the target recall channel determining module 420 is further configured to select the recall channels corresponding to the number from the plurality of recall channels as the target recall channels according to the test tags.
Further, the number of the target recall channels is one, the performance data includes a response duration of the target recall channel, and the performance test result obtaining module 440 includes:
and the first time length threshold value acquisition unit is used for acquiring a first time length threshold value corresponding to the target recall channel.
And the first performance result determining unit is used for determining that the performance of the target recall channel is normal when the response time length does not exceed the first time length threshold.
Further, the number of the target recall channels is multiple, the performance data includes multiple response durations, the multiple response durations correspond to the multiple target recall channels one to one, and the performance test result obtaining module 440 includes:
and the second duration threshold acquisition unit is used for respectively acquiring second duration thresholds corresponding to the plurality of target recall channels to obtain a plurality of second duration thresholds.
And the target duration threshold determining unit is used for determining the target duration threshold according to the plurality of second duration thresholds.
And the second performance result determining unit is used for determining that the performance of the target recall channel is normal when each response time length in the plurality of response time lengths does not exceed the target time length threshold.
Further, the performance data includes a memory occupancy rate, and the performance test result obtaining 440 module includes:
and the memory occupancy rate threshold acquisition unit is used for acquiring the memory occupancy rate threshold corresponding to the target recall channel.
And the third performance result determining unit is used for determining that the performance of the target recall channel is normal when the memory occupancy rate does not exceed the memory occupancy rate threshold.
Further, the performance test result obtaining 440 module includes:
and the control instruction acquisition unit is used for acquiring the channel control instruction corresponding to the test strategy.
And the recall channel control unit is used for closing the recall channels except the target recall channel in the plurality of recall channels according to the channel control instruction.
And a performance test result obtaining unit 440, configured to recall, from the target recall channel, content data corresponding to the test request, and obtain performance data of the target recall channel in a recall process of the content data.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses and modules may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, the coupling or direct coupling or communication connection between the modules shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or modules may be in an electrical, mechanical or other form.
In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
Referring to fig. 11, a block diagram of an electronic device according to an embodiment of the present application is shown. The electronic device 500 may be the electronic device 500 capable of running the program in the foregoing embodiments. The electronic device 500 in the present application may include one or more of the following components: a processor 510, a memory 520, and one or more programs, wherein the one or more programs may be stored in the memory 520 and configured to be executed by the one or more processors 510, the one or more programs configured to perform a method as described in the aforementioned method embodiments.
Processor 510 may include one or more processing cores. The processor 510 interfaces with various components throughout the electronic device using various interfaces and circuitry to perform various functions of the electronic device and process data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 520 and invoking data stored in the memory 520. Alternatively, the processor 510 may be implemented in hardware using at least one of Digital Signal Processing (DSP), field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 510 may integrate one or a combination of a Central Processing Unit (CPU) 510, a Graphics Processing Unit (GPU) 510, a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing display content; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 510, but may be implemented by a communication chip.
The Memory 520 may include a Random Access Memory (RAM) 520 and may also include a Read-Only Memory (Read-Only Memory) 520. The memory 520 may be used to store instructions, programs, code sets, or instruction sets. The memory 520 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing various method embodiments described below, and the like. The storage data area may also store data created by the terminal in use, such as a phonebook, audio-video data, chat log data, and the like.
Referring to fig. 12, a block diagram of a computer-readable storage medium according to an embodiment of the present application is shown. The computer readable medium 600 has stored therein a program code 610, the program code 610 being capable of being invoked by a processor to perform the method described in the method embodiments above.
The computer-readable storage medium 600 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. Optionally, the computer-readable storage medium comprises a non-transitory computer-readable medium. The computer readable storage medium has a storage space for program code for performing any of the method steps of the above-described method. The program code can be read from or written to one or more computer program products. The program code may be compressed, for example, in a suitable form.
In summary, the recall test method, apparatus, electronic device and storage medium provided in the embodiments of the present application receive a test request through a recall module, where the test request carries a test policy, and then respond to the test request to determine a target recall channel from a plurality of recall channels according to the test policy, so that one or more recall channels to be tested can be accurately selected from the plurality of recall channels. And recalling the content data corresponding to the test request from the target recall channel, acquiring the performance data of the target recall channel in the recalling process of the content data, and finally acquiring the performance test result of the target recall channel based on the performance data, so that the performance test result of the recall channel selected according to the test strategy can be obtained, the problem that the test is single because the multiple recall channels can only be integrally tested at present is solved, and the flexibility and the comprehensiveness of the recall channel test are improved.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not necessarily depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.