Access path verification method and device, computer device, storage medium and program product
Patent Information
- Application Number
- CN202611059262.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-16
- Publication Date
- 2026-10-30
AI Technical Summary
然而,在面对由大量源端与目的端构成的庞大访问路径组合时,传统的随机测试方法对访问路径的覆盖效率显著降低,从而导致芯片验证的效率降低
[0048]上述访问路径验证方法、装置、计算机设备、存储介质和程序产品,获取待测系统中各访问路径在当前时刻下的验证权重;各访问路径的验证权重是基于各访问路径在上一时刻的访问状态更新的,验证权重表征访问路径的验证优先程度,且验证优先程度越高则验证权重越大;根据各访问路径的当前时刻下的验证权重,采用加权随机选取方式从各访问路径中选择目标访问路径;其中,加权随机选取方式被配置为验证权重越大的路径被选为目标访问路径的概率越高;生成针对目标访问路径的访问激励,以对目标访问路径进行验证。本申请实施例中,能够通过上一时刻的访问状态动态更新每条访问路径的验证权重,使得验证权重高的访问路径被选中进行验证的概率更高,引导验证权重高的访问路径优先验证,从而在保证随机激励的前提下,提高访问路径验证的覆盖效率,进而提高芯片验证的效率。
Smart Images

Figure CN123020126A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of chip verification technology, and in particular to an access path verification method, apparatus, computer equipment, storage medium, and program product. Background Technology
[0002] With the rise of artificial intelligence, switch chip design has entered the stage of ultra-large-scale integration. Switch chip designs typically include either single switch chips or chip networks composed of multiple switch chips. To achieve interconnection of high-performance computing clusters, a single switch chip can contain hundreds of ports, and chip networks contain an even larger number of ports. Against this backdrop, access path verification, as a crucial part of chip verification, presents a pressing technical challenge: how to efficiently verify the access paths composed of the ports in a switch chip design.
[0003] In related technologies, random testing methods that automatically generate random stimuli are typically used for access path verification. However, when faced with a large number of access path combinations consisting of numerous source and destination endpoints, the coverage efficiency of traditional random testing methods is significantly reduced, resulting in decreased chip verification efficiency. Summary of the Invention
[0004] Therefore, it is necessary to provide an access path verification method, apparatus, computer device, storage medium, and program product to address the aforementioned technical problems.
[0005] Firstly, this application provides an access path verification method, including:
[0006] Obtain the verification weight of each access path in the system under test at the current time. The verification weight of each access path is updated based on the access status of each access path at the previous time. The verification weight represents the verification priority of the access path, and the higher the verification priority, the greater the verification weight.
[0007] Based on the verification weight of each access path at the current moment, a weighted random selection method is used to select the target access path from each access path; wherein, the weighted random selection method is configured such that the path with the larger the verification weight has a higher probability of being selected as the target access path;
[0008] Generate access incentives for the target access path to validate the target access path.
[0009] In one embodiment, obtaining the verification weight of each access path in the system under test at the current time includes:
[0010] Get the access status and verification weight of each access path in the previous time step;
[0011] For each access path, the verification weight of the access path at the previous time step is updated based on the access status of the access path at the previous time step, so as to obtain the verification weight of the access path at the current time step.
[0012] In one embodiment, the verification weight of the access path at the previous time step is updated based on the access status of the access path at the previous time step to obtain the verification weight of the access path at the current time step, including:
[0013] If the access path was not accessed in the previous time step, the verification weight of the access path in the previous time step is increased based on a preset step size to obtain the verification weight of the access path in the current time step.
[0014] In one embodiment, the verification weight of the access path at the previous time step is updated based on the access status of the access path at the previous time step to obtain the verification weight of the access path at the current time step, including:
[0015] If the access path was already accessed in the previous time step, the preset initial verification weight will be determined as the verification weight of the access path in the current time step.
[0016] In one embodiment, if the current time is the initial time of access path verification, the access status of each access path in the previous time is obtained, including:
[0017] The initial access state is determined as the access state of each access path at the previous moment; the initial access state is unaccessed.
[0018] In one embodiment, if the current time is the initial time for access path verification, the verification weight of each access path at the previous time is obtained, including:
[0019] The preset initial verification weight is determined as the verification weight of each access path at the previous time step.
[0020] In one embodiment, determining the target access path from each access path based on the verification weight of each access path at the current moment includes:
[0021] Based on the verification weight of each access path at the current moment, the target path identifier is determined from the path identifiers corresponding to each access path.
[0022] The access path corresponding to the target path identifier is determined as the target access path.
[0023] In one embodiment, the target path identifier is determined from the path identifiers corresponding to each access path based on the verification weight of each access path at the current moment, including:
[0024] The probability of each path identifier being selected is determined based on the verification weight of each access path at the current time.
[0025] At least one path identifier is randomly selected from each path identifier based on the probability of selection, so as to obtain the target path identifier.
[0026] In one embodiment, the method further includes:
[0027] Get the preset source port list and destination port list;
[0028] Determine the access path based on the source port list and the destination port list.
[0029] In one embodiment, determining the access path based on the source port list and the destination port list includes:
[0030] Combine each source port in the source port list with each destination port in the destination port list to obtain multiple port pairs;
[0031] The path formed by each port pair is determined as the access path.
[0032] Secondly, this application also provides an access path verification device, comprising:
[0033] The verification weight acquisition module is used to acquire the verification weight of each access path in the system under test at the current time. The verification weight of each access path is updated based on the access status of each access path at the previous time. The verification weight represents the verification priority of the access path, and the higher the verification priority, the greater the verification weight.
[0034] The access path selection module is used to select a target access path from each access path using a weighted random selection method based on the verification weight of each access path at the current time. The weighted random selection method is configured such that the path with the larger the verification weight has a higher probability of being selected as the target access path.
[0035] The incentive generation module is used to generate access incentives for the target access path in order to verify the target access path.
[0036] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0037] Obtain the verification weight of each access path in the system under test at the current time. The verification weight of each access path is updated based on the access status of each access path at the previous time. The verification weight represents the verification priority of the access path, and the higher the verification priority, the greater the verification weight.
[0038] Based on the verification weight of each access path at the current moment, a weighted random selection method is used to select the target access path from each access path; wherein, the weighted random selection method is configured such that the path with the larger the verification weight has a higher probability of being selected as the target access path;
[0039] Generate access incentives for the target access path to validate the target access path.
[0040] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0041] Obtain the verification weight of each access path in the system under test at the current time. The verification weight of each access path is updated based on the access status of each access path at the previous time. The verification weight represents the verification priority of the access path, and the higher the verification priority, the greater the verification weight.
[0042] Based on the verification weight of each access path at the current moment, a weighted random selection method is used to select the target access path from each access path; wherein, the weighted random selection method is configured such that the path with the larger the verification weight has a higher probability of being selected as the target access path;
[0043] Generate access incentives for the target access path to validate the target access path.
[0044] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:
[0045] Obtain the verification weight of each access path in the system under test at the current time. The verification weight of each access path is updated based on the access status of each access path at the previous time. The verification weight represents the verification priority of the access path, and the higher the verification priority, the greater the verification weight.
[0046] Based on the verification weight of each access path at the current moment, a weighted random selection method is used to select the target access path from each access path; wherein, the weighted random selection method is configured such that the path with the larger the verification weight has a higher probability of being selected as the target access path;
[0047] Generate access incentives for the target access path to validate the target access path.
[0048] The aforementioned access path verification method, apparatus, computer equipment, storage medium, and program product obtain the verification weight of each access path in the system under test at the current moment. The verification weight of each access path is updated based on the access status of each access path at the previous moment. The verification weight represents the verification priority of the access path, and the higher the verification priority, the greater the verification weight. According to the verification weight of each access path at the current moment, a weighted random selection method is used to select a target access path from each access path. The weighted random selection method is configured such that the path with the larger verification weight has a higher probability of being selected as the target access path. An access stimulus is generated for the target access path to be verified. In this embodiment, the verification weight of each access path can be dynamically updated based on the access status at the previous moment, so that the access path with a high verification weight has a higher probability of being selected for verification, guiding the access path with a high verification weight to be verified first, thereby improving the coverage efficiency of access path verification while ensuring random stimulus, and thus improving the efficiency of chip verification. Attached Figure Description
[0049] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0050] Figure 1 This is an internal structural diagram of a computer device in one embodiment;
[0051] Figure 2 This is a flowchart illustrating an access path verification method in one embodiment;
[0052] Figure 3 This is a schematic diagram of the structure of the system under test in one embodiment;
[0053] Figure 4 This is a schematic diagram of the system under test in another embodiment;
[0054] Figure 5 This is a flowchart illustrating the process of obtaining the verification weight of each access path at the current moment in one embodiment.
[0055] Figure 6 This is a flowchart illustrating the process of determining the target access path in one embodiment;
[0056] Figure 7 This is a flowchart illustrating the process of determining the target path identifier in one embodiment;
[0057] Figure 8 This is a flowchart illustrating the process of obtaining the access path in one embodiment;
[0058] Figure 9 This is a structural block diagram of an access path verification device in one embodiment. Detailed Implementation
[0059] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0060] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.
[0061] With the rise of artificial intelligence, switch chip design has entered the stage of ultra-large-scale integration. Switch chip designs typically include either single switch chips or chip networks composed of multiple switch chips. To achieve interconnection of high-performance computing clusters, a single switch chip can contain hundreds of ports, and chip networks contain an even larger number of ports. Against this backdrop, access path verification, as a crucial part of chip verification, presents a pressing technical challenge: how to efficiently verify the access paths composed of the ports in a switch chip design.
[0062] In related technologies, random testing methods that automatically generate random stimuli are typically used for access path verification. However, when faced with a large number of access path combinations consisting of numerous source and destination endpoints, the coverage efficiency of traditional random testing methods is significantly reduced, resulting in decreased chip verification efficiency.
[0063] In view of this, this application provides an access path verification method, apparatus, computer device, storage medium, and program product, which can dynamically update the verification weight of each access path based on the access status of the previous moment, so that access paths with higher verification weights are more likely to be selected for verification, guiding access paths with higher verification weights to be verified first, thereby improving the coverage efficiency of access path verification while ensuring random stimulation, and thus improving the efficiency of chip verification.
[0064] The access path verification method provided in this application embodiment can be applied to, for example... Figure 1The computer equipment shown. Figure 1 The actual product implementation of computer equipment in this context can be either a terminal device or a server. For example, terminal devices can be various personal computers, laptops, smartphones, tablets, portable wearable devices, etc. Servers can be independent physical servers, server clusters or distributed systems composed of multiple physical servers, or cloud servers that provide cloud computing services.
[0065] Please see Figure 1 The computer device may include a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores data involved in implementing the access path verification method in this embodiment. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements the steps of the access path verification method provided in this embodiment.
[0066] Those skilled in the art will understand that Figure 1 The structure of the computer device shown in the figure is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. A specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0067] The following describes the various embodiments of the access path verification method provided in this application.
[0068] In one exemplary embodiment, such as Figure 2 As shown, an access path verification method is provided, which is applied to... Figure 1 Taking a computer device as an example, the explanation includes the following steps:
[0069] S101, obtain the verification weight of each access path in the system under test at the current time.
[0070] The verification weight of each access path is updated based on the access status of each access path at the previous moment. The verification weight represents the verification priority of the access path, and the higher the verification priority, the greater the verification weight.
[0071] Optional, such as Figure 3-4 As shown, the system under test can be a single switching chip or a chip network composed of multiple switching chips. The system under test has multiple ports and a transport layer, and each port can serve as either a source port or a destination port for an access path.
[0072] In this embodiment, the access paths that need to be verified can be determined from all access paths in the system under test according to the verification requirements, and the verification weight of each access path at the current time can be determined based on the access status of each access path that needs to be verified at the previous time.
[0073] In one possible implementation, if the current time is the start time of this path verification, the initial access status of each access path in the system under test before this path verification can be obtained, and the initial access status can be used as the access status of each access path in the previous time.
[0074] For example, the verification weight of an access path at the current moment can be used to characterize the verification priority of the access path. Therefore, the access path that needs to be verified first can be determined based on the access status of each access path at the previous moment, and the verification weight of the access path that needs to be verified first can be increased so that the access path that needs to be verified first can be verified first.
[0075] S102, Based on the verification weight of each access path at the current time, a weighted random selection method is used to select the target access path from each access path.
[0076] The weighted random selection method is configured such that the path with the higher the verification weight has a higher probability of being selected as the target access path.
[0077] In this embodiment, the probability of each access path being selected as the target access path can be determined based on the verification weight of each access path at the current time, and then the target access path can be randomly selected from each access path based on the probability of each access path being selected as the target access path.
[0078] It should be noted that access paths with higher verification weights are only more likely to be selected as target access paths, not necessarily selected.
[0079] S103, Generate access incentives for the target access path to verify the target access path.
[0080] For example, there is a correspondence between each access path and access incentive. After selecting the target access path, an access incentive corresponding to the target access path can be generated according to the correspondence to verify the target access path.
[0081] In this embodiment, the verification weight of each access path in the system under test is obtained at the current moment. The verification weight of each access path is updated based on the access status of each access path at the previous moment. The verification weight represents the verification priority of the access path, and the higher the verification priority, the greater the verification weight. According to the verification weight of each access path at the current moment, a weighted random selection method is used to select a target access path from each access path. The weighted random selection method is configured such that the path with the greater verification weight has a higher probability of being selected as the target access path. An access stimulus is generated for the target access path to be verified. In this embodiment, the verification weight of each access path can be dynamically updated based on the access status at the previous moment, so that the access path with the higher verification weight has a higher probability of being selected for verification, guiding the access path with the higher verification weight to be verified first. This improves the coverage efficiency of access path verification while ensuring random stimulus, thereby improving the efficiency of chip verification.
[0082] like Figure 5 As shown, in one embodiment, the process of obtaining the verification weight of each access path in the system under test at the current moment may include the following steps:
[0083] S201, obtain the access status and verification weight of each access path at the previous time step.
[0084] In this embodiment, path access information of each access path can be obtained, and the access status and verification weight of each access path at the previous moment can be determined based on the path access information.
[0085] Optionally, if the current time is the start time of this path verification, the initial access state of each access path in the system under test before this path verification is obtained, and this initial access state is used as the access state of each access path at the previous time. A preset initial verification weight is also determined as the verification weight of each access path at the previous time. The preset initial verification weights of each access path are equal.
[0086] For example, the access status can include both "accessed" and "not accessed".
[0087] S202, for each access path, update the verification weight of the access path at the previous time according to the access status of the access path at the previous time, so as to obtain the verification weight of the access path at the current time.
[0088] In one possible implementation, if the access path was not accessed in the previous time step, the verification weight of the access path in the previous time step can be increased based on a preset step size to obtain the verification weight of the access path in the current time step, so as to increase the probability that the unaccessed access path is selected as the target path.
[0089] In another possible implementation, if the access path was already accessed in the previous time step, the preset initial verification weight can be determined as the verification weight of the access path in the current time step. That is, the verification weight of the access path is reset, so that the probability of the access path that has been accessed being selected as the target path is reduced.
[0090] In this embodiment, the access status and verification weight of each access path at the previous time are obtained. For each access path, the verification weight of the access path at the previous time is updated according to the access status of the access path at the previous time to obtain the verification weight of the access path at the current time. This reduces the probability that an accessed access path is selected as the target path and increases the probability that an unaccessed access path is selected as the target path, guiding unaccessed access paths to be verified first. In this way, the coverage efficiency of access path verification is improved and the efficiency of chip verification is improved while ensuring random stimulus.
[0091] In one embodiment, if the current time is the initial time for access path verification, the process of obtaining the access status of each of the above access paths in the previous time step may include the following steps:
[0092] The initial access state is determined as the access state of each access path at the previous time step; where the initial access state is unaccessed.
[0093] In this embodiment, at the initial moment of access path verification, no access stimulus has been generated in the system under test. Therefore, each access path of the system is in an unaccessed initial state, and the unaccessed state can be directly determined as the access state of each access path at the previous moment of the initial moment.
[0094] Optionally, if the current time is the initial time of access path verification, since the system under test has not yet generated access incentives, none of the access paths were accessed in the previous time before the initial time. Therefore, there is no need to update the verification weight of each access path. The verification weight of each access path in the previous time can be directly used as the verification weight of each access path in the initial time. That is, the preset initial verification weight can be directly determined as the verification weight of each access path in the initial time.
[0095] The preset initial verification weight for each access path is set to a uniform fixed value.
[0096] In this embodiment of the application, by uniformly setting the access status of each access path to unaccessed at the initial moment and uniformly setting the verification weight to the preset initial verification weight, each access path has the same probability of being selected at the initial moment. This allows the verification weight of the uncovered path to be increased based on the subsequent access frequency information, thereby accelerating the coverage convergence process.
[0097] like Figure 6 As shown, in one embodiment, the process of determining the target access path may include the following steps:
[0098] S401, determine the target path identifier from the path identifiers corresponding to each access path based on the verification weight of each access path at the current time.
[0099] For example, the probability of each access path being selected as the target access path can be determined based on the verification weight of each access path at the current moment. Then, a target path identifier can be randomly generated from each path identifier based on the probability of each access path being selected as the target access path. Here, the probability of each access path being selected as the target access path is the same as the probability of each path identifier being selected as the target path identifier.
[0100] S402, the access path corresponding to the target path identifier is determined as the target access path.
[0101] In this embodiment, after randomly generating the target path identifier, the access path corresponding to the target path identifier can be determined as the target access path.
[0102] It should be noted that the number of target path identifiers can be one or more. There is no limit to the number of target path identifiers here, and it can be set according to actual needs.
[0103] In this embodiment, the target path identifier is determined from the path identifiers corresponding to each access path based on the verification weight of each access path at the current time; the access path corresponding to the target path identifier is then determined as the target access path. In this embodiment, the access path is uniquely identified by the path identifier, thereby enabling random selection of the access path based on the random generation of the path identifier, improving the computational efficiency of weighted random selection, and ensuring the randomness of access path verification.
[0104] like Figure 7 As shown, in one embodiment, the process of determining the target path identifier may include the following steps:
[0105] S501, determine the probability of each path identifier being selected based on the verification weight of each access path at the current time.
[0106] Optionally, the selection probability of each path identifier can be adjusted according to the verification weight of each access path at the current time. The higher the verification weight, the higher the selection probability of the path identifier corresponding to the access path, and the lower the verification weight, the lower the selection probability of the path identifier corresponding to the access path.
[0107] S502, randomly select at least one path identifier from each path identifier according to each selection probability to obtain the target path identifier.
[0108] In this embodiment, the probability of being selected can be used as the input parameter of the random sequence to randomly generate at least one target path identifier from each path identifier based on the random sequence.
[0109] In this embodiment, the selection probability of each path identifier is determined according to the verification weight of each access path at the current time; at least one path identifier is randomly selected from each path identifier according to the selection probability to obtain the target path identifier, thereby enabling random selection of access paths based on the random generation of path identifiers, improving the computational efficiency of weighted random selection, and ensuring the randomness of access path verification.
[0110] like Figure 8 As shown, in one embodiment, the process of obtaining the access path described above may include the following steps:
[0111] S601, obtain the preset source port list and destination port list.
[0112] Optionally, the source port list and destination port list can be obtained based on the verification personnel's requirements for port access path coverage.
[0113] It should be noted that the ports included in the source port list and the ports included in the destination port list can be the same. That is, a port in the system under test can be used as both a source port and a destination port.
[0114] S602 determines the access path based on the source port list and the destination port list.
[0115] Optionally, each source port in the source port list and each destination port in the destination port list can be fully combined to obtain multiple port pairs. The path formed by each port pair is the complete set of access paths to be covered.
[0116] In this embodiment, a preset source port list and destination port list are obtained; based on the source port list and destination port list, the access path is determined, thereby enabling flexible configuration of the access path that needs to be verified according to the access path coverage requirements, improving the adjustability and flexibility of access path verification.
[0117] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.
[0118] Based on the same inventive concept, this application also provides an access path verification device for implementing the access path verification method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more access path verification device embodiments provided below can be found in the limitations of the access path verification method described above, and will not be repeated here.
[0119] In one exemplary embodiment, such as Figure 9 As shown, an access path verification device is provided, comprising:
[0120] The verification weight acquisition module 901 is used to acquire the verification weight of each access path in the system under test at the current time. The verification weight of each access path is updated based on the access status of each access path at the previous time. The verification weight represents the verification priority of the access path, and the higher the verification priority, the greater the verification weight.
[0121] The access path selection module 902 is used to select a target access path from each access path using a weighted random selection method based on the verification weight of each access path at the current time. The weighted random selection method is configured such that the path with the larger the verification weight has a higher probability of being selected as the target access path.
[0122] The incentive generation module 903 is used to generate access incentives for the target access path in order to verify the target access path.
[0123] In one embodiment, the verification weight acquisition module 901 includes:
[0124] The acquisition unit is used to acquire the access status and verification weight of each access path in the previous time step.
[0125] The verification weight update unit is used to update the verification weight of each access path based on the access status of the access path at the previous time, so as to obtain the verification weight of the access path at the current time.
[0126] In one embodiment, the verification weight update unit is specifically used to increase the verification weight of the access path at the previous time step based on a preset step size when the access status of the access path at the previous time step is that the access path has not been accessed, so as to obtain the verification weight of the access path at the current time step.
[0127] In one embodiment, the verification weight update unit is specifically used to determine the preset initial verification weight as the verification weight of the access path at the current moment when the access status of the access path at the previous moment is that the access path has been accessed.
[0128] In one embodiment, when the current time is the initial time of access path verification, the acquisition unit is specifically used to determine the initial access state as the access state of each access path in the previous time; the initial access state is unaccessed.
[0129] In one embodiment, when the current time is the initial time of access path verification, the acquisition unit is specifically used to determine the preset initial verification weight as the verification weight of each access path at the previous time.
[0130] In one embodiment, the access path selection module 902 includes:
[0131] The first determining unit is used to determine the target path identifier from the path identifiers corresponding to each access path based on the verification weight of each access path at the current time.
[0132] The second determining unit is used to determine the access path corresponding to the target path identifier as the target access path.
[0133] In one embodiment, the first determining unit is specifically configured to determine the selection probability of each path identifier based on the verification weight of each access path at the current time; and randomly select at least one path identifier from each path identifier based on the selection probability to obtain the target path identifier.
[0134] In one embodiment, the access path verification device further includes:
[0135] The port list acquisition unit is used to acquire a preset source port list and destination port list;
[0136] The third determining unit is used to determine the access path based on the source port list and the destination port list.
[0137] In one embodiment, the third determining unit is specifically used to fully combine each source port in the source port list with each destination port in the destination port list to obtain multiple port pairs; and to determine the path formed by each port pair as the access path.
[0138] Each module in the aforementioned access path verification device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.
[0139] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0140] Obtain the verification weight of each access path in the system under test at the current time. The verification weight of each access path is updated based on the access status of each access path at the previous time. The verification weight represents the verification priority of the access path, and the higher the verification priority, the greater the verification weight.
[0141] Based on the verification weight of each access path at the current moment, a weighted random selection method is used to select the target access path from each access path; wherein, the weighted random selection method is configured such that the path with the larger the verification weight has a higher probability of being selected as the target access path;
[0142] Generate access incentives for the target access path to validate the target access path.
[0143] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0144] Get the access status and verification weight of each access path in the previous time step;
[0145] For each access path, the verification weight of the access path at the previous time step is updated based on the access status of the access path at the previous time step, so as to obtain the verification weight of the access path at the current time step.
[0146] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0147] If the access path was not accessed in the previous time step, the verification weight of the access path in the previous time step is increased based on a preset step size to obtain the verification weight of the access path in the current time step.
[0148] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0149] If the access path was already accessed in the previous time step, the preset initial verification weight will be determined as the verification weight of the access path in the current time step.
[0150] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0151] The initial access state is determined as the access state of each access path at the previous moment; the initial access state is unaccessed.
[0152] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0153] The preset initial verification weight is determined as the verification weight of each access path at the previous time step.
[0154] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0155] Based on the verification weight of each access path at the current moment, the target path identifier is determined from the path identifiers corresponding to each access path.
[0156] The access path corresponding to the target path identifier is determined as the target access path.
[0157] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0158] The probability of each path identifier being selected is determined based on the verification weight of each access path at the current time.
[0159] At least one path identifier is randomly selected from each path identifier based on the probability of selection, so as to obtain the target path identifier.
[0160] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0161] Get the preset source port list and destination port list;
[0162] Determine the access path based on the source port list and the destination port list.
[0163] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0164] Combine each source port in the source port list with each destination port in the destination port list to obtain multiple port pairs;
[0165] The path formed by each port pair is determined as the access path.
[0166] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0167] Obtain the verification weight of each access path in the system under test at the current time. The verification weight of each access path is updated based on the access status of each access path at the previous time. The verification weight represents the verification priority of the access path, and the higher the verification priority, the greater the verification weight.
[0168] Based on the verification weight of each access path at the current moment, a weighted random selection method is used to select the target access path from each access path; wherein, the weighted random selection method is configured such that the path with the larger the verification weight has a higher probability of being selected as the target access path;
[0169] Generate access incentives for the target access path to validate the target access path.
[0170] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:
[0171] Get the access status and verification weight of each access path in the previous time step;
[0172] For each access path, the verification weight of the access path at the previous time step is updated based on the access status of the access path at the previous time step, so as to obtain the verification weight of the access path at the current time step.
[0173] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:
[0174] If the access path was not accessed in the previous time step, the verification weight of the access path in the previous time step is increased based on a preset step size to obtain the verification weight of the access path in the current time step.
[0175] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:
[0176] If the access path was already accessed in the previous time step, the preset initial verification weight will be determined as the verification weight of the access path in the current time step.
[0177] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:
[0178] The initial access state is determined as the access state of each access path at the previous moment; the initial access state is unaccessed.
[0179] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:
[0180] The preset initial verification weight is determined as the verification weight of each access path at the previous time step.
[0181] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:
[0182] Based on the verification weight of each access path at the current moment, the target path identifier is determined from the path identifiers corresponding to each access path.
[0183] The access path corresponding to the target path identifier is determined as the target access path.
[0184] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:
[0185] The probability of each path identifier being selected is determined based on the verification weight of each access path at the current time.
[0186] At least one path identifier is randomly selected from each path identifier based on the probability of selection, so as to obtain the target path identifier.
[0187] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:
[0188] Get the preset source port list and destination port list;
[0189] Determine the access path based on the source port list and the destination port list.
[0190] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:
[0191] Combine each source port in the source port list with each destination port in the destination port list to obtain multiple port pairs;
[0192] The path formed by each port pair is determined as the access path.
[0193] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps:
[0194] Obtain the verification weight of each access path in the system under test at the current time. The verification weight of each access path is updated based on the access status of each access path at the previous time. The verification weight represents the verification priority of the access path, and the higher the verification priority, the greater the verification weight.
[0195] Based on the verification weight of each access path at the current moment, a weighted random selection method is used to select the target access path from each access path; wherein, the weighted random selection method is configured such that the path with the larger the verification weight has a higher probability of being selected as the target access path;
[0196] Generate access incentives for the target access path to validate the target access path.
[0197] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:
[0198] Get the access status and verification weight of each access path in the previous time step;
[0199] For each access path, the verification weight of the access path at the previous time step is updated based on the access status of the access path at the previous time step, so as to obtain the verification weight of the access path at the current time step.
[0200] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:
[0201] If the access path was not accessed in the previous time step, the verification weight of the access path in the previous time step is increased based on a preset step size to obtain the verification weight of the access path in the current time step.
[0202] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:
[0203] If the access path was already accessed in the previous time step, the preset initial verification weight will be determined as the verification weight of the access path in the current time step.
[0204] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:
[0205] The initial access state is determined as the access state of each access path at the previous moment; the initial access state is unaccessed.
[0206] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:
[0207] The preset initial verification weight is determined as the verification weight of each access path at the previous time step.
[0208] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:
[0209] Based on the verification weight of each access path at the current moment, the target path identifier is determined from the path identifiers corresponding to each access path.
[0210] The access path corresponding to the target path identifier is determined as the target access path.
[0211] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:
[0212] The probability of each path identifier being selected is determined based on the verification weight of each access path at the current time.
[0213] At least one path identifier is randomly selected from each path identifier based on the probability of selection, so as to obtain the target path identifier.
[0214] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:
[0215] Get the preset source port list and destination port list;
[0216] Determine the access path based on the source port list and the destination port list.
[0217] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:
[0218] Combine each source port in the source port list with each destination port in the destination port list to obtain multiple port pairs;
[0219] The path formed by each port pair is determined as the access path.
[0220] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0221] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0222] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. An access path verification method, characterized in that, The method includes: Obtain the verification weight of each access path in the system under test at the current time. The verification weight of each access path is updated based on the access status of each access path at the previous time. The verification weight represents the verification priority of the access path, and the higher the verification priority, the greater the verification weight. Based on the verification weight of each access path at the current time, a weighted random selection method is used to select a target access path from each access path; wherein, the weighted random selection method is configured such that the path with the larger the verification weight has a higher probability of being selected as the target access path; Generate an access incentive for the target access path to verify the target access path.
2. The method according to claim 1, characterized in that, The process of obtaining the verification weight of each access path in the system under test at the current moment includes: Obtain the access status and verification weight of each access path at the previous time step; For each access path, the verification weight of the access path at the previous time is updated according to the access status of the access path at the previous time, so as to obtain the verification weight of the access path at the current time.
3. The method according to claim 2, characterized in that, The step of updating the verification weight of the access path based on its access status at the previous time step to obtain the verification weight of the access path at the current time step includes: If the access path was not accessed in the previous time step, the verification weight of the access path in the previous time step is increased based on a preset step size to obtain the verification weight of the access path in the current time step.
4. The method according to claim 2, characterized in that, The step of updating the verification weight of the access path based on its access status at the previous time step to obtain the verification weight of the access path at the current time step includes: If the access path was accessed in the previous time step and the access path was already accessed, the preset initial verification weight is determined as the verification weight of the access path in the current time step.
5. The method according to claim 2, characterized in that, If the current time is the initial time for access path verification, obtaining the access status of each access path in the previous time step includes: The initial access state is determined as the access state of each access path at the previous time step; the initial access state is unaccessed.
6. The method according to claim 5, characterized in that, If the current time is the initial time for access path verification, obtain the verification weight of each access path in the previous time, including: The preset initial verification weight is determined as the verification weight of each access path at the previous time step.
7. The method according to any one of claims 1-6, characterized in that, The step of determining the target access path from the access paths based on the verification weight of each access path at the current time includes: Based on the verification weight of each access path at the current time, the target path identifier is determined from the path identifiers corresponding to each access path; The access path corresponding to the target path identifier is determined as the target access path.
8. The method according to claim 7, characterized in that, The step of determining the target path identifier from the path identifiers corresponding to each access path based on the verification weight of each access path at the current time includes: The probability of each path identifier being selected is determined based on the verification weight of each access path at the current time. At least one path identifier is randomly selected from the path identifiers according to the selected probability to obtain the target path identifier.
9. The method according to any one of claims 1-6, characterized in that, The method further includes: Get the preset source port list and destination port list; The access path is determined based on the source port list and the destination port list.
10. The method according to claim 9, characterized in that, Determining the access path based on the source port list and the destination port list includes: By combining each source port in the source port list with each destination port in the destination port list, multiple port pairs are obtained. The path formed by the port pairs is determined as the access path.
11. An access path verification device, characterized in that, The device includes: The verification weight acquisition module is used to acquire the verification weight of each access path in the system under test at the current time. The verification weight of each access path is updated based on the access status of each access path at the previous time. The verification weight represents the verification priority of the access path, and the higher the verification priority, the greater the verification weight. The access path selection module is used to select a target access path from each of the access paths using a weighted random selection method based on the verification weight of each access path at the current time; wherein, the weighted random selection method is configured such that the path with the larger the verification weight has a higher probability of being selected as the target access path. The incentive generation module is used to generate access incentives for the target access path in order to verify the target access path.
12. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 10.
13. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 10.
14. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 10.
