CN117215917A - Method and device for determining detection mode - Google Patents

Method and device for determining detection mode Download PDF

Info

Publication number
CN117215917A
CN117215917A CN202311077588.6A CN202311077588A CN117215917A CN 117215917 A CN117215917 A CN 117215917A CN 202311077588 A CN202311077588 A CN 202311077588A CN 117215917 A CN117215917 A CN 117215917A
Authority
CN
China
Prior art keywords
detection
target
item
determining
resource
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311077588.6A
Other languages
Chinese (zh)
Inventor
赵一祥
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Geely Holding Group Co Ltd
Zhejiang Zeekr Intelligent Technology Co Ltd
Original Assignee
Zhejiang Geely Holding Group Co Ltd
Zhejiang Zeekr Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Geely Holding Group Co Ltd, Zhejiang Zeekr Intelligent Technology Co Ltd filed Critical Zhejiang Geely Holding Group Co Ltd
Priority to CN202311077588.6A priority Critical patent/CN117215917A/en
Publication of CN117215917A publication Critical patent/CN117215917A/en
Pending legal-status Critical Current

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Abstract

The specification provides a method and a device for determining a detection mode, wherein the method comprises the following steps: determining at least one item to be selected related to the target code in response to a submitting operation of the user on the target code; determining a target item from the at least one item to be selected according to a detection strategy corresponding to the target code, and at least one processing resource to be called corresponding to the target item; wherein the detection strategy comprises a pre-specified detection requirement; generating at least one detection mode corresponding to the target item based on the at least one processing resource; acquiring resource state information of processing resources for generating each detection mode in the at least one detection mode, and determining a target detection mode matched with the detection requirement from the at least one detection mode based on the resource state information.

Description

Method and device for determining detection mode
Technical Field
The present application relates to the field of project merging technologies, and in particular, to a method and apparatus for determining a detection mode, an electronic device, and a machine-readable storage medium.
Background
The code access control refers to a detection mode for detecting and verifying the part of the code before the modified target code is combined with the project code.
In the current technology, since the detection of the portion of code is generally a detection procedure fixed by manual configuration, the detection efficiency is not high.
Meanwhile, a technician can specify a specific processing resource to call when a specific detection operation is performed on the part of code based on experience, and because the technician cannot consider the actual resource condition of the called processing resource when specifying the specific processing resource, when the called processing resource cannot be called, the detection process is interrupted, the technician is required to modify the detection configuration again, and the detection efficiency is low.
Disclosure of Invention
The application provides a method for determining a detection mode, which comprises the following steps:
determining at least one item to be selected related to the target code in response to a submitting operation of the user on the target code;
determining a target item from the at least one item to be selected according to a detection strategy corresponding to the target code, and at least one processing resource to be called corresponding to the target item; wherein the detection strategy comprises a pre-specified detection requirement;
Generating at least one detection mode corresponding to the target item based on the at least one processing resource;
acquiring resource state information of processing resources for generating each detection mode in the at least one detection mode, and determining a target detection mode matched with the detection requirement from the at least one detection mode based on the resource state information.
Optionally, before acquiring the resource status information of the target resource to be invoked corresponding to the target item corresponding to each detection mode in the at least one detection mode, the method further includes:
sequencing the at least one detection mode according to the pre-specified detection requirement;
acquiring resource state information of processing resources for generating each detection mode in the at least one detection mode, and determining a target detection mode matched with the detection requirement from the at least one detection mode based on the resource state information, wherein the method comprises the following steps:
sequentially acquiring resource state information of target resources to be called, which correspond to target items corresponding to the detection modes after the sequencing is completed;
determining whether the resource state information meets a preset requirement;
If so, determining the detection mode as a target detection mode, and stopping acquiring the resource state information of the target resource to be called, which corresponds to the target item in other detection modes in the sequence.
Optionally, the detection requirement includes a detection requirement with a shortest detection duration;
sequencing the at least one detection mode according to the pre-specified detection requirement, including:
determining a target execution operation from preset execution operations according to the detection strategy;
based on time-consuming information of each target item in the target items for calling the processing resource and executing the target detection operation, generating total detection time lengths respectively corresponding to each detection mode in the at least one detection mode;
and sequencing the detection modes according to the total detection duration from short to long according to the total detection duration respectively corresponding to the detection modes.
Optionally, the detection requirement includes a detection requirement that occupies a minimum amount of processing resources to be invoked;
sequencing the at least one detection mode according to the pre-specified detection requirement, including:
respectively counting the occupation quantity of the processing resources to be called, which correspond to each detection mode in the at least one detection mode respectively;
And sequencing the detection modes according to the occupation quantity of the processing resources to be called, which correspond to the detection modes respectively.
Optionally, in response to a user submitting an object code, determining at least one to-be-selected item related to the object code includes:
responding to the submitting operation of a user to an object code, and acquiring associated information corresponding to the object code; the association information is used for indicating a to-be-selected item with an association relation with the target code;
and determining at least one candidate item indicated by the association information from a plurality of items in an item warehouse.
Optionally, the detection policy includes first indication information for indicating the target item;
the determining, according to the detection policy corresponding to the target code, a target item from the at least one candidate item includes:
if the first indication information is that the designated item is prior, determining whether the designated item is contained in the at least one item to be selected; if yes, determining the designated item as a target item; if not, determining the at least one item to be selected as a target item;
If the first indication information is that the designated item is ignored, determining whether the designated item is contained in the at least one item to be selected; if yes, determining other to-be-selected items except the specified item in the at least one to-be-selected item as target items; if not, the at least one to-be-selected item is determined as a target item.
Optionally, the detection policy further includes second indication information for indicating the target resource;
the method further comprises the steps of:
if the second indication information is the priority of the appointed resource, the appointed resource is determined to be a target resource;
and if the second indication information is that the appointed resource is ignored, determining other resources except the appointed resource in the preset resources to be called as target resources.
Optionally, the detection policy further includes third indication information for indicating that the target performs an operation;
according to the detection strategy, determining a target execution operation from preset execution operations, wherein the target execution operation comprises the following steps:
if the third indication information is that the designated operation is prior, determining the designated operation as a target detection operation;
and if the third indication information is that the designated operation is ignored, determining other detection operations except the designated operation in the preset candidate detection operations as target detection operations.
The application also provides a device for determining the detection mode, which comprises:
a response unit for determining at least one item to be selected related to the target code in response to a submitting operation of the user to the target code;
the first determining unit is used for determining a target item from the at least one item to be selected and at least one processing resource to be called, which corresponds to the target item, according to a detection strategy which corresponds to the target code; wherein the detection strategy comprises a pre-specified detection requirement;
a generating unit, configured to generate at least one detection mode corresponding to the target item based on the at least one processing resource;
and the second determining unit is used for acquiring resource state information of processing resources for generating each detection mode in the at least one detection mode and determining a target detection mode matched with the detection requirement from the at least one detection mode based on the resource state information.
The application also provides electronic equipment, which comprises a communication interface, a processor, a memory and a bus, wherein the communication interface, the processor and the memory are mutually connected through the bus;
The memory stores machine readable instructions, and the processor executes the method of determining the detection mode by invoking the machine readable instructions.
The present application also provides a machine-readable storage medium storing machine-readable instructions that, when invoked and executed by a processor, implement a method of determining the manner of detection.
The technical scheme provided by the application at least can comprise the following beneficial effects:
by the above embodiment, by determining at least one item to be selected related to an object code in response to a submitting operation of a user to the object code, according to a detection policy corresponding to the object code, a target item and at least one processing resource to be invoked corresponding to the target item may be determined from the at least one item to be selected, and at least one detection mode corresponding to the target item may be generated based on the at least one processing resource, resource status information of processing resources for generating each detection mode of the at least one detection mode may be acquired, and a target detection mode adapted to the detection requirement may be determined from the at least one detection mode based on the resource status information. On the one hand, based on the pre-specified detection requirement contained in the detection strategy, a detection mode matched with the detection requirement can be determined; on the other hand, based on the resource status information of the processing resources in the detection modes, the detection mode of the available called processing resources can be determined. Therefore, the target detection method meeting the detection requirement can be automatically determined on the premise of avoiding the unavailability of the called processing resources in response to the submitting operation of the user to the target code, and the detection efficiency is improved.
Drawings
FIG. 1 is a flow chart illustrating a method of determining a detection mode in accordance with an exemplary embodiment.
FIG. 2 is a flow chart illustrating another method of determining a detection mode in accordance with an exemplary embodiment.
Fig. 3 is a hardware configuration diagram of an electronic device in which a determining device of a detection method is located, which is shown in an exemplary embodiment.
Fig. 4 is a block diagram of a detection mode determining apparatus according to an exemplary embodiment.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the application. Rather, they are merely examples of apparatus and methods consistent with aspects of the application as detailed in the accompanying claims.
It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the method may include more or fewer steps than described in this specification. Furthermore, individual steps described in this specification, in other embodiments, may be described as being split into multiple steps; while various steps described in this specification may be combined into a single step in other embodiments.
The code access control refers to a detection mode for detecting and verifying a part of codes in a certain project code after the part of codes are updated and before the part of codes are combined into the project code, so as to avoid the interruption of the operation of the project code caused by the combination of the part of codes into the project code.
In the present technology, the detection of the part of code is generally configured with a fixed detection flow, for example, submitting information checking, compiling checking, unit testing, smoke testing, and the like, and a technician may specify, based on experience, to perform a specific detection operation on the part of code, or specify that a specific processing resource is invoked when performing a specific detection operation on the part of code.
Since the detection flow needs to be manually set for detection configuration, detection efficiency is not high. Meanwhile, when a technician designates to execute a specific detection operation on the part of code and calls a specific processing resource, the actual resource condition of the called processing resource cannot be considered, so that when the called processing resource cannot be called, the detection process is interrupted, the technician is required to modify the detection configuration again, and the detection efficiency is also not high.
In view of this, the present application aims to provide a method for determining a detection mode. According to the method, a feasible detection mode which corresponds to the target code and is adaptive to the detection requirement is automatically generated according to a detection strategy which corresponds to the target code and the resource state of a processing resource in response to the submitting operation of a user to the target code.
In implementation, when a user submits modified object code, at least one candidate item associated with the object code may be determined in response to a user submitting the object code.
Further, a target item and at least one processing resource to be called corresponding to the target item can be determined from the at least one item to be selected according to a detection strategy corresponding to the target code; wherein, the detection strategy comprises a pre-designated detection requirement;
further, at least one detection mode corresponding to the target item may be generated based on the at least one processing resource;
further, resource status information of processing resources for generating each of the at least one detection scheme may be acquired, and a target detection scheme adapted to the detection requirement may be determined from the at least one detection scheme based on the resource status information.
By the above embodiment, by determining at least one item to be selected related to an object code in response to a submitting operation of a user to the object code, according to a detection policy corresponding to the object code, a target item and at least one processing resource to be invoked corresponding to the target item may be determined from the at least one item to be selected, and at least one detection mode corresponding to the target item may be generated based on the at least one processing resource, resource status information of processing resources for generating each detection mode of the at least one detection mode may be acquired, and a target detection mode adapted to the detection requirement may be determined from the at least one detection mode based on the resource status information. On the one hand, based on the pre-specified detection requirement contained in the detection strategy, a detection mode matched with the detection requirement can be determined; on the other hand, based on the resource status information of the processing resources in the detection modes, the detection mode of the available called processing resources can be determined. Therefore, the target detection method meeting the detection requirement can be automatically determined on the premise of avoiding the unavailability of the called processing resources in response to the submitting operation of the user to the target code, and the detection efficiency is improved.
The present application is described below by way of specific embodiments and in connection with specific application scenarios.
Referring to fig. 1, fig. 1 is a flowchart illustrating a method for determining a detection mode according to an exemplary embodiment.
The method can be applied to a task management platform and can be used for generating a subsequent target detection method for target codes in response to the submitting operation of the user for the target codes.
The specification does not limit this with respect to the specific form of the task management platform. For example, the task management platform may be Jenkins, circleCI, teamCity or the like.
In one embodiment shown, the task management platform may be Jenkins. The Jenkins is an open source automation tool used for constructing, testing and deploying software projects, and is provided with an extensible plug-in architecture which can be integrated with various development tools, version control systems and deployment tools. The build process can be triggered based on specific events and build reports and logs can be generated.
As shown in fig. 1, the execution subject based on the scheme is a task management platform, and the task management platform can execute the following steps:
step 102, in response to a user submitting an object code, determining at least one candidate item associated with the object code.
The task management platform can establish connection with the project warehouse, when a user submits the target code to the project warehouse, the project warehouse can send a notification message to the task management platform, and the task management platform can receive the notification message and generate a target detection mode corresponding to the target code based on the notification message.
The candidate item related to the object code may refer to an item that is affected in the item repository when the object code is submitted to the item repository.
When the user submits the modified target code, the task management platform may determine at least one candidate item related to the target code in response to a submitting operation of the user on the target code.
The present specification does not limit the manner in which the item to be selected associated with the object code is determined. For example, association information corresponding to the target code in the notification message may be acquired, and a candidate item related to the target code may be determined based on the association information.
In one embodiment, the task management platform may obtain the association information corresponding to the target code in response to a submitting operation of the user to the target code; the association information can be used for indicating a to-be-selected item with an association relation with the target code; the task management platform can determine at least one candidate item indicated by the association information from a plurality of items in the item warehouse connected with the task management platform.
The above-mentioned association information may be any information that can be used to indicate the items to be selected that have an association relationship with the object code.
For example, the association information may include a target code bin name, a target code topic, and target item branch information corresponding to the target code.
The task management platform can query information such as item names, item main bodies, item branches and the like in the manifest files of the alives corresponding to all items in the item warehouse, and can take the items matched with the target code bin names, the target code topics and the target item branches in the item warehouse as the to-be-selected items.
For example, in response to a user submitting an object code_1, an object code bin name_1, an object code topic_1 and an object item branch_1 corresponding to the object code_1 may be obtained, and the task management platform may determine whether the object code topic_1 is empty, and if so, may further query a manifest file corresponding to all items in the item repository, and use the item containing the object code bin name_1 or the object item branch_1 in the corresponding manifest file as a candidate item.
For another example, when the object code bin name_1 described above is included in the manifest file of the manifest corresponding to the item a, the item a may be determined as the item to be selected.
For another example, when the code of the same object code subject_1 as the object code_1 further includes the object code_2, the object code bin name_1 is included in the manifest file of the manifest corresponding to the item a, and the object code bin name_2 corresponding to the object code_2 is included in the manifest file of the manifest corresponding to the item B, both the item a and the item B may be determined as the candidate items.
By the method, the to-be-selected item which has a correlation with the submitted target code in the item warehouse can be accurately determined, so that the detection accuracy is improved. Meanwhile, the problem of low efficiency caused by manual analysis can be avoided, and the detection efficiency is improved.
Step 104, determining a target item from the at least one item to be selected and at least one processing resource to be called corresponding to the target item according to a detection strategy corresponding to the target code; wherein the detection policy includes a pre-specified detection requirement.
In practical application, because different detection strategies exist for different target codes, when at least one to-be-selected item corresponding to the target code is determined, the task management platform can determine the target item to be detected from the at least one to-be-selected item according to the detection strategy corresponding to the target code.
For example, the at least one item to be selected corresponding to the object code_1 may include an item to be selected a and an item to be selected B, and in an actual application, the item to be selected a may be focused on, and the item to be selected B may be ignored, in which case the detection policy corresponding to the object code_1 may include indication information for detecting only the item to be selected a, and the task management platform may determine the item to be selected a target item according to the detection policy.
In one embodiment, the detection policy may include first indication information for indicating the target item; if the first indication information is that the designated item is preferential, determining whether the at least one item to be selected contains the designated item; if so, the specified item can be determined as a target item; if not, the at least one item to be selected can be determined as a target item; if the first indication information is that the designated item is ignored, determining whether the at least one item to be selected contains the designated item; if so, other to-be-selected items except the specified item in the at least one to-be-selected item can be determined as target items; if not, the at least one candidate item may be determined as a target item.
For example, the at least one item to be selected corresponding to the object code_1 may include an item to be selected a and an item to be selected B, and when the detection policy corresponding to the object code_1 includes indication information for specifying that the item to be selected a is preferred, the task management platform may determine that the specified item to be selected a is included in the at least one item to be selected a target item; when the detection policy corresponding to the object code_1 includes the indication information specifying the preference of the candidate item C, the task management platform may determine that the specified candidate item C is not included in the at least one candidate item, and thus may determine the candidate item a and the candidate item B as the object items.
For another example, the at least one candidate item corresponding to the object code_1 may include a candidate item a and a candidate item B, and when the detection policy corresponding to the object code_1 includes indication information specifying that the candidate item a is ignored, the task management platform may determine that the at least one candidate item includes the specified candidate item a, so that other candidate items except for the candidate item a in the at least one candidate item, that is, the candidate item B, may be determined as the object item; when the detection policy corresponding to the object code_1 includes indication information designating that the candidate item C is ignored, the task management platform may determine that the specified candidate item C is not included in the at least one candidate item, and thus may determine the candidate item a and the candidate item B as object items.
In this way, specific detection items can be specified in the detection strategy according to actual requirements, and the detection flexibility is improved.
In one embodiment shown, the detection policy may further include second indication information for indicating a target resource; if the second indication information is the priority of the appointed resource, the appointed resource can be determined as a target resource; if the second indication information is that the appointed resource is ignored, other resources except the appointed resource in the preset resources to be called can be determined to be target resources.
The specification does not limit this with respect to the specific form of the processing resource. For example, the processing resource may refer to a server capable of performing various functions, which may include a compilation server, a test server, and the like.
The detection policy may specify the detection item and may also specify the processing resources invoked by the detection.
For example, the preset resources to be invoked corresponding to the object code_1 may include a processing resource_1 and a processing resource_2, and when the detection policy corresponding to the object code_1 includes the indication information specifying that the processing resource_1 is prioritized, the processing resource_1 may be determined as the processing resource to be invoked; when the detection policy corresponding to the object code_1 includes indication information designating that the processing resource_1 is ignored, the processing resource_2 may be determined as a processing resource to be invoked.
By the method, the processing resources to be called can be specified in the detection strategy according to actual requirements, and the detection flexibility is improved.
And 106, generating at least one detection mode corresponding to the target item based on the at least one processing resource.
The task management platform may generate at least one detection mode corresponding to the target item according to the target item and at least one processing resource called by the target item.
Specifically, the target item and the processing resource may be arranged and combined to generate a plurality of detection methods.
For example, the target item may include a target item_1, the processing resources may include a processing resource_1, a processing resource_2, and a processing resource_3, and the detection manner_1 may be: the target item_1 calls the processing resource_1; the detection mode_2 may be: the target item_1 calls processing resource_1 and processing resource_2; the detection mode_3 may be: the target item_1 calls processing resource_2 and processing resource_3; the detection mode_4 may be: target item_1 calls processing resource_1, processing resource_2, and processing resource_3.
For another example, the target item may include a target item_1, a target item_2, and a target item_3, the processing resource may include a processing resource_1, a processing resource_2, and a processing resource_3, and the detection manner_1 may be: target item_1 calls processing resource_1, target item_2 calls processing resource_1, and target item_3 calls processing resource_3; the detection mode_2 may be: target item_1 calls processing resource_1 and processing resource_2, target item_2 calls processing resource_3, and target item_3 calls processing resource_2 and processing resource_3.
When more than one target item is provided, serial-parallel combination detection can be performed on each target item.
For example, the target items may include target item_1, target item_2, and target item_3, and the processing resources may include processing resource_1, processing resource_2; the detection mode_1 may be: the method comprises the following steps of (1) serially detecting a target item_1, a target item_2 and a target item_3; the detection mode_2 may be: target item_1 is executed in series with target item_2, and then detected in parallel with target item_3; the detection mode_3 may be: target item_2 is executed in series with target item_3, and then detected in parallel with target item_1; the detection mode_4 may be: the target item_1 and the target item_3 are executed in series, and then are detected in parallel with the target item_2; the detection mode_5 may be: target item_1, target item_2, and target item_3 are detected in parallel.
When there is more than one object detection operation for the object item, serial-parallel combination execution may also be performed for each object detection operation.
For example, the target item may include a target item_1, the target execution operation for the target item_1 may include a target execution operation_1, a target execution operation_2, and a target execution operation_3, and the detection manner corresponding to the target item_1 may include a detection manner_1: the target detection operation_1, the target detection operation_2 and the target detection operation_3 are executed in series; the detection mode_2 may be: the target detection operation_1 is executed in series with the target detection operation_2 and then executed in parallel with the target detection operation_3; the detection mode_3 may be: the target detection operation_2 is executed in series with the target detection operation_3 and then executed in parallel with the target detection operation_1; the detection mode_4 may be: the target detection operation_1 is executed in series with the target detection operation_3 and then executed in parallel with the target detection operation_2; the detection mode_5 may be: the object detection operation_1, the object detection operation_2, and the object detection operation_3 are executed in parallel.
By the method, multiple detection modes corresponding to the target item can be generated, and the optimal detection mode can be conveniently selected from the multiple detection modes, so that the detection efficiency is improved.
In one embodiment, the detection policy may further include a pre-specified detection requirement, and the task management platform may sort the at least one detection manner according to the pre-specified detection requirement, and then determine a detection manner that best meets the pre-specified detection requirement from the sorting.
The specification is not limited to this specific content of the detection requirement. For example, the detection requirement may include a detection requirement with a shortest detection duration, or may include a detection requirement with a smallest occupation amount of processing resources to be invoked.
In an embodiment, the detection requirement may include a detection requirement with a shortest detection duration, and the task management platform may determine, according to the detection policy, a target execution operation from preset execution operations; and generating a total detection time length corresponding to each of the at least one detection method based on time-consuming information of calling the processing resource and executing the target detection operation for each of the target items; and according to the total detection time length respectively corresponding to the detection modes, the detection modes can be sequenced from short to long according to the total detection time length.
The present specification is not limited to how the task management platform determines the target execution operation from the preset execution operations. For example, the target execution operation may be determined according to the indication information in the detection policy.
In one embodiment shown, the detection policy may further include third indication information for indicating that the target performs an operation; if the third indication information is that the designated operation is prior, the task management platform can determine the designated operation as a target detection operation; if the third indication information is that the specified operation is ignored, the task management platform can determine other detection operations except the specified operation in the preset detection operation to be selected as target detection operations.
The detection policy may specify a detection item and a processing resource called by the detection item, and may also specify a detection operation performed by the detection.
For example, the preset candidate detection operation corresponding to the object code_1 may include a detection operation_1 and a detection operation_2, and when the detection policy corresponding to the object code_1 includes indication information specifying that the detection operation_1 is prioritized, the detection operation_1 may be determined as a processing resource to be invoked; when the detection policy corresponding to the object code_1 includes indication information designating that the detection operation_1 is ignored, the above-described detection operation_2 may be determined as the object detection operation to be performed.
By the method, the detection operation to be executed can be specified in the detection strategy according to actual requirements, and the detection flexibility is improved.
The task management platform may acquire time-consuming information of each of the target items for calling the processing resource and performing the target detection operation, and may generate a total detection time length corresponding to each of the at least one detection modes based on the time-consuming information.
For example, referring to table 1, table 1 is a time-consuming information table corresponding to each target item corresponding to the target code_1 according to an exemplary embodiment.
TABLE 1
As shown in table 1, the target item corresponding to the target code_1 may include a target item_1 and a target item_2, the preset candidate detection operation corresponding to the target code_1 may include a detection operation_1 and a detection operation_2, and the processing resource may include a processing resource_1 and a processing resource_2; the time consumption information of the detection operation_1 is called processing resource_1 for target item_1 as time consumption_1; the time consumption information of the execution detection operation_1 of the processing resource_2 is called as time consumption_2 aiming at the target item_1; the time consumption information of the execution detection operation_2 of the processing resource_1 is called as time consumption_3 aiming at the target item_1; the time-consuming information of the detection operation_2 is called by the processing resource_2 aiming at the target item_1 and is time-consuming_4; the time-consuming information of executing the detection operation_1 by calling the processing resource_1 for the target item_2 is time-consuming_5; the time-consuming information of the detection operation_1 is called by the processing resource_2 aiming at the target item_2 and is time-consuming_6; the time-consuming information of the execution detection operation_2 of the processing resource_1 is called as time-consuming_7 aiming at the target item_2; the time consuming information for invoking processing resource_2 to perform detection operation_2 for target item_2 is time consuming_8.
Specifically, when the detection scheme corresponding to the object code_1 includes the detection scheme_1: and (3) performing a detection operation (1) for calling the processing resource (1) for the target item (1), performing a detection operation (2) for calling the processing resource (1) for the target item (1), performing a detection operation (1) for calling the processing resource (2) for the target item (2), and performing a detection operation (2) for calling the processing resource (2) for the target item (2), wherein the total detection duration corresponding to the detection mode (1) is the sum of time consumption (1), time consumption (3), time consumption (6) and time consumption (8).
In this way, the total detection time length corresponding to the different detection modes can be determined, so that the different detection modes can be ordered according to the total detection time length.
The task management platform can sort the detection modes from short to long according to the total detection duration, so that the detection modes with shorter total detection duration can be sequentially obtained from front to back according to the sorting result.
In one embodiment shown, the detection requirement may include a detection requirement that minimizes the amount of occupied processing resources to be invoked; the task management platform can respectively count the occupation quantity of the processing resources to be called, which respectively correspond to each detection mode in the at least one detection mode; and sequencing the detection modes according to the occupation quantity from small to large according to the occupation quantity of the processing resources to be called, which correspond to the detection modes.
For example, the target item corresponding to the target code_1 may include a target item_1 and a target item_2; the preset candidate detection operation corresponding to the object code_1 may include a detection operation_1 and a detection operation_2, and the processing resource may include a processing resource_1 and a processing resource_2; the detection means corresponding to the object code_1 may include detection means_1: executing detection operation_1 by calling processing resource_1 for target item_1, executing detection operation_2 by calling processing resource_1 for target item_1, executing detection operation_1 by calling processing resource_1 for target item_2, and executing detection operation_2 by calling processing resource_1 for target item_2, wherein the total number of processing resources corresponding to the detection mode_1 is 1; the detection means corresponding to the object code_1 may include detection means_2: executing detection operation_1 by calling processing resource_1 for target item_1, executing detection operation_2 by calling processing resource_1 for target item_1, executing detection operation_1 by calling processing resource_2 for target item_2, and executing detection operation_2 by calling processing resource_2 for target item_2, wherein the total number of processing resources corresponding to the detection mode_2 is 2; then the detection mode_1 may be ranked before the detection mode_2 when the detection modes are ranked by the number of occupied processing resources from small to large.
By the method, the total number of occupied processing resources corresponding to different detection modes can be determined, and the detection modes with fewer occupied processing resources can be acquired sequentially from front to back according to the sequencing result.
Step 108, obtaining resource status information of processing resources for generating each detection mode in the at least one detection mode, and determining a target detection mode matched with the detection requirement from the at least one detection mode based on the resource status information.
For each detection mode, whether each resource corresponding to the target item corresponding to each detection mode is available or not can be detected, if the resource is available, the corresponding detection mode is enabled, therefore, resource state information of processing resources for generating each detection mode in the at least one detection mode can be acquired, whether the resource is available or not can be determined based on the resource state information, and whether the corresponding detection mode is enabled or not can be further determined.
For example, the detection means corresponding to the object code_1 may include detection means_1: executing detection operation_1 by calling processing resource_1 for target item_1, executing detection operation_2 by calling processing resource_1 for target item_1, executing detection operation_1 by calling processing resource_1 for target item_2, and executing detection operation_2 by calling processing resource_1 for target item_2, wherein the total number of processing resources corresponding to the detection mode_1 is 1; resource status information for the processing resource_1 may be obtained and based on the resource status information, a determination may be made as to whether the detection mode_1 is viable.
The present specification does not limit specific information on the status of the resource. For example, when the processing resource is a CPU, the resource state of the processing resource may refer to the current idle rate of the CPU.
In the illustrated embodiment, the task management platform may sequentially obtain resource status information of the target resources to be invoked, which correspond to the target items corresponding to the detection modes after the sequencing is completed; and can confirm whether the said resource status information meets the preset requirement; if so, determining the detection mode as a target detection mode, and stopping acquiring the resource state information of the target resource to be called, which corresponds to the target item in other detection modes in the sequence.
The present specification does not limit the specific form of determining whether the resource status information meets the preset requirement. For example, when the processing resource is a CPU, the resource status of the processing resource may refer to the current idle rate of the CPU, the available threshold may be preset to be 50%, and when the current idle rate of the CPU is greater than or equal to 50%, it indicates that the processing resource is available.
The task management platform may sequentially obtain resource status information of the target resource to be invoked corresponding to the target items corresponding to the detection modes after the sorting is completed, and specifically, the sorting of the detection modes corresponding to the target code_1 from short to long according to the total detection duration may include a detection mode_1, a detection mode_2 and a detection mode_3. The task management platform can firstly acquire the resource state information of the target resources to be invoked, which correspond to the target items corresponding to the detection mode_1, and determine whether the resource state information meets the requirement, if the resource state information meets the requirement, the detection mode_1 is taken as a target detection mode, and the resource state information of the processing resources corresponding to the target items corresponding to other subsequent detection modes is not acquired; if the resource state information does not meet the requirement, the resource state information of the target resource to be invoked corresponding to the target item corresponding to the detection mode_2 is continuously acquired and the subsequent operation is executed until all detection modes are completely confirmed or the resource state information of the processing resource corresponding to the target item corresponding to any detection mode meets the preset requirement.
In this way, an optimal and feasible detection mode can be obtained from the at least one detection mode, so that the detection is performed on the target item corresponding to the target code based on the detection mode, and the detection efficiency is improved.
In one embodiment, the task management platform may detect each target item corresponding to the target code based on the target detection manner, and may acquire and store time-consuming information for invoking processing resources to execute target execution operations for each target item.
The present specification does not limit this with respect to a specific storage form for the time-consuming information. For example, the time consuming information may be stored on a data processing platform for processing the data.
In one embodiment shown, the task management platform may also establish a connection with a data processing platform for receiving and storing time-consuming information for the task management platform to perform a target execution operation for each target item call processing resource, so that the task management platform obtains the time-consuming information from the data processing platform.
In one embodiment, the data processing platform may further receive request information of the task management platform for resource status information of the processing resources, send a query request to a target agent program in each processing resource to obtain the resource status information of the processing resource, and may return the resource status information to the task management platform.
In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present disclosure, the embodiments of the present disclosure are described below with reference to a flowchart of a method for determining a detection mode as shown in fig. 2.
Referring to fig. 2, fig. 2 is a flowchart illustrating another method for determining a detection mode according to an exemplary embodiment.
Step 202: at least one candidate item associated with the object code is determined in response to a user submitting the object code.
For example, in response to a user submitting an object code_1, an object code bin name_1, an object code topic_1 and an object item branch_1 corresponding to the object code_1 may be obtained, and the task management platform may determine whether the object code topic_1 is empty, and if so, may further query a manifest file corresponding to all items in the item repository, and use the item in the corresponding manifest file containing the object code bin name_1, the object code topic_1 or the object item branch_1 as a candidate item.
When the code of the same object code subject_1 as the object code_1 further includes an object code_2, the object code bin name_1 is included in the manifest file of the manifest corresponding to the item a, and the object code bin name_2 corresponding to the object code_2 is included in the manifest file of the manifest corresponding to the item B, both the item a and the item B can be determined as the candidate items.
Step 204: determining a target item from the at least one item to be selected according to a detection strategy corresponding to the target code, at least one processing resource to be called corresponding to the target item, and executing an operation aiming at the target of the target item.
The detection policy may include first indication information for indicating the target item; if the first indication information is that the designated item is preferential, determining whether the at least one item to be selected contains the designated item; if so, the specified item can be determined as a target item; if not, the at least one item to be selected can be determined as a target item; if the first indication information is that the designated item is ignored, determining whether the at least one item to be selected contains the designated item; if so, other to-be-selected items except the specified item in the at least one to-be-selected item can be determined as target items; if not, the at least one candidate item may be determined as a target item.
For example, when the detection policy corresponding to the object code_1 includes indication information specifying that the item a is prioritized, the task management platform may determine that the specified item a is included in the at least one item to be selected, and thus may determine the item a as the object item; when the detection policy corresponding to the object code_1 includes the instruction information specifying the priority of the item C, the task management platform may determine that the specified item C is not included in the at least one item to be selected, and thus may determine the item to be selected a and the item to be selected B as the object items.
The detection policy may further include second indication information for indicating the target resource. If the second indication information is the priority of the appointed resource, the appointed resource can be determined as a target resource; if the second indication information is that the appointed resource is ignored, other resources except the appointed resource in the preset resources to be called can be determined to be target resources.
For example, the preset resources to be invoked corresponding to the object code_1 may include a processing resource_1 and a processing resource_2, and when the detection policy corresponding to the object code_1 includes the indication information specifying that the processing resource_1 is prioritized, the processing resource_1 may be determined as the processing resource to be invoked; when the detection policy corresponding to the object code_1 includes indication information designating that the processing resource_1 is ignored, the processing resource_2 may be determined as a processing resource to be invoked.
The detection policy may further include third indication information for indicating that the target performs the operation. If the third indication information is that the designated operation is prior, the task management platform can determine the designated operation as a target detection operation; if the third indication information is that the specified operation is ignored, the task management platform can determine other detection operations except the specified operation in the preset detection operation to be selected as target detection operations.
For example, the preset candidate detection operation corresponding to the object code_1 may include a detection operation_1 and a detection operation_2, and when the detection policy corresponding to the object code_1 includes indication information specifying that the detection operation_1 is prioritized, the detection operation_1 may be determined as a processing resource to be invoked; when the detection policy corresponding to the object code_1 includes indication information designating that the detection operation_1 is ignored, the above-described detection operation_2 may be determined as the object detection operation to be performed.
Step 206: and generating at least one detection mode corresponding to the target item based on the at least one processing resource and the target execution operation.
Based on the processing resources including processing resource_1 and processing resource_2, the target item and the processing resource may be arranged and combined to generate multiple detection modes.
For example, the target item may include a target item_1, the processing resources may include a processing resource_1, a processing resource_2, and a processing resource_3, and the detection manner_1 may be: the target item_1 calls the processing resource_1; the detection mode_2 may be: the target item_1 calls processing resource_1 and processing resource_2; the detection mode_3 may be: the target item_1 calls processing resource_2 and processing resource_3; the detection mode_4 may be: target item_1 calls processing resource_1, processing resource_2, and processing resource_3.
When more than one target item is provided, serial-parallel combination detection can be performed on each target item.
For example, the target items may include target item_1, target item_2, and target item_3, and the processing resources may include processing resource_1, processing resource_2; the detection mode_1 may be: the method comprises the following steps of (1) serially detecting a target item_1, a target item_2 and a target item_3; the detection mode_2 may be: target item_1 is executed in series with target item_2, and then detected in parallel with target item_3; the detection mode_3 may be: target item_2 is executed in series with target item_3, and then detected in parallel with target item_1; the detection mode_4 may be: the target item_1 and the target item_3 are executed in series, and then are detected in parallel with the target item_2; the detection mode_5 may be: target item_1, target item_2, and target item_3 are detected in parallel.
When there is more than one object detection operation for the object item, serial-parallel combination execution may also be performed for each object detection operation.
For example, the target item may include a target item_1, the target execution operation for the target item_1 may include a target execution operation_1, a target execution operation_2, and a target execution operation_3, and the detection manner corresponding to the target item_1 may include a detection manner_1: the target detection operation_1, the target detection operation_2 and the target detection operation_3 are executed in series; the detection mode_2 may be: the target detection operation_1 is executed in series with the target detection operation_2 and then executed in parallel with the target detection operation_3; the detection mode_3 may be: the target detection operation_2 is executed in series with the target detection operation_3 and then executed in parallel with the target detection operation_1; the detection mode_4 may be: the target detection operation_1 is executed in series with the target detection operation_3 and then executed in parallel with the target detection operation_2; the detection mode_5 may be: the object detection operation_1, the object detection operation_2, and the object detection operation_3 are executed in parallel.
Step 208: the detection strategy comprises a pre-specified detection requirement; the task management platform may sort the at least one detection manner according to the pre-specified detection requirement.
The detection requirement can comprise a detection requirement with the shortest detection duration, and the task management platform can determine a target execution operation from preset execution operations according to the detection strategy; and generating a total detection time length corresponding to each of the at least one detection method based on time-consuming information of calling the processing resource and executing the target detection operation for each of the target items; and according to the total detection time length respectively corresponding to the detection modes, the detection modes can be sequenced from short to long according to the total detection time length.
The detection requirement may include a detection requirement that occupies a minimum amount of processing resources to be invoked; the task management platform can respectively count the occupation quantity of the processing resources to be called, which respectively correspond to each detection mode in the at least one detection mode; and sequencing the detection modes according to the occupation quantity from small to large according to the occupation quantity of the processing resources to be called, which correspond to the detection modes.
Step 210: acquiring resource state information of processing resources for generating each detection mode in the at least one detection mode, and determining a target detection mode matched with the detection requirement from the at least one detection mode based on the resource state information.
The task management platform can sequentially acquire resource state information of target resources to be called, which correspond to target items corresponding to the detection modes after the sequencing is completed; and can confirm whether the said resource status information meets the preset requirement; if so, determining the detection mode as a target detection mode, and stopping acquiring the resource state information of the target resource to be called, which corresponds to the target item in other detection modes in the sequence.
Corresponding to the embodiment of the method for determining the detection mode, the specification also provides an embodiment of a device for determining the detection mode.
Referring to fig. 3, fig. 3 is a hardware configuration diagram of an electronic device where a determining device of a detection mode is located in an exemplary embodiment. At the hardware level, the device includes a processor 302, an internal bus 304, a network interface 306, memory 308, and non-volatile storage 310, although other hardware required for the service is possible. One or more embodiments of the present description may be implemented in a software-based manner, such as by the processor 302 reading a corresponding computer program from the non-volatile storage 310 into the memory 308 and then running. Of course, in addition to software implementation, one or more embodiments of the present disclosure do not exclude other implementation manners, such as a logic device or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but may also be hardware or a logic device.
Referring to fig. 4, fig. 4 is a block diagram illustrating a determination apparatus for a detection mode according to an exemplary embodiment. The determining device of the detection mode can be applied to the electronic equipment shown in fig. 3 to realize the technical scheme of the specification. Wherein the apparatus may comprise:
a response unit 402, configured to determine at least one candidate item related to the target code in response to a submission operation of the target code by a user;
a first determining unit 404, configured to determine, according to a detection policy corresponding to the target code, a target item from the at least one to-be-selected item, and at least one processing resource to be invoked corresponding to the target item; wherein the detection strategy comprises a pre-specified detection requirement;
a generating unit 406, configured to generate at least one detection mode corresponding to the target item based on the at least one processing resource;
a second determining unit 408, configured to obtain resource status information of a processing resource for generating each of the at least one detection mode, and determine, based on the resource status information, a target detection mode adapted to the detection requirement from the at least one detection mode.
In this embodiment, the foregoing apparatus may further include a sorting unit configured to:
sequencing the at least one detection mode according to the pre-specified detection requirement;
the second determining unit 408 may specifically be configured to:
sequentially acquiring resource state information of target resources to be called, which correspond to target items corresponding to the detection modes after the sequencing is completed;
determining whether the resource state information meets a preset requirement;
if so, determining the detection mode as a target detection mode, and stopping acquiring the resource state information of the target resource to be called, which corresponds to the target item in other detection modes in the sequence.
In this embodiment, the detection requirement includes a detection requirement with a shortest detection duration;
the above sorting unit may specifically be configured to:
determining a target execution operation from preset execution operations according to the detection strategy;
based on time-consuming information of each target item in the target items for calling the processing resource and executing the target detection operation, generating total detection time lengths respectively corresponding to each detection mode in the at least one detection mode;
And sequencing the detection modes according to the total detection duration from short to long according to the total detection duration respectively corresponding to the detection modes.
In this embodiment, the detection requirement includes a detection requirement that occupies a minimum amount of processing resources to be invoked;
the above sorting unit may specifically be configured to:
respectively counting the occupation quantity of the processing resources to be called, which correspond to each detection mode in the at least one detection mode respectively;
and sequencing the detection modes according to the occupation quantity of the processing resources to be called, which correspond to the detection modes respectively.
In this embodiment, the response unit 402 may specifically be configured to:
responding to the submitting operation of a user to an object code, and acquiring associated information corresponding to the object code; the association information is used for indicating a to-be-selected item with an association relation with the target code;
and determining at least one candidate item indicated by the association information from a plurality of items in an item warehouse.
In this embodiment, the detection policy includes first indication information for indicating the target item;
The first determining unit 404 may specifically be configured to:
if the first indication information is that the designated item is prior, determining whether the designated item is contained in the at least one item to be selected; if yes, determining the designated item as a target item; if not, determining the at least one item to be selected as a target item;
if the first indication information is that the designated item is ignored, determining whether the designated item is contained in the at least one item to be selected; if yes, determining other to-be-selected items except the specified item in the at least one to-be-selected item as target items; if not, the at least one to-be-selected item is determined as a target item.
In this embodiment, the detection policy further includes second indication information for indicating the target resource;
the first determining unit 404 may be further configured to:
if the second indication information is the priority of the appointed resource, the appointed resource is determined to be a target resource;
and if the second indication information is that the appointed resource is ignored, determining other resources except the appointed resource in the preset resources to be called as target resources.
In this embodiment, the detection policy further includes third indication information for indicating that the target performs an operation;
the sorting unit may further include a determining subunit 404, configured to:
if the third indication information is that the designated operation is prior, determining the designated operation as a target detection operation;
and if the third indication information is that the designated operation is ignored, determining other detection operations except the designated operation in the preset candidate detection operations as target detection operations.
The implementation process of the functions and roles of each unit in the device is specifically detailed in the implementation process of the corresponding steps in the method, and will not be described herein.
For the device embodiments, reference is made to the description of the method embodiments for the relevant points, since they essentially correspond to the method embodiments. The apparatus embodiments described above are illustrative only, in that the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purposes of the present description. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
The system, apparatus, module or unit illustrated in the embodiments may be implemented in particular by a computer chip or entity or by a product having a certain function. A typical implementation device is a computer, which may be in the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or a combination of any of these devices.
In a typical configuration, a computer includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, read only compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic disk storage, quantum memory, graphene-based storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by the computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
Specific embodiments of the present description have been described. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
The terminology used in the one or more embodiments of the specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of the specification. As used in this specification, one or more embodiments and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used in one or more embodiments of the present description to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of one or more embodiments of the present description. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "responsive to a determination", depending on the context.
The foregoing description of the preferred embodiment(s) is (are) merely intended to illustrate the embodiment(s) of the present application, and it is not intended to limit the embodiment(s) of the present application to the particular embodiment(s) described.
The user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are information and data authorized by the user or fully authorized by each party, and the collection, use and processing of related data is required to comply with the relevant laws and regulations and standards of the relevant country and region, and is provided with corresponding operation entries for the user to select authorization or rejection.

Claims (11)

1. A method of determining a detection mode, the method comprising:
determining at least one item to be selected related to the target code in response to a submitting operation of the user on the target code;
determining a target item from the at least one item to be selected according to a detection strategy corresponding to the target code, and at least one processing resource to be called corresponding to the target item; wherein the detection strategy comprises a pre-specified detection requirement;
Generating at least one detection mode corresponding to the target item based on the at least one processing resource;
acquiring resource state information of processing resources for generating each detection mode in the at least one detection mode, and determining a target detection mode matched with the detection requirement from the at least one detection mode based on the resource state information.
2. The method of claim 1, prior to obtaining resource state information of a target resource to be invoked corresponding to a target item corresponding to each of the at least one detection manner, the method further comprising:
sequencing the at least one detection mode according to the pre-specified detection requirement;
acquiring resource state information of processing resources for generating each detection mode in the at least one detection mode, and determining a target detection mode matched with the detection requirement from the at least one detection mode based on the resource state information, wherein the method comprises the following steps:
sequentially acquiring resource state information of target resources to be called, which correspond to target items corresponding to the detection modes after the sequencing is completed;
Determining whether the resource state information meets a preset requirement;
if so, determining the detection mode as a target detection mode, and stopping acquiring the resource state information of the target resource to be called, which corresponds to the target item in other detection modes in the sequence.
3. The method of claim 2, the detection requirement comprising a detection requirement having a shortest detection duration;
sequencing the at least one detection mode according to the pre-specified detection requirement, including:
determining a target execution operation from preset execution operations according to the detection strategy;
based on time-consuming information of each target item in the target items for calling the processing resource and executing the target detection operation, generating total detection time lengths respectively corresponding to each detection mode in the at least one detection mode;
and sequencing the detection modes according to the total detection duration from short to long according to the total detection duration respectively corresponding to the detection modes.
4. The method of claim 2, the detection requirement comprising a detection requirement that occupies a minimum amount of processing resources to be invoked;
Sequencing the at least one detection mode according to the pre-specified detection requirement, including:
respectively counting the occupation quantity of the processing resources to be called, which correspond to each detection mode in the at least one detection mode respectively;
and sequencing the detection modes according to the occupation quantity of the processing resources to be called, which correspond to the detection modes respectively.
5. The method of claim 1, responsive to a user submitting an object code, determining at least one item to be selected in relation to the object code, comprising:
responding to the submitting operation of a user to an object code, and acquiring associated information corresponding to the object code; the association information is used for indicating a to-be-selected item with an association relation with the target code;
and determining at least one candidate item indicated by the association information from a plurality of items in an item warehouse.
6. The method of claim 1, the detection policy comprising first indication information for indicating a target item;
the determining, according to the detection policy corresponding to the target code, a target item from the at least one candidate item includes:
If the first indication information is that the designated item is prior, determining whether the designated item is contained in the at least one item to be selected; if yes, determining the designated item as a target item; if not, determining the at least one item to be selected as a target item;
if the first indication information is that the designated item is ignored, determining whether the designated item is contained in the at least one item to be selected; if yes, determining other to-be-selected items except the specified item in the at least one to-be-selected item as target items; if not, the at least one to-be-selected item is determined as a target item.
7. The method of claim 1, the detection policy further comprising second indication information for indicating a target resource;
the method further comprises the steps of:
if the second indication information is the priority of the appointed resource, the appointed resource is determined to be a target resource;
and if the second indication information is that the appointed resource is ignored, determining other resources except the appointed resource in the preset resources to be called as target resources.
8. A method according to claim 3, the detection policy further comprising third indication information for indicating that the target performs an operation;
According to the detection strategy, determining a target execution operation from preset execution operations, wherein the target execution operation comprises the following steps:
if the third indication information is that the designated operation is prior, determining the designated operation as a target detection operation;
and if the third indication information is that the designated operation is ignored, determining other detection operations except the designated operation in the preset candidate detection operations as target detection operations.
9. A device for determining a detection mode, the device comprising:
a response unit for determining at least one item to be selected related to the target code in response to a submitting operation of the user to the target code;
the first determining unit is used for determining a target item from the at least one item to be selected and at least one processing resource to be called, which corresponds to the target item, according to a detection strategy which corresponds to the target code; wherein the detection strategy comprises a pre-specified detection requirement;
a generating unit, configured to generate at least one detection mode corresponding to the target item based on the at least one processing resource;
and the second determining unit is used for acquiring resource state information of processing resources for generating each detection mode in the at least one detection mode and determining a target detection mode matched with the detection requirement from the at least one detection mode based on the resource state information.
10. An electronic device comprises a communication interface, a processor, a memory and a bus, wherein the communication interface, the processor and the memory are connected with each other through the bus;
the memory stores machine readable instructions, and the processor executes the method for determining the detection mode according to any one of claims 1 to 8 by calling the machine readable instructions.
11. A machine-readable storage medium storing machine-readable instructions which, when invoked and executed by a processor, implement the method of determining a detection mode of any one of claims 1 to 8.
CN202311077588.6A 2023-08-24 2023-08-24 Method and device for determining detection mode Pending CN117215917A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311077588.6A CN117215917A (en) 2023-08-24 2023-08-24 Method and device for determining detection mode

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311077588.6A CN117215917A (en) 2023-08-24 2023-08-24 Method and device for determining detection mode

Publications (1)

Publication Number Publication Date
CN117215917A true CN117215917A (en) 2023-12-12

Family

ID=89036094

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311077588.6A Pending CN117215917A (en) 2023-08-24 2023-08-24 Method and device for determining detection mode

Country Status (1)

Country Link
CN (1) CN117215917A (en)

Similar Documents

Publication Publication Date Title
CN107193750B (en) Script recording method and device
CN108599973B (en) Log association method, device and equipment
CN112581018A (en) Process task management method, system, device and storage medium
CN109345081B (en) Data acquisition method and device and electronic equipment
CN108920601B (en) Data matching method and device
CN117216758A (en) Application security detection system and method
CN111988429A (en) Algorithm scheduling method and system
CN117763024A (en) Data fragment extraction method and device
CN117215917A (en) Method and device for determining detection mode
CN110688430B (en) Method and device for obtaining data bypass and electronic equipment
CN113626333A (en) Automatic interface testing method and device
CN111158565B (en) Page turning prompting method and device, electronic equipment and storage medium
CN115203050A (en) Method and device for determining dependency relationship of services
CN114691610A (en) Directory processing method and device, storage medium and processor
CN113641628A (en) Data quality detection method, device, equipment and storage medium
CN111967767A (en) Business risk identification method, device, equipment and medium
CN112148590A (en) Method, device and equipment for determining code coverage rate
CN114818645B (en) Automatic report generation method, device, equipment and medium based on data body
CN117435510B (en) Automatic test method, terminal equipment and computer readable storage medium
CN116431513A (en) Case test priority ordering method and related equipment
CN111858619B (en) Data self-circulation method and device and electronic equipment
CN110221971B (en) Search engine testing method and device, electronic equipment and storage medium
CN109241066B (en) Request processing method and device
CN117742928B (en) Algorithm component execution scheduling method for federal learning
US10719304B2 (en) Computer program generation using a library

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