Method and device for path normalization, equipment and storage medium

By obtaining the number of different path segments of multiple original paths, determining the access path group, and replacing the path segment with a predetermined identifier, a candidate path template is generated, and the target path template is determined based on the diversity score, which solves the problem of low efficiency in the processing of unknown path routing information in the prior art, and efficient path normalization and storage are achieved.

CN119996303APending Publication Date: 2025-05-13BEIJING VOLCANO ENGINE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510128550.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-27
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

The prior art is difficult to effectively process and analyze the routing information of unknown paths, resulting in inefficient network traffic analysis.

Method used

By obtaining the number of different path segments of multiple original paths, determining the access path group, and replacing the path segment with a predetermined identifier, a candidate path template is generated, and the target path template is determined based on the diversity score to achieve path normalization.

Benefits of technology

It realizes efficient processing and analysis of unknown paths, and improves the normalization and storage efficiency of network traffic.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119996303A_ABST
    Figure CN119996303A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a path normalization method and device, equipment and a storage medium. The method comprises the following steps: determining a plurality of access path groups based on different numbers of path segments respectively included in a plurality of obtained original paths for resource access; for each access path group of at least one access path group of the plurality of access path groups, generating a plurality of candidate path templates for the access path group by respectively performing path segment replacement on at least one access path in the access path group, at least one access path in the access path group corresponds to at least one original path in a plurality of original paths; and determining one or more target path templates used for resource access and corresponding to the access path group based on the corresponding diversity scores of the plurality of candidate path templates so as to realize path normalization. These path templates may be utilized by a gateway to serve various resource access requests.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Example embodiments of the present disclosure generally relate to the field of computers, and more particularly, to methods, devices, apparatuses, and computer-readable storage media for path normalization. Background Art

[0002] With the rapid development of computer technology, users' demand for high-speed and reliable network access is increasing, and the volume and complexity of network traffic are also increasing. Therefore, traffic analysis has become a vital technology for monitoring, optimizing and protecting network performance. In the traffic analysis system, it is expected that some methods can be used to infer routing information similar to the original path information, so as to achieve efficient processing, analysis and storage of this routing information. Summary of the invention

[0003] In a first aspect of the present disclosure, a method for path normalization is provided, comprising: determining a plurality of access path groups based on different numbers of path segments respectively included in a plurality of original paths acquired for resource access; for each access path group in at least one access path group in at least one access path group, generating a plurality of candidate path templates for the access path group by performing path segment replacement on at least one access path in the access path group, the path segment replacement being used to replace the path segments in the processed access path with predetermined identifiers, at least one access path in the access path group corresponding to at least one original path in the plurality of original paths; and determining one or more target path templates for resource access corresponding to the access path group based on corresponding diversity scores of the plurality of candidate path templates, so as to achieve path normalization, the diversity scores of the candidate path templates indicating the number of resource access paths that the candidate path templates can represent.

[0004] In a second aspect of the present disclosure, a device for path normalization is provided, comprising: an access path group determination module, configured to determine multiple access path groups based on different numbers of path segments respectively included in multiple original paths for resource access obtained; a candidate path template generation module, configured to generate multiple candidate path templates for each access path group in at least one access path group by performing path segment replacement on at least one access path in the access path group, wherein the path segment replacement is used to replace the path segments in the processed access path with predetermined identifiers, and at least one access path in the access path group corresponds to at least one original path in the multiple original paths; and a target path template determination module, configured to determine one or more target path templates for resource access corresponding to the access path group based on corresponding diversity scores of the multiple candidate path templates to achieve path normalization, wherein the diversity score of the candidate path template indicates the number of resource access paths that the candidate path template can represent.

[0005] In a third aspect of the present disclosure, an electronic device is provided. The device includes at least one processor; and at least one memory, the at least one memory is coupled to the at least one processor and stores instructions for execution by the at least one processor. When the instructions are executed by the at least one processor, the device executes the method of the first aspect.

[0006] In a fourth aspect of the present disclosure, a computer-readable storage medium is provided, wherein computer-executable instructions are stored on the computer-readable storage medium, and the computer-executable instructions can be executed by a processor to implement the method of the first aspect.

[0007] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising computer executable instructions, wherein the computer executable instructions implement the method of the first aspect when executed by a processor.

[0008] It should be understood that the contents described in this content section are not intended to limit the key features or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:

[0010] Figure 1 A schematic diagram showing an example environment in which embodiments of the present disclosure can be implemented;

[0011] FIG. 2A to FIG. 2BA schematic diagram showing an example process for path normalization according to some embodiments of the present disclosure is shown;

[0012] Figure 3 A schematic diagram showing another example process for path normalization according to some embodiments of the present disclosure;

[0013] Figure 4 A flowchart showing a process for path normalization according to some embodiments of the present disclosure is shown;

[0014] Figure 5 A block diagram showing an apparatus for path normalization according to some embodiments of the present disclosure; and

[0015] Figure 6 A block diagram of a device capable of implementing one or more embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0016] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0017] In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". Other explicit and implicit definitions may also be included below.

[0018] Herein, unless explicitly stated, executing a step “in response to A” does not mean executing the step immediately after “A” but may include one or more intermediate steps.

[0019] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.

[0020] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0021] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information, so that the user can independently choose whether to provide personal information to software or hardware such as electronic devices, applications, servers or storage media that execute operations of the technical solution of the present disclosure based on the prompt message.

[0022] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information is sent to the user in a manner such as a pop-up window, in which the prompt information can be presented in text form. In addition, the pop-up window can also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0023] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0024] As briefly mentioned above, traffic analysis has become a vital technology for monitoring, optimizing, and protecting network performance. Conventionally, in a traffic analysis system, for a large amount of original path information, the routing information to which each original path belongs can be determined based on the routing tree. Furthermore, the server device returns corresponding information to the client device based on the routing information to which each original routing information belongs. The routing tree indicates that a tree data structure is used, which includes prefixes, static routes, wildcards (also called "trees"), and leaf nodes. However, the above method cannot be used for path information without a routing tree.

[0025] Exemplarily, by collecting user requests (e.g., http: / / xxx / user / A), the original path (e.g., / user / A) can be obtained from the uniform resource locator (URL) in the user request. Then, the route that matches the path (e.g., / user / A) can be determined. Furthermore, the corresponding resources can be provided to the user 132 through the route. In this scenario, if the routing information of the path (e.g., / user / A) is known, the routing information of the path (e.g., / user / A) can be directly determined from the routing tree. However, in the case of an unknown path (e.g., / user / A), for example, for a certain gateway, a service does not register an application programming interface (Application Programming Interface, API) on the control plane. It is necessary to provide the user with corresponding resources by determining the routing information corresponding to the path (e.g., / user / A).

[0026] In view of this, according to some embodiments of the present disclosure, an improved scheme for path normalization is proposed. According to the scheme of the embodiment of the present disclosure, multiple access path groups are determined based on the different numbers of path segments respectively included in the multiple original paths for resource access obtained. For each access path group in at least one access path group among the multiple access path groups, multiple candidate path templates for the access path group are generated by performing path segment replacement on at least one access path in the access path group respectively, and the path segment replacement is used to replace the path segments in the processed access path with predetermined identifiers, and at least one access path in the access path group corresponds to at least one original path among the multiple original paths. Based on the corresponding diversity scores of the multiple candidate path templates, one or more target path templates for resource access corresponding to the access path group are determined to achieve path normalization, and the diversity scores of the candidate path templates indicate the number of resource access paths that the candidate path template can represent.

[0027] In this way, a path template close to the original path (e.g., / user / A) can be determined, thereby achieving efficient processing, analysis, and storage. For example, path / A / B / C, path / A / 23 / C, and path / A / 24 / C can be aggregated into a path template / A / * / C. That is, a unified access path, such as the same API, can be provided for these original paths. Embodiments of the present disclosure can be applied to a gateway. For example, a gateway can store these path templates or obtain these path templates in other ways. Based on the path template, the gateway can efficiently provide services for received requests.

[0028] Example embodiments of the present disclosure are described below with reference to the accompanying drawings.

[0029] Example Environment

[0030] Figure 1 1 is a schematic diagram of an example environment 100 in which embodiments of the present disclosure can be implemented. Figure 1 As shown, the example environment 100 may include a terminal device 110 and a server 130 .

[0031] In the environment 100, a user 132 may access some resources through an associated terminal device 110. For example, the user 132 may send a resource request for accessing a resource to a server end of the resource. The server 130 obtains (e.g., collects) resource requests from the terminal device 110. It should be understood that, although a single user 132 and a single terminal device 110 are shown, the environment 100 may include multiple users and corresponding terminal devices. The user 132 may access some resources in a resource pool 120 through an associated terminal device 110. The resource pool 120 may include one or more resources 122-1, 122-2, ..., 122-M. For ease of discussion, one or more resources 122-1, 122-2, ..., 122-M may be collectively or individually referred to as resources 122.

[0032] The server 130 can generate a path template from the resource requests collected by it and store it in the path template library 150. The resource service end can provide the corresponding resource 122 to the user 132 based on the path template collected by the server 130. In some embodiments, the path template library 150 may include a plurality of pre-stored candidate path templates. That is, after the server 130 collects a plurality of resource requests, a plurality of paths can be extracted from the plurality of resource requests. Further, the plurality of paths can be aggregated to generate a plurality of path templates.

[0033] The terminal device 110 can be any type of mobile terminal, fixed terminal or portable terminal, including mobile phones, desktop computers, laptop computers, notebook computers, netbook computers, tablet computers, media computers, multimedia tablets, personal communication systems (PCS) devices, personal navigation devices, personal digital assistants (PDAs), audio / video players, digital cameras / camcorders, television receivers, radio broadcast receivers, e-book devices, gaming devices, or any combination of the foregoing, including accessories and peripherals of these devices or any combination thereof. In some embodiments, the terminal device 110 can also support any type of interface for the user (such as "wearable" circuits, etc.).

[0034] The server 130 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks, and big data and artificial intelligence platforms. The server 130 may include, for example, a computing system / server, such as a mainframe, an edge computing node, a computing device in a cloud environment, etc. The server 130 may provide background services for applications in the terminal device 110 that support resource request services.

[0035] A communication connection may be established between the server 130 and the terminal device 110. The communication connection may be established in a wired manner or a wireless manner. The communication connection may include, but is not limited to, a Bluetooth connection, a mobile network connection, a Universal Serial Bus (USB) connection, a Wireless Fidelity (WiFi) connection, etc., and the embodiments of the present disclosure are not limited in this respect. In the embodiments of the present disclosure, the server 130 and the terminal device 110 may implement signaling interaction through the communication connection between the two.

[0036] It should be understood that the structure and function of the various elements in the environment 100 are described for exemplary purposes only and do not imply any limitation on the scope of the present disclosure.

[0037] Various example implementations of the present disclosure will be described in detail below with reference to the accompanying drawings. FIG. 2A to FIG. 2B Schematic diagrams of example processes 200A to 200B for path normalization according to some embodiments of the present disclosure are shown. For ease of discussion, reference will be made to Figure 1 The example processes 200A-200B are described with reference to the environment 100 of FIG.

[0038] In some embodiments, the server 130 may obtain multiple user requests (e.g., resource requests for resource access). In this case, the server 130 may determine which path templates the multiple original paths in the multiple user requests belong to, and then return the corresponding resource to the terminal device 110 according to the path template to which each of the multiple original paths belongs.

[0039] In an embodiment of the present disclosure, the server 130 determines multiple access path groups according to the different numbers of path segments respectively included in the multiple original paths obtained for resource access. At least one access path in each access path group corresponds to at least one original path in the multiple original paths. The server 130 can obtain multiple original paths, that is, obtain multiple original paths used by the user 132 for resource access. In some examples, the server 130 can obtain a large number of original paths from a database and perform data cleaning on these original paths (for example, filtering out invalid path data, deduplication, etc.) to obtain multiple original paths. It should be understood that, hereinafter, some embodiments will be described with reference to "each access path group", but this is merely exemplary. In some embodiments, each access path group may be each of the above-mentioned multiple access path groups. In some embodiments, each access path group may be each of at least one access path group in the above-mentioned multiple access path groups.

[0040] In some embodiments, each access path group may include a predetermined number (e.g., 100) of access paths to ensure path diversity. In some embodiments, the original path may indicate a URL path without a domain name or query data, and may be composed of multiple path segments, i.e., multiple segments separated by " / ". In some examples, the original path may include a path segment with parameters. Accordingly, the server 130 determines multiple path access groups based on the path segments respectively included in the multiple original paths obtained.

[0041] In some embodiments, the number of path segments of the access paths included in each access path group in the multiple access path groups is the same. The number of path segments of the access paths in the same access path group is the same. For example, if the multiple original paths acquired by the server 130 include an original path with 3 path segments, an original path with 4 path segments, and an original path with 5 path segments, then three path access groups can be determined. The original paths in these three path access groups have 3, 4, and 5 path segments, respectively.

[0042] For the sake of discussion, any one of the multiple original path groups (eg, original path group 208) will be taken as an example below, and reference will be made to FIG. 2A to FIG. 2B The following describes how to determine the access path group 280 corresponding to the original path group 208. It should be understood that for each of the multiple original path groups, the following method can be used to determine the corresponding access path group.

[0043] In some embodiments, the server 130 may divide the multiple original paths into multiple original path groups according to the different numbers of path segments respectively included in the multiple original paths. Any original path group in the multiple original path groups includes at least one original path in the multiple original paths. FIG. 2A to FIG. 2B In the example processes 200A to 200B shown, the server 130 can determine a group of original paths having N path segments (where N is a positive integer) based on the number of path segments respectively included in the multiple original paths, for example, an original path group 208 having 3 path segments.

[0044] For any original path group in the plurality of original path groups (eg, the original path group 208), the server 130 may detect whether at least one original path in the original path group 208 contains a path segment with a parameter. Figure 2A , the server 130 may detect whether the original paths 201 , 202 , 203 , 204 , 205 , 206 , 207 in the original path group 208 include path segments with parameters.

[0045] Furthermore, the server 130 may replace the detected path segment with the parameter with a predetermined identifier to update the original path group 208. Accordingly, the server 130 determines the updated original path group 208 as the access path group 280. Figure 2A As shown, the server 130 can determine through detection that the original path 201, the original path 202, and the original path 203 in the original path group 208 include path segments with parameters. The server 130 can replace the path segments with parameters in the original path 202 with predetermined identifiers, for example, updating the original path 202 "A / B / C.XX" to the access path 210 " / A / B / *". Similarly, the server 130 can replace the path segments with parameters in the original paths 202 and 203 with predetermined identifiers. Subsequently, the server 130 updates the original path group 208 to the access path group 280. The access path group 280 includes access paths 210, 220, 230, 240, 250, 260, and 270.

[0046] In some embodiments, a path segment with parameters may be a digital path segment, i.e., the path segment is composed entirely of numbers. A path segment with parameters may be a predetermined character path segment, i.e., the path segment includes non-standard information interchange code (ASCII) characters. A path segment with parameters may be a path segment with a number greater than a predetermined number of characters, i.e., the number of characters included in the path segment is greater than a predetermined number (e.g., 32). A path segment with parameters may be a path segment including an identifier, for example, the path segment includes "@". A path segment with parameters may be a placeholder path segment, for example, the path segment includes "<>, (), etc.".

[0047] In some embodiments, after the server 130 replaces the detected path segment with the parameter with the predetermined identifier, it can also perform a deduplication operation on the path segment replaced with the predetermined identifier, thereby updating the original path group 208. In this way, path aggregation can also be achieved, thereby improving the accuracy of determining routing information close to the original path.

[0048] For the sake of discussion, the following will take any one of the access path groups (eg, access path group 280) in at least one of the multiple access path groups as an example, and refer to FIG. 2A to FIG. 2B The following describes how to determine the multiple candidate path templates corresponding to the access path group 280. It should be understood that for each of the multiple access path groups, the following method can be used to determine the multiple corresponding candidate path templates.

[0049] In an embodiment of the present disclosure, the server 130 generates multiple candidate path templates for an access path group 280 in at least one access path group among the multiple access path groups by performing path segment replacement on at least one access path in the access path group 280. In some embodiments, the path segment replacement indicates that the path segment in the processed access path is replaced with a predetermined identifier.

[0050] Reference FIG. 2A to FIG. 2B In some embodiments, for any access path (e.g., access path 210) in access path group 280, server 130 may replace a first predetermined number of path segments in access path 210 with predetermined identifiers, thereby generating a set of candidate path templates corresponding to access path 210 from among multiple candidate templates. In some examples, server 130 may replace a predetermined number N (e.g., 0) of path segments with predetermined identifiers, such as taking access path 210 “ / A / B / *” itself as a candidate path template 211 for access path 210.

[0051] In some examples, server 130 may replace a predetermined number N (e.g., 1) of path segments with predetermined identifiers, such as replacing the “B” path segment in access path 210 “ / A / B / *” with “*” to generate a candidate path template 212 “ / A / * / *” for access path 210. For another example, replacing the “A” path segment in access path 210 “ / A / B / *” with “*” to generate a candidate path template 213 “ / * / B / *” for access path 210. Server 130 may also replace a predetermined number N (e.g., 2) of path segments with predetermined identifiers, such as replacing the “B” and “A” path segments in access path 210 “ / A / B / *” with “*” to generate a candidate path template 213 “ / * / * / *” for access path 210.

[0052] In some embodiments, the server 130 may replace a predetermined number N of path segments with a predetermined number M of predetermined identifiers, for example, replacing two path segments (e.g., path segment "B" and path segment "C") in the access path " / A / B / C" with a predetermined identifier respectively to generate a candidate path template " / A / * / *" for the access path. For another example, replacing two path segments (e.g., path segment "B" and path segment "C") in the access path " / A / B / C" with two predetermined identifiers to generate a candidate path template " / A / **" for the access path.

[0053] Similarly, the server 130 can obtain the access path group 280 including a group of candidate path templates (e.g., candidate path templates 221, 222, 223, etc.) corresponding to the access path 220 through the above method. A group of candidate path templates (e.g., candidate path templates 231, 232, 233, etc.) corresponding to the access path 230. The specific process can refer to the above method for determining the access path group 210, which will not be repeated here.

[0054] In some embodiments, the server 130 may determine whether the first path segment in any access path (e.g., access path 240) is a static path segment based on keyword information indicating a static path segment. If the first path segment is a static keyword, the replacement of the first path segment with a predetermined identifier may be abandoned. It is understandable that, in the process of replacing the path segment with the predetermined identifier, if the server 130 determines that the path segment is a static keyword, the path segment is not replaced.

[0055] In some embodiments, the keyword information indicating the static path segment is keyword information that is pre-set and stored. For example, if the frequency of keyword A being frequently used is greater than a frequency threshold, the path segment including keyword A will not be replaced with a predetermined identifier. Figure 2B As shown, the candidate path templates corresponding to the access path 240 may be the candidate path template 241, the candidate path template 242, the candidate path template 243, and the candidate path template 244. The server 130 determines based on the keyword information 291 that the path segments "J" and "K" in the access path 240 are both static keywords, and the path segments "J" and "K" cannot be replaced with "*", thereby determining that the candidate path templates 242 and 243 are unavailable. That is, the candidate path templates corresponding to the access path 240 may be the candidate path template 241 and the candidate path template 244.

[0056] The candidate path templates corresponding to the access path 250 may be the candidate path template 251, the candidate path template 252, the candidate path template 253, and the candidate path template 254. The server 130 determines that the path segment "J" in the access path 250 is a static keyword based on the keyword information 291, and the path segment "J" cannot be replaced by "*", thereby determining that the candidate path template 253 is unavailable. That is, the candidate path templates corresponding to the access path 250 may be the candidate path template 251, the candidate path template 252, and the candidate path template 254.

[0057] Similarly, a group of candidate path templates (e.g., candidate path templates 261, 262, 264, etc.) corresponding to access path 260. A group of candidate path templates (e.g., candidate path templates 271, 272, 274, etc.) corresponding to access path 270. The specific process can refer to the above-mentioned method of determining access path groups 240 and 250, which will not be repeated here.

[0058] The above describes determining multiple candidate path templates corresponding to any path group in at least one access path group among multiple access path groups. The following will continue to describe how to select one or more target path templates from multiple candidate path templates with reference to the accompanying drawings.

[0059] In an embodiment of the present disclosure, the server 130 determines one or more target path templates for resource access corresponding to the access path group based on the corresponding diversity scores of multiple candidate path templates to achieve path normalization. The diversity score of the candidate path template indicates the number of resource access paths that the candidate path template can represent. That is, the diversity of the candidate path template quantifies the number of different original paths that the candidate path template can contain. For example, if the candidate path template 211 can include an access path for accessing resources (i.e., can cover one original path), then the diversity score corresponding to the candidate path template 211 is 1. For another example, if the candidate path template 212 can include three access paths for accessing resources (i.e., can cover three original paths), then the diversity score corresponding to the candidate path template 212 is 3.

[0060] Reference FIG. 2A to FIG. 2B , the server 130 can determine one or more target path templates for resource access based on the diversity scores of the candidate path templates 211, 212, 213, 221, 222, 223, 241, 244, 251, 252, 254, 261, 262, 264, 271, 272, 274, etc., so as to achieve path normalization. FIG. 2A to FIG. 2B A description is given of how to determine one or more target path templates corresponding to the access path group 280 based on the diversity scores of the candidate templates.

[0061] In some embodiments, for any access path in the access path group 280 (e.g., the access path 210), the server 130 may select at least one candidate path template from a group of candidate path templates based on a comparison between the corresponding diversity scores of the group of candidate path templates corresponding to the access path 210 and the first diversity threshold. For example, the server 130 may compare the diversity scores of the candidate path template 211, the diversity scores of the candidate path template 212, and the diversity scores of the candidate path template 213 corresponding to the access path 210 with the first diversity threshold to determine at least one candidate path template corresponding to the access path 210.

[0062] In some embodiments, the first diversity threshold is a predefined constant used to determine whether the candidate path template meets the generalization criteria. For example, if the diversity of the candidate path template exceeds the first diversity threshold, it means that the candidate path template has sufficient generalization and can be determined to represent the basic HTTP traffic.

[0063] In some embodiments, if the server 130 determines that the set of candidate path templates includes one or more candidate path templates whose diversity scores are greater than the first diversity threshold, the server 130 selects at least one candidate path template from the one or more candidate path templates. FIG. 2A to FIG. 2B If server 130 determines that the diversity score of candidate path template 211 corresponding to access path 210 is 5, the diversity score of candidate path template 212 is 10, the diversity score of candidate path template 213 is 5, and the diversity threshold is 8, then candidate path template 212 can be selected.

[0064] Accordingly, if server 130 determines that the diversity score of candidate path template 221 corresponding to access path 220 is 6, the diversity score of candidate path template 222 is 9, the diversity score of candidate path template 223 is 5, and the diversity threshold is 8, then candidate path template 222 may be selected. Similarly, server 130 may determine candidate template 232 corresponding to access path 230. The values ​​of the diversity scores and diversity thresholds of the candidate path templates in the above examples are merely exemplary, and the present disclosure does not limit this.

[0065] In some embodiments, if the server 130 determines that the diversity scores of a group of candidate path templates are all less than the first diversity threshold, the server 130 may select a candidate path template that is the same as the access path in the group of candidate path templates as one of the at least one candidate path template. FIG. 2A to FIG. 2B, if server 130 determines that the diversity score of candidate path template 241 corresponding to access path 240 is 5, the diversity score of candidate path template 244 is 5, and the diversity threshold is 8, then server 130 may select candidate path template 241 that is the same as access path 240. The values ​​of the diversity scores and the diversity thresholds of the candidate path templates in the above examples are merely exemplary, and the present disclosure does not limit this.

[0066] In some embodiments, for a first candidate path template and a second candidate path template in one or more candidate path templates, if the server 130 determines that the diversity scores of the first candidate path template and the second candidate path template are the same, the server 130 compares the positions of the predetermined identifier in the first candidate path template and the second candidate path template. Further, if the server 130 determines that the position of the predetermined identifier in the second candidate path template is closer to the tail than the position in the first candidate path template, the server 130 determines the second candidate path template as one of the at least one candidate path template.

[0067] It can be understood that if the first candidate path template and the second candidate path template have the same diversity score, the candidate path template with the predetermined identifier at the end of the candidate path template is selected. Figure 2B As shown, if server 130 determines that the diversity score of candidate path template 251 corresponding to access path 250 is 1, the diversity score of candidate path template 252 is 3, the diversity score of candidate path template 254 is 3, and the diversity threshold is 2, then candidate path template 252 and candidate path template 254 can be selected.

[0068] Further, for candidate path template 252 and candidate path template 254 having the same diversity score, since the predetermined identifier ("*") in candidate path template 252 " / A / J / *" is located at the end thereof, while the predetermined identifier ("*") in candidate path template 254 " / * / J / L" is not located at the end thereof, candidate path template 252 is taken as one of at least one candidate path template. Similarly, server 130 can determine candidate templates 262 and 272 corresponding to access paths 260 and 270, respectively, in the above manner. The values ​​of the diversity scores and diversity thresholds of the candidate path templates in the above examples are merely exemplary, and the present disclosure does not limit this.

[0069] In some embodiments, the server 130 may determine one or more target path templates corresponding to the second access path group based on at least one candidate path template selected for each access path in the second access path group. FIG. 2A to FIG. 2BBased on the diversity score, the server 130 can select candidate path template 212, candidate path template 222, candidate path template 232, candidate path template 241, candidate path template 252, candidate path template 262, and candidate path template 272 from multiple candidate path templates corresponding to the access path group 280.

[0070] Further, the server 130 may perform a deduplication operation on the selected candidate path template 212, candidate path template 222, candidate path template 232, candidate path template 241, candidate path template 252, candidate path template 262, and candidate path template 272 to determine the target path template 281, target path template 241, and target path template 282 corresponding to the access path 280. In some embodiments, the server 130 may store the determined one or more target path templates in the path template library 150 for subsequent use.

[0071] Thus, a path template close to the original path can be determined, thereby achieving efficient processing, analysis and storage. Then, for the original path of the long tail, the path template close to the original path of the long tail can be determined in the following manner. Figure 3 To describe how to determine a path template that is close to the long-tail original path. Figure 3 A schematic diagram of an example process 300 for path normalization according to further embodiments of the present disclosure is shown.

[0072] Reference Figure 3 In the example process 300 shown, in some embodiments, for any access path group (e.g., access path group 302) in at least one access path group among multiple access path groups, the server 130 may generate multiple candidate path templates for the access path group 302 in the following manner. In some embodiments, the access path group 302 includes at least one access path, and the number of path segments respectively included in each of the access paths is greater than the number of predetermined path segments. For example, the number of path segments included in the access path 310 (also referred to as the "long tail path") is greater than the predetermined number of path segments, and the number of path segments included in the access path 320 (also referred to as the "long tail path") is also greater than the predetermined number of path segments. In some embodiments, the server 130 may also perform preprocessing operations on the long tail original path to determine one or more access path groups. Furthermore, one or more target path templates for resource access corresponding to each access path group in the one or more access path groups are determined.

[0073] In some embodiments, for any access path in access path group 302 (e.g., access path 310), server 130 may replace one or more number of path segments in the second access path with a second predetermined number of predetermined identifiers according to a predetermined policy to generate a set of candidate path templates corresponding to the second access path in a plurality of candidate path templates. In some examples, the predetermined policy may instruct server 130 to retain at least the first three path segments in the access path during the process of replacing the path segments with the predetermined identifiers.

[0074] Reference Figure 3 , the server 130 may replace N (e.g., 5) tail path segments in the access path 310 with N (e.g., 2) predetermined identifiers. For example, the five tail path segments in the access path 310 “ / A / B / C / D / … / … / H / J” are replaced with two “*” to generate a candidate path template 311 “ / A / B / C / **” for the access path 310. The server 130 may replace N (e.g., 4) tail path segments in the access path 310 with N (e.g., 2) predetermined identifiers. For example, the four tail path segments in the access path 310 “ / A / B / C / D / … / … / H / J” are replaced with two “*” to generate a candidate path template 312 “ / A / B / C / D / **” for the access path 310. For another example, the server 130 may replace N (e.g., 3) tail path segments in the access path 310 with N (e.g., 2) predetermined identifiers. For example, the three path segments at the end of the access path 310 “ / A / B / C / D / … / … / H / J” are replaced with two “*” to generate a candidate path template 313 “ / A / B / C / D / … / D**” of the access path 310 .

[0075] Similarly, the server 130 can also obtain candidate path templates 314, 315, etc. corresponding to the access path 310 by replacing the N tail path segments in the access path 310 with N (e.g., 2) predetermined identifiers. Additionally, the server 130 can also obtain candidate path templates 321, 322, 323, etc. corresponding to the access path 320 by replacing the N tail path segments in the access path 320 with N (e.g., 2) predetermined identifiers.

[0076] Further, the server 130 may determine the diversity scores of multiple candidate templates corresponding to the access path group 302. For any access path in the access path group 302 (e.g., the access path 310), the server 130 may select at least one candidate path template from a set of candidate path templates based on the corresponding diversity scores of the set of candidate path templates corresponding to the access path 302. In some embodiments, if the server 130 determines that a set of candidate path templates includes one or more candidate path templates whose diversity scores are greater than a second diversity threshold, the server 130 selects at least one candidate path template from the one or more candidate path templates. In some embodiments, the second diversity threshold is a predefined constant used to determine whether a candidate path template meets a generalization criterion. For example, if the diversity of the candidate path template exceeds the second diversity threshold, it indicates that the candidate path template has sufficient generalization and can be determined to represent basic HTTP traffic, and the second diversity threshold is greater than the first diversity threshold.

[0077] Reference Figure 3 If server 130 determines that the diversity score of candidate path template 311 corresponding to access path 310 is 20, the diversity score of candidate path template 312 is 14, the diversity score of candidate path template 313 is 8, the diversity score of candidate path template 314 is 6, the diversity score of candidate path template 315 is 4, and the diversity threshold is 15, then candidate path template 311 can be selected.

[0078] Correspondingly, if server 130 determines that the diversity score of candidate path template 321 corresponding to access path 320 is 20, the diversity score of candidate path template 322 is 9, the diversity score of candidate path template 323 is 5, and the diversity threshold is 15, then candidate path template 321 can be selected.

[0079] In some embodiments, the server 130 may determine one or more target path templates corresponding to the third access path group based on at least one candidate path template selected by each access path in the third access path group. Figure 3 , based on the diversity score, the server 130 can select a candidate path template 311 and a candidate path template 321 from a plurality of candidate path templates corresponding to the access path group 302. Further, the server 130 can perform a deduplication operation on the selected candidate path template 311 and the candidate path template 321 to determine a target path template 331 corresponding to the access path 302. In some embodiments, the server 130 can store the determined one or more target path templates in the path template library 150 for subsequent use. Thus, a path template close to the long-tail original path can be determined, thereby achieving efficient processing, analysis and storage.

[0080] In some embodiments, server 130 may use the following formula to determine one or more target path templates. Where U( ) can indicate the number of selected candidate path templates, diversity ≥ T, as T increases, the number of candidate templates that meet the diversity threshold decreases, reducing U(T). G(T) can indicate the number of groups of selected candidate templates. nG(T) indicates the number of candidate templates that do not meet the diversity threshold. In some examples, the smaller the value of T, the greater the number of candidate path templates that meet the conditions. The larger the value of T, the fewer the number of candidate path templates that meet the conditions, for example, mainly the original path. Therefore, the value of T can be optimized to keep P(T)≤M.

[0081] In some embodiments, the use of normalized path templates can be used for a variety of resource access tasks, such as processing resource access requests, managing service interfaces, etc. In some embodiments, a certain target path template can determine the service interface corresponding to the target path template. Further, actions associated with the service interface can be performed. For example, the corresponding API can be determined based on a certain target path template. If the API is not registered, a notification message can be provided to the developer of the API to prompt registration. If the API is registered, the traffic of the API can be managed, such as unified logging. For another example, for a subsequently received resource access request, if the resource access request hits a certain path template, resource access services can be provided based on the routing information or access logic corresponding to the path template.

[0082] In summary, the present disclosure can determine a path template that is similar to the original path, thereby achieving efficient processing, analysis and storage. For example, the path / A / B / C, the path / A / 23 / C, and the path / A / 24 / C can be aggregated into the path template / A / * / C. Furthermore, the infinite growth of a single service route can be avoided, and excessive derivation and unsuccessful derivation can be avoided based on the diversity threshold.

[0083] Example Process

[0084] Figure 4 FIG. 4 is a flow chart showing a process 400 for path normalization according to some embodiments of the present disclosure. The process 400 may be implemented at the server 130. Figure 1 Process 400 is described.

[0085] In block 410 , the server 130 determines a plurality of access path groups based on different numbers of path segments respectively included in a plurality of original paths for resource access obtained.

[0086] In box 420, the server 130 generates multiple candidate path templates for each access path group in at least one access path group among the multiple access path groups by performing path segment replacement on at least one access path in the access path group, wherein the path segment replacement is used to replace the path segments in the processed access path with predetermined identifiers, and at least one access path in the access path group corresponds to at least one original path among the multiple original paths.

[0087] In box 430, the server 130 determines one or more target path templates for resource access corresponding to the access path group based on the corresponding diversity scores of multiple candidate path templates to achieve path normalization, and the diversity scores of the candidate path templates indicate the number of resource access paths that the candidate path template can represent.

[0088] In some embodiments, a first access path group in at least one access path group is determined in the following manner: according to the different numbers of path segments respectively included in the multiple original paths, the multiple original paths are divided into multiple original path groups, and the original path groups in the multiple original path groups include at least one original path in the multiple original paths; for a first original path group in the multiple original path groups, detecting whether at least one original path in the first original path group includes a path segment with parameters; replacing the detected path segment with parameters with a predetermined identifier to update the first original path group; and determining the updated first original path group as the first access path group.

[0089] In some embodiments, for a second access path group in at least one access path group, generating multiple candidate path templates for the second access path group includes: for a first access path in the second access path group, replacing a first predetermined number of path segments in the first access path with predetermined identifiers respectively to generate a group of candidate path templates corresponding to the first access path in multiple candidate path templates.

[0090] In some embodiments, process 400 further includes: determining whether a first path segment in the first access path is a static path segment based on keyword information indicating the static path segment; and abandoning replacing the first path segment with a predetermined identifier in response to the first path segment being a static keyword.

[0091] In some embodiments, for a second access path group in at least one access path group, determining one or more target path templates for resource access corresponding to the second access path group includes: for each access path in the second access path group, based on comparing corresponding diversity scores of a set of candidate path templates corresponding to the access path with a first diversity threshold, selecting at least one candidate path template from a set of candidate path templates; and determining one or more target path templates corresponding to the second access path group based on at least one candidate path template selected for each access path in the second access path group.

[0092] In some embodiments, selecting at least one candidate path template from a set of candidate path templates includes: in response to a set of candidate path templates including one or more candidate path templates whose diversity scores are greater than a first diversity threshold, selecting at least one candidate path template from the one or more candidate path templates; and in response to a set of candidate path templates having corresponding diversity scores that are less than the first diversity threshold, selecting a candidate path template from the set of candidate path templates that is identical to the access path as one of at least one candidate path template.

[0093] In some embodiments, one or more candidate path templates include a first candidate path template and a second candidate path template, and selecting at least one candidate path template from the one or more candidate path templates includes: in response to the first candidate path template and the second candidate path template having the same diversity scores, comparing positions of a predetermined identifier in the first candidate path template and the second candidate path template; and in response to the position of the predetermined identifier in the second candidate path template being closer to the tail than the position in the first candidate path template, determining the second candidate path template as one of the at least one candidate path template.

[0094] In some embodiments, for a third access path group in at least one access path group, generating multiple candidate path templates for the third access path group includes: in response to the number of path segments respectively included in at least one access path included in the third access path group being greater than a predetermined number of path segments, for a second access path in the third access path group, replacing one or more number of path segments in the second access path with a second predetermined number of predetermined identifiers in accordance with a predetermined strategy to generate a group of candidate path templates corresponding to the second access path among the multiple candidate path templates.

[0095] In some embodiments, for the third access path group, determining one or more target path templates for resource access corresponding to the third access path group includes: determining a diversity score corresponding to each of a plurality of candidate path templates corresponding to the third access path group; for the second access path, selecting at least one candidate path template from a group of candidate path templates based on corresponding diversity scores of a group of candidate path templates corresponding to the second access path; and determining one or more target path templates corresponding to the third access path group based on at least one candidate path template selected for each access path in the third access path group.

[0096] In some embodiments, selecting at least one candidate path template from a set of candidate path templates includes: in response to the set of candidate path templates including one or more candidate path templates having a diversity score greater than a second diversity threshold, selecting at least one candidate path template from the one or more candidate path templates.

[0097] In some embodiments, in each access path group in the plurality of access path groups, different access paths included therein have the same number of path segments.

[0098] In some embodiments, process 400 further includes: determining, for a first path template among the one or more target path templates, a service interface corresponding to the first target path template; and performing an action associated with the service interface.

[0099] In some embodiments, the partial path segment with parameters includes at least one of the following: a numeric path segment, a predetermined character path segment, a path segment with a number greater than a predetermined number of characters, a path segment including an identifier, or a path segment including a placeholder.

[0100] Example devices and equipment

[0101] The embodiments of the present disclosure also provide corresponding devices for implementing the above methods or processes.

[0102] Figure 5 A schematic structural block diagram of an apparatus 500 for path normalization according to some embodiments of the present disclosure is shown. The apparatus 500 may be implemented as or included in the server 130. Each module / component in the apparatus 500 may be implemented by hardware, software, firmware, or any combination thereof.

[0103] like Figure 5As shown, the device 500 includes an access path group determination module 510, which is configured to determine multiple access path groups based on the different numbers of path segments respectively included in the multiple original paths for resource access obtained. The device 500 also includes a candidate path template generation module 520, which is configured to generate multiple candidate path templates for each access path group in at least one access path group among the multiple access path groups by performing path segment replacement on at least one access path in the access path group respectively, wherein the path segment replacement is used to replace the path segment in the processed access path with a predetermined identifier, and at least one access path in the access path group corresponds to at least one original path among the multiple original paths. The device 500 also includes a target path template determination module 530, which is configured to determine one or more target path templates for resource access corresponding to the access path group based on the corresponding diversity scores of the multiple candidate path templates to achieve path normalization, and the diversity score of the candidate path template indicates the number of resource access paths that the candidate path template can represent.

[0104] In some embodiments, the access path group determination module 510 is further configured to divide the multiple original paths into multiple original path groups according to the different numbers of path segments respectively included in the multiple original paths, and the original path groups in the multiple original path groups include at least one original path in the multiple original paths; for a first original path group in the multiple original path groups, detect whether at least one original path in the first original path group includes a path segment with parameters; replace the detected path segment with parameters with a predetermined identifier to update the first original path group; and determine the updated first original path group as the first access path group.

[0105] In some embodiments, the candidate path template generation module 520 is also configured to replace a first predetermined number of path segments in the first access path in the second access path group with predetermined identifiers, respectively, to generate a group of candidate path templates corresponding to the first access path among multiple candidate path templates.

[0106] In some embodiments, the device 500 also includes a replacement abandonment module, which is configured to determine whether the first path segment in the first access path is a static path segment based on keyword information indicating the static path segment; and in response to the first path segment being a static keyword, abandon replacing the first path segment with a predetermined identifier.

[0107] In some embodiments, the target path template determination module 530 is further configured to, for each access path in the second access path group, select at least one candidate path template from a group of candidate path templates based on a comparison of corresponding diversity scores of a group of candidate path templates corresponding to the access path with a first diversity threshold; and determine one or more target path templates corresponding to the second access path group based on at least one candidate path template selected for each access path in the second access path group.

[0108] In some embodiments, the candidate path template generation module 520 is further configured to, in response to a group of candidate path templates including one or more candidate path templates whose diversity scores are greater than a first diversity threshold, select at least one candidate path template from one or more candidate path templates; and in response to a group of candidate path templates having corresponding diversity scores less than the first diversity threshold, select a candidate path template in the group of candidate path templates that is the same as the access path as one of at least one candidate path template.

[0109] In some embodiments, one or more candidate path templates include a first candidate path template and a second candidate path template, and the candidate path template generation module 520 is also configured to, in response to the first candidate path template and the second candidate path template having the same diversity scores, compare the positions of the predetermined identifier in the first candidate path template and the second candidate path template; and in response to the position of the predetermined identifier in the second candidate path template being closer to the tail than the position in the first candidate path template, determine the second candidate path template as one of the at least one candidate path template.

[0110] In some embodiments, the candidate path template generation module 520 is also configured to, in response to the number of path segments respectively included in at least one access path included in the third access path group being greater than a predetermined number of path segments, replace one or more number of path segments in the second access path with a second predetermined number of predetermined identifiers according to a predetermined strategy for a second access path in the third access path group, so as to generate a group of candidate path templates corresponding to the second access path from a plurality of candidate path templates.

[0111] In some embodiments, the target path template determination module 530 is further configured to determine a diversity score corresponding to each of a plurality of candidate path templates corresponding to the third access path group; for the second access path, based on the corresponding diversity scores of a group of candidate path templates corresponding to the second access path, select at least one candidate path template from a group of candidate path templates; based on at least one candidate path template selected for each access path in the third access path group, determine one or more target path templates corresponding to the third access path group.

[0112] In some embodiments, the candidate path template generation module 520 is further configured to select at least one candidate path template from the one or more candidate path templates in response to a group of candidate path templates including one or more candidate path templates having a diversity score greater than a second diversity threshold.

[0113] In some embodiments, in each access path group in the plurality of access path groups, different access paths included therein have the same number of path segments.

[0114] In some embodiments, the apparatus 500 further includes an action execution module configured to determine, for a first path template among the one or more target path templates, a service interface corresponding to the first target path template; and execute an action associated with the service interface.

[0115] In some embodiments, the partial path segment with parameters includes at least one of the following: a numeric path segment, a predetermined character path segment, a path segment with a number greater than a predetermined number of characters, a path segment including an identifier, or a path segment including a placeholder.

[0116] The units and / or modules included in the device 500 can be implemented in various ways, including software, hardware, firmware, or any combination thereof. In some embodiments, one or more units and / or modules can be implemented using software and / or firmware, such as machine executable instructions stored on a storage medium. In addition to or as an alternative to machine executable instructions, some or all of the units and / or modules in the device 500 can be implemented at least in part by one or more hardware logic components. As an example and not limitation, exemplary types of hardware logic components that can be used include field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0117] It should be understood that one or more steps in the above method can be performed by a suitable electronic device or a combination of electronic devices. Such an electronic device or a combination of electronic devices may include, for example, Figure 1 The server 130 in.

[0118] Figure 6 1 shows a block diagram of an electronic device 600 in which one or more embodiments of the present disclosure may be implemented. It should be understood that Figure 6 The electronic device 600 shown is merely exemplary and should not constitute any limitation on the functionality and scope of the embodiments described herein. Figure 6 The electronic device 600 shown can be used to implement Figure 1 Server 130.

[0119] like Figure 6As shown, the electronic device 600 is in the form of a general electronic device. The components of the electronic device 600 may include, but are not limited to, one or more processors 610 or processing units, a memory 620, a storage device 630, one or more communication units 640, one or more input devices 650, and one or more output devices 660. The processor 610 may be an actual or virtual processor and is capable of performing various processes according to a program stored in the memory 620. In a multi-processor system, multiple processors execute computer executable instructions in parallel to improve the parallel processing capability of the electronic device 600.

[0120] The electronic device 600 typically includes a plurality of computer storage media. Such media can be any available media accessible to the electronic device 600, including but not limited to volatile and non-volatile media, removable and non-removable media. The memory 620 can be a volatile memory (e.g., registers, caches, random access memory (RAM)), a non-volatile memory (e.g., a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), flash memory) or some combination thereof. The storage device 630 can be a removable or non-removable medium, and can include a machine-readable medium, such as a flash drive, a disk, or any other medium, which can be used to store information and / or data and can be accessed within the electronic device 600.

[0121] The electronic device 600 may further include additional removable / non-removable, volatile / non-volatile storage media. Figure 6 As shown in , a disk drive for reading or writing from a removable, non-volatile disk (e.g., a "floppy disk") and an optical drive for reading or writing from a removable, non-volatile optical disk may be provided. In these cases, each drive may be connected to the bus (not shown) by one or more data media interfaces. The memory 620 may include a computer program product 625 having one or more program modules that are configured to perform various methods or actions of various embodiments of the present disclosure.

[0122] The communication unit 640 implements communication with other electronic devices through a communication medium. Additionally, the functions of the components of the electronic device 600 can be implemented with a single computing cluster or multiple computing machines that can communicate through a communication connection. Therefore, the electronic device 600 can operate in a networked environment using a logical connection with one or more other servers, a network personal computer (PC), or another network node.

[0123] The input device 650 may be one or more input devices, such as a mouse, a keyboard, a tracking ball, etc. The output device 660 may be one or more output devices, such as a display, a speaker, a printer, etc. The electronic device 600 may also communicate with one or more external devices (not shown) through the communication unit 640 as needed, such as a storage device, a display device, etc., communicate with one or more devices that allow a user to interact with the electronic device 600, or communicate with any device that allows the electronic device 600 to communicate with one or more other electronic devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input / output (I / O) interface (not shown).

[0124] According to an exemplary implementation of the present disclosure, a computer-readable storage medium is provided, on which computer-executable instructions are stored, wherein the computer-executable instructions are executed by a processor to implement the method described above. According to an exemplary implementation of the present disclosure, a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, and the computer-executable instructions are executed by a processor to implement the method described above.

[0125] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices, equipment, and computer program products implemented according to the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.

[0126] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so as to produce a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device for implementing the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions make the computer, programmable data processing device, and / or other equipment work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0127] Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, so that the instructions executed on the computer, other programmable data processing apparatus, or other device implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0128] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple implementations of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of a module, program segment or instruction includes one or more executable instructions for realizing the logical function of the specification. In some implementations as replacements, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be realized by a special hardware-based system that performs the function or action of the specification, or can be realized by a combination of special hardware and computer instructions.

[0129] The above descriptions of various implementations of the present disclosure are exemplary, non-exhaustive, and not limited to the disclosed implementations. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described implementations. The selection of terms used herein is intended to best explain the principles of the implementations, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the various implementations disclosed herein.

Claims

1. A path normalization method, comprising: Determine a plurality of access path groups based on different numbers of path segments respectively included in the plurality of original paths for resource access obtained; For each access path group in at least one access path group among the plurality of access path groups, generating a plurality of candidate path templates for the access path group by performing path segment replacement on at least one access path in the access path group, respectively, wherein the path segment replacement is used to replace a path segment in the processed access path with a predetermined identifier, and the at least one access path in the access path group corresponds to at least one original path among the plurality of original paths; as well as Based on the corresponding diversity scores of the multiple candidate path templates, one or more target path templates for resource access corresponding to the access path group are determined to achieve path normalization, and the diversity scores of the candidate path templates indicate the number of resource access paths that the candidate path template can represent.

2. The method according to claim 1, wherein the first access path group in the at least one access path group is determined by: According to different numbers of path segments respectively included in the multiple original paths, the multiple original paths are divided into multiple original path groups, wherein an original path group in the multiple original path groups includes at least one original path among the multiple original paths; For a first original path group among the plurality of original path groups, detecting whether the at least one original path in the first original path group includes a path segment with parameters; replacing the detected path segment with the parameter with the predetermined identifier to update the first original path group; as well as The updated first original path group is determined as the first access path group.

3. The method according to claim 1, wherein for a second access path group in the at least one access path group, generating the plurality of candidate path templates for the second access path group comprises: For a first access path in the second access path group, a first predetermined number of path segments in the first access path are respectively replaced with the predetermined identifiers to generate a group of candidate path templates corresponding to the first access path from among the multiple candidate path templates.

4. The method according to claim 3, further comprising: determining, based on keyword information indicating a static path segment, whether a first path segment in the first access path is a static path segment; as well as In response to the first path segment being a static keyword, replacing the first path segment with the predetermined identifier is abandoned.

5. The method according to claim 1, wherein for a second access path group in the at least one access path group, determining one or more target path templates for resource access corresponding to the second access path group comprises: For each access path in the second access path group, selecting at least one candidate path template from a set of candidate path templates corresponding to the access path based on a comparison of respective diversity scores of the set of candidate path templates with a first diversity threshold; as well as The one or more target path templates corresponding to the second access path group are determined based on the at least one candidate path template selected for each access path in the second access path group.

6. The method of claim 5, wherein selecting at least one candidate path template from the set of candidate path templates comprises: In response to the set of candidate path templates including one or more candidate path templates having a diversity score greater than the first diversity threshold, selecting the at least one candidate path template from the one or more candidate path templates; as well as In response to the corresponding diversity scores of the set of candidate path templates being all smaller than the first diversity threshold, a candidate path template in the set of candidate path templates that is identical to the access path is selected as one of the at least one candidate path template.

7. The method according to claim 5, wherein the one or more candidate path templates include a first candidate path template and a second candidate path template, and selecting the at least one candidate path template from the one or more candidate path templates includes: In response to the first candidate path template and the second candidate path template having the same diversity score, comparing positions of the predetermined identifier in the first candidate path template and the second candidate path template; as well as In response to the position of the predetermined identifier in the second candidate path template being closer to the tail than the position of the predetermined identifier in the first candidate path template, the second candidate path template is determined as one of the at least one candidate path template.

8. The method according to claim 1, wherein for a third access path group in the at least one access path group, generating the plurality of candidate path templates for the third access path group comprises: In response to the number of path segments respectively included in the at least one access path included in the third access path group being greater than a predetermined number of path segments, For the second access path in the third access path group, one or more path segments in the second access path are replaced with a second predetermined number of the predetermined identifiers according to a predetermined strategy to generate a group of candidate path templates corresponding to the second access path from the multiple candidate path templates.

9. The method according to claim 8, wherein for the third access path group, determining one or more target path templates for resource access corresponding to the third access path group comprises: Determine a diversity score corresponding to each of the plurality of candidate path templates corresponding to the third access path group; For the second access path, selecting at least one candidate path template from the set of candidate path templates based on respective diversity scores of the set of candidate path templates corresponding to the second access path; The one or more target path templates corresponding to the third access path group are determined based on the at least one candidate path template selected for each access path in the third access path group.

10. The method of claim 9, wherein selecting at least one candidate path template from the set of candidate path templates comprises: In response to the set of candidate path templates including one or more candidate path templates having a diversity score greater than a second diversity threshold, the at least one candidate path template is selected from the one or more candidate path templates. 11 . The method according to claim 1 , wherein in each access path group of the plurality of access path groups, different access paths included therein have the same number of path segments.

12. The method according to claim 1, further comprising: For a first target path template among the one or more target path templates, determining a service interface corresponding to the first target path template; as well as An action associated with the service interface is performed.

13. The method according to claim 2, wherein the partial path segment with parameters comprises at least one of the following: Digital path segment, Predetermined character path segments, Path segments that are greater than a predetermined number of characters, A path segment that includes an identifier, or Include path segments for placeholders.

14. A device for path normalization, comprising: An access path group determination module, configured to determine a plurality of access path groups based on different numbers of path segments respectively included in a plurality of original paths for resource access obtained; a candidate path template generating module configured to generate a plurality of candidate path templates for each access path group in at least one access path group among the plurality of access path groups by performing path segment replacement on at least one access path in the access path group, wherein the path segment replacement is used to replace a path segment in the processed access path with a predetermined identifier, and the at least one access path in the access path group corresponds to at least one original path among the plurality of original paths; as well as The target path template determination module is configured to determine one or more target path templates for resource access corresponding to the access path group based on the corresponding diversity scores of the multiple candidate path templates to achieve path normalization, and the diversity scores of the candidate path templates indicate the number of resource access paths that the candidate path template can represent.

15. An electronic device, comprising: at least one processor; as well as At least one memory, the at least one memory being coupled to the at least one processor and storing instructions for execution by the at least one processor, the instructions causing the electronic device to perform the method according to any one of claims 1 to 13 when executed by the at least one processor.

16. A computer-readable storage medium having computer-executable instructions stored thereon, wherein the computer-executable instructions can be executed by a processor to implement the method according to any one of claims 1 to 13.

17. A computer program product comprising computer executable instructions, wherein the computer executable instructions, when executed by a processor, implement the method according to any one of claims 1 to 13.