URL convergence method, server and computing device cluster
By dynamically identifying and adapting the divergence of URLs on the server, convergence rules are determined, and the problem of divergence of URLs in the prior art is solved, which improves recognition accuracy and reduces storage and query costs.
Patent Information
- Application Number
- CN202311763485.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-20
- Publication Date
- 2025-06-20
AI Technical Summary
The prior art is difficult to effectively identify and adapt to the dynamic changes of URLs, resulting in URL divergence problems and increasing storage and query costs.
The server dynamically collects the client's URL, identifies the divergence situation in the URL, and determines the convergence rules that adapt to the dynamic changes of the URL, and sends them to the client for URL convergence.
Improve the accuracy of identifying divergent URLs, reduce storage and query costs, and flexibly adapt to dynamic changes of URLs.
Smart Images

Figure CN120179934A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present application relate to the field of computer technologies, and provide a method for URL convergence, a server, and a cluster of computing devices. Background Art
[0002] A Uniform Resource Locator (URL) is a concise representation of the location and access method of resources that can be obtained from the Internet, and is the address of standard resources on the Internet. Each file on the Internet has a unique URL, and the information it contains can indicate the location of the file and the processing method of the browser for the file. In fields such as front-end page rendering, search analysis, and storage, relevant service call requests will contain a large number of parameters, status codes, and tens of thousands of secondary, tertiary, and other sub-interfaces, thus diverging into countless different URLs.
[0003] URLs can usually be classified and stored according to whether the domain names are the same. However, there are automatically generated divergent field contents in URLs. These divergent field contents may be accumulations of meaningless numbers and special symbols. During actual storage and query rendering, due to the long character length of these field contents, all these divergent fields need to be stored during storage, resulting in an increase in storage costs and query costs. Therefore, an effective technical solution is urgently needed to solve the above technical problem of URL divergence.
[0004] In related technologies, divergent URLs can be identified and converged through regular expressions or preset pattern templates. However, the changes in URLs are numerous, and these methods are difficult to adapt to the dynamic changes of URLs, which may reduce the accuracy of identifying divergent URLs. Summary of the Invention
[0005] Embodiments of the present application provide a method for URL convergence, a server, and a cluster of computing devices. By dynamically collecting the URLs of clients by the server and actively identifying and analyzing the divergence situation of the URLs to determine the convergence rules, it can flexibly adapt to the dynamic changes of URLs and improve the accuracy of identifying divergent URLs.
[0006] In a first aspect, an embodiment of the present application provides a method for URL convergence, which is applied to a server. The method includes:
[0007] Receiving a Uniform Resource Locator URL sent by a client; the URL includes parameters for locating the resource to be accessed; identifying the URL with divergence in the URL, and determining the convergence rule of the URL with divergence; the divergence situation is that the status of the parameter is variable; sending the convergence rule to the client so that the client converges the URL according to the convergence rule.
[0008] In this solution, the server dynamically collects the URLs of the clients and actively identifies and analyzes the divergence situation of the URLs to determine the convergence rules, which can flexibly adapt to the dynamic changes of the URLs and improve the accuracy of identifying divergent URLs.
[0009] In a possible implementation, the convergence rule includes the regular expression of the URL, and the regular expression includes the replacement values of the parameters with divergence situations in the URL.
[0010] In a possible implementation, the replacement values of the parameters are determined by the types of the parameters.
[0011] In a possible implementation, identifying the URLs with divergence situations in the URLs and determining the convergence rules for the URLs with divergence situations includes:
[0012] Taking the parameters in the URL as nodes, a query tree is established; the query tree includes query paths, and the query paths are formed by connecting the nodes in order to represent the URL; based on the in-degree and out-degree of each node in the query tree, the nodes with divergence situations are determined; based on the nodes with divergence situations and the query paths in the query tree, the convergence rules are determined.
[0013] In this solution, the query tree is used to automatically identify the URLs with divergence situations and determine the convergence rules, which can flexibly adapt to the dynamic changes of the URLs and improve the accuracy of identifying divergent URLs.
[0014] In a possible implementation, the method further includes: determining the usage frequency of the convergence rules by the client.
[0015] In a possible implementation, the method further includes: stopping the use of the convergence rules when the usage frequency is less than or equal to a preset threshold.
[0016] In a possible implementation, the method further includes: managing the convergence rules, and the management includes starting, stopping or modifying.
[0017] In a second aspect, an embodiment of the present invention provides a URL convergence device. The URL convergence device includes several modules, and each module is used to execute each step in the URL convergence method provided in the first aspect of the embodiment of the present invention. The division of the modules is not limited here. For the specific functions executed by each module of the URL convergence device and the beneficial effects achieved, please refer to the functions of each step in the URL convergence method provided in the first aspect of the embodiment of the present invention, which will not be elaborated here.
[0018] Exemplarily, the URL convergence device includes:
[0019] A receiving module, configured to receive a Uniform Resource Locator (URL) sent by a client; the URL includes parameters, and the parameters are used to locate the resource to be accessed.
[0020] An identification module, configured to identify the URLs with divergence situations in the URL and determine the convergence rules for the URLs with divergence situations; the divergence situation is that the status of the parameter is variable.
[0021] A management module, configured to send the convergence rules to the client, so that the client converges the URL according to the convergence rules.
[0022] In a possible implementation manner, the convergence rules include the regular expression of the URL, and the regular expression includes the replacement values of the parameters with divergence situations in the URL.
[0023] In a possible implementation manner, the replacement value of the parameter is determined by the type of the parameter.
[0024] In a possible implementation manner, the identification module includes a learning unit and a rule generation unit; wherein,
[0025] The learning unit is configured to establish a query tree with the parameters in the URL as nodes; the query tree includes query paths, and the query paths are formed by connecting the nodes in sequence and are used to represent the URL; based on the in-degree and out-degree of each node in the query tree, determine the nodes with divergence situations.
[0026] The rule generation unit is configured to determine the convergence rules based on the nodes with divergence situations in the query tree and the query paths.
[0027] In a possible implementation manner, the apparatus further includes: a frequency statistics module, configured to determine the usage frequency of the convergence rules by the client.
[0028] In a possible implementation manner, the apparatus further includes: a stop usage module, configured to stop using the convergence rules when the usage frequency is less than or equal to a preset threshold.
[0029] In a possible implementation manner, the apparatus further includes: a management module, configured to manage the convergence rules, and the management includes starting, stopping, or modifying.
[0030] In a third aspect, an embodiment of the present application provides an apparatus for URL convergence, including: at least one memory, configured to store a program; at least one processor, configured to execute the program stored in the memory, and when the program stored in the memory is executed, the processor is configured to execute the method provided in the first aspect.
[0031] Fourthly, an embodiment of the present application provides a URL convergence device that runs computer program instructions to execute the method provided in the first aspect. Exemplarily, the device can be a chip or a processor.
[0032] In one example, the device may include a processor that can be coupled to a memory, read instructions in the memory, and execute the method provided in the first aspect according to the instructions. Among them, the memory can be integrated in the chip or the processor, or can be independent of the chip or the processor.
[0033] Fifthly, an embodiment of the present application provides a server for executing the method provided in the first aspect.
[0034] Sixthly, an embodiment of the present application provides a computing device cluster, including: at least one computing device, each computing device includes a processor and a memory, and the processor of at least one computing device is used to execute instructions stored in the memory of at least one computing device, so that the computing device cluster executes the method provided in the first aspect.
[0035] Seventhly, an embodiment of the present application provides a computer storage medium, in which instructions are stored, and when the instructions run on a computer, the computer is enabled to execute the method provided in the first aspect.
[0036] Eighthly, an embodiment of the present application provides a computer program product containing instructions, and when the instructions run on a computer, the computer is enabled to execute the method provided in the first aspect. Description of the Drawings
[0037] Figure 1 is the system architecture diagram of the URL convergence system provided by the embodiment of the present application;
[0038] Figure 2 is the flow schematic diagram of the method for URL convergence provided by the embodiment of the present application Figure 1 ;
[0039] Figure 3 is the flow schematic diagram of the method for URL convergence provided by the embodiment of the present application Figure 2 ;
[0040] Figure 4 is the structural schematic diagram of the server provided by the embodiment of the present application Figure 1 ;
[0041] Figure 5 is the structural schematic diagram of the server provided by the embodiment of the present application Figure 2 ;
[0042] Figure 6It is a schematic structural diagram of a computing device provided by an embodiment of the present application;
[0043] Figure 7 It is a schematic structural diagram of a computing device cluster provided by an embodiment of the present application;
[0044] Figure 8 It is a schematic structural diagram of the interaction between computing devices provided by an embodiment of the present application. Detailed implementation manners
[0045] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings.
[0046] In the description of the embodiments of the present application, words such as "exemplary", "for example", or "for instance" are used to indicate examples, illustrations, or explanations. Any embodiment or design solution described as "exemplary", "for example", or "for instance" in the embodiments of the present application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Rather, the use of words such as "exemplary", "for example", or "for instance" is intended to present relevant concepts in a specific manner.
[0047] In the description of the embodiments of the present application, the term "and / or" is merely a description of the association relationship between associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, B exists alone, and both A and B exist simultaneously. In addition, unless otherwise specified, the meaning of the term "plural" refers to two or more. For example, multiple systems refer to two or more systems, and multiple terminals refer to two or more terminals.
[0048] In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly indicating the technical features indicated. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features. The terms "include", "comprise", "have" and their variants all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0049] Hereinafter, some terms in this embodiment will be explained. It should be noted that these explanations are for the convenience of those skilled in the art and do not constitute a limitation on the protection scope required by the present application.
[0050] Uniform Resource Locator (URL): Identifies the location of a certain resource.
[0051] URL convergence: It refers to merging a series of URLs with similarities and displaying them as one. For example, a series of URLs with the first half being / service / demo / are centrally displayed.
[0052] Regular Expression (RE): Also known as normal representation method and conventional representation method, it is used to describe and match a series of strings that conform to a certain syntactic rule with a single string.
[0053] Universally Unique Identifier (UUID): It is a standard for software construction and is also part of the Open Software Foundation's organization in the field of distributed computing environments. Its purpose is to enable all elements in a distributed system to have unique identification information without the need to specify the identification information through a central control terminal. In this way, everyone can create a UUID that does not conflict with others.
[0054] Variable: It is an abstract concept in computer languages that can store calculation results or represent values. Variables can be accessed through variable names. In the embodiments of this application, variables are clearly defined as abstractions with variable states and storage spaces (such as in Java and Visual Basic).
[0055] Parameter: It refers to a variable or constant used to describe the characteristics and behaviors in a certain model, function, or system. They can be numerical values, symbols, or other types of data. The values of parameters can affect the output results of the model or system, so they play an important role in understanding and predicting the behaviors of the model or system.
[0056] Generally speaking, the timeline in time series data refers to the combination of metric names and labels. If the value space of one or more labels of a metric is relatively large, that is, the cardinality of the label is relatively high, such a label can be called a high-cardinality label. The high-cardinality label leads to a sharp increase in the number of combinations, which in turn leads to a sharp increase in the number of timelines corresponding to the metric, that is, the so-called timeline explosion.
[0057] The URL divergence situation is a special case of the high-cardinality problem. If there are parameters with variable states (an example of a label) in the URL, such as UserId, timestamp, UUID, etc., the variable state of the parameter will cause the same pattern of URLs to diverge into multiple ones. For example, if the URL contains a variable of UserID and there are one million UserIds, then one million URLs will be generated.
[0058] Currently, in the fields of front-end page rendering, search analysis, and detection and storage, there is a problem of difficult convergence of high-cardinality parameters. Specifically, URLs (or URL interfaces) diverge. Identical or related service call requests diverge into countless different URLs due to the inclusion of a large number of parameters, status codes, and tens of thousands of secondary and tertiary sub-interfaces. There is a large amount of invalid information in the text content of the URLs. The existence of this invalid information causes the log content to be too divergent, resulting in slow query speed, which incurs high costs for subsequent analysis, storage, detection, and display. Therefore, it is necessary to converge these divergent URLs, retain valuable content, block useless information, reduce storage costs, so as to improve the user's storage experience and reduce the user's storage costs.
[0059] In related technologies, URLs are usually identified and classified through regular expressions or preset typical templates. Regular expressions and typical modules are usually written manually based on experience, highly dependent on expert experience, time-consuming to match, wasting labor costs and time costs, and also unable to adapt to the dynamic changes of URLs. They can only identify and classify fixed types of URLs, and cannot guarantee accuracy, real-time performance, and efficiency.
[0060] Therefore, there is an urgent need for an effective technical solution to solve the above problems.
[0061] Based on this, the embodiments of this application propose a method for URL convergence.
[0062] This method reports the URL from the client to the server. The server identifies the URLs with divergence in the URL, determines the convergence rules for the URLs with divergence, and sends the convergence rules to the client so that the client converges the URL according to the convergence rules. On the one hand, it can learn in real time the URLs with divergence and generate the convergence rules for the URLs. On the other hand, by identifying the divergent URLs on the server and generating the convergence rules for the URLs, it can reduce the resource consumption of the client.
[0063] Here is just a brief description of the method. For the detailed content of this method, please refer to the following description.
[0064] Based on the above ideas, the embodiments of this application provide a URL convergence system. Figure 1 It is the system architecture diagram of a URL convergence system provided by the embodiments of this application. The URL convergence system is a distributed scenario. A distributed scenario refers to a scenario where multiple devices are connected through a network, exchange information and data with each other, and jointly complete a task goal.
[0065] Such as Figure 1As shown, the URL convergence system includes one or more clients 110 and a server 120. Among them, one or more clients 110 are connected to the server 120 through a network. Here, the network can be a wired network or a wireless network. By way of example, the wired network can be a cable network, an optical fiber network, a Digital Data Network (DDN), etc., and the wireless network can be a telecommunications network, an internal network, the Internet, a Local Area Network (LAN), a Wide Area Network (WAN), a Wireless Local Area Network (WLAN), a Metropolitan Area Network (MAN), a Public Service Telephone Network (PSTN), a Bluetooth network, a ZigBee network, a Global System for Mobile Communications (GSM), a CDMA (Code Division Multiple Access) network, a GPRS (General Packet Radio Service) network, etc. or any combination thereof. It can be understood that the network can use any known network communication protocol to implement communication between different client layers and gateways. The above network communication protocols can be various wired or wireless communication protocols, such as Ethernet, universal serial bus (USB), firewire, global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), new radio (NR), Bluetooth, wireless fidelity (Wi-Fi), etc.
[0066] The client can be understood as an application program for implementing tasks. In the embodiments of the present application, the client is used to implement the task of converging URLs according to convergence rules. In actual applications, the client is installed on an electronic device, and the user runs the client through the electronic device, so that the client provides services for the user to meet different business requirements. Of course, in some possible cases, the electronic device is installed with a browser, and the user can access the client through the browser.
[0067] Here, in one example, the electronic devices involved in this solution can be mobile phones, laptop computers, tablet computers, large-screen display devices, virtual / hybrid / augmented reality devices, local servers, etc., and the embodiments of the present application do not limit this.
[0068] In the embodiments of the present application, the server can be understood as an application program that provides services for the client. In each of the embodiments of the present application, the server is used to identify the URLs with divergence situations in the URLs sent by the client, and after determining the convergence rules for the URLs with divergence situations, send them to the client. In actual applications, the server is installed on an electronic device, so that the server can be run to provide services for the client.
[0069] Here, in one example, the electronic devices involved in this solution can be servers, etc. The embodiments of the present application do not make specific limitations on this, and the electronic devices can be determined specifically in combination with actual needs.
[0070] Next, in combination with the URL convergence system provided above, a method for URL convergence provided by the embodiments of the present application will be introduced in detail.
[0071] Figure 2 It is a schematic flowchart of the method for URL convergence provided by the embodiments of the present application. This embodiment can be applied to an autonomous driving system, specifically on a server or a general computer.
[0072] As Figure 2 shown, the method for URL convergence provided by the embodiments of the present application at least includes the following steps:
[0073] Step 201, the client 110 sends a URL to the server 120. The URL includes parameters, and the parameters are used to locate the resource to be accessed.
[0074] In specific implementation, the client 110 can send the URL to the server 120 through the network.
[0075] Among them, the parameters included in the URL are used to locate the resource to be accessed; locating means explaining the location of the resource to be accessed. For example, the parameters included in the URL can identify the location and path of the resource to be accessed on the server. In some possible scenarios, the parameters in the URL can also be referred to as path parameters. It should be noted that the number of parameters in the URL is generally multiple. Exemplarily, the URL includes a request path, and the request path is formed by multiple parameters.
[0076] Step 202: The server 120 identifies the URLs with divergence in the URL, and determines the convergence rules for the URLs with divergence. The divergence situation is that the status of the parameter is variable.
[0077] It should be noted that the number of URLs with divergence problems is multiple and includes parameters with variable status. The variable status of the parameter means that the parameter has different parameter values. For example, assuming the parameter is UserId, there can be multiple parameter values, such as 00001, 00002,....
[0078] Among them, the convergence rule includes the regular expression of the URL, and the regular expression includes the replacement value of the parameter with divergence in the URL. In some possible cases, the replacement value of the parameter is determined based on the type of the parameter. For example, the replacement value of the parameter can be the type of the parameter. Exemplarily, the type of the parameter is Universally Unique Identifier (UUID), Date, Timestamp, LongNumericString, or useless data. Exemplarily, the form of the replacement value can be {ARMS_*}. For example, if the content of the parameter is pure numbers, it will be replaced with {ARMS_NUMBER}, if the content is pure letters, it will be replaced with {ARMS_WORD}, and if the content contains both numbers and letters, it will be replaced with {ARMS_ANY}.
[0079] In a possible implementation manner, step 202 is implemented in the following way:
[0080] Taking the parameters in the URL as nodes, a query tree is established; the query tree includes a query path, and the query path is formed by connecting the nodes in sequence and is used to represent the URL; based on the in-degree and out-degree of each node in the query tree, the nodes with divergence are determined; based on the nodes with divergence in the query tree and the query path, the convergence rule is determined.
[0081] In the embodiments of the present application, the server 120 constructs a query tree with each parameter for locating the resource to be accessed in the URL as a node and the order among multiple parameters for locating the resource to be accessed in the URL as the order of the nodes. The query tree can be used to query each URL. Specifically, the query tree includes several query paths, and each query path can represent a URL. Then, the server 120 determines the nodes with divergence situations based on the in-degree and out-degree of each node in the query tree. For example, each node that is simultaneously connected to a node with a larger out-degree and a node with a larger in-degree is determined as a node with a divergence situation.
[0082] Then, the server 120 determines a convergence rule based on the nodes with divergence situations and the query paths in the query tree. In specific implementation, the server 120 identifies the types of the nodes with divergence situations. For example, based on the content of the nodes with divergence situations, and further, the content of the nodes connected to the nodes with divergence situations can also be considered to determine the types of the nodes. The nodes with divergence situations in the query paths are uniformly replaced, for example, replaced with the types of the nodes, so as to achieve convergence and obtain the convergence rule.
[0083] For example, assume there are multiple query paths:
[0084] / alertapi / console / v1 / 10001 / json
[0085] / alertapi / console / v1 / 10002 / json
[0086] / alertapi / console / v1 / 10003 / json ......
[0088] / alertapi / console / v1 / 15000 / json
[0089] The nodes after v1 in these query paths: 10001, ……, 15000 are nodes with divergence situations, and these nodes can be replaced by *, so the convergence rule is / alertapi / console / v1 / * / json.
[0090] For example, assume the URL contains a variable UserID and there are multiple query paths:
[0091] “ / v2 / users / 0001 / roles”, code = “200”
[0092] “ / v2 / users / 0002 / roles”, code = “200” ......
[0094] “ / v2 / users / 0006 / roles”, code = “200”
[0095] The nodes after "users" in these query paths: 0001, ……, 0006 are nodes with divergence situations. The type of the nodes is UserID, and these nodes can be replaced by UserID. The convergence rule is " / v2 / users / " " / v2 / users / UserID / roles", code = “200”.
[0096] Step 203: The server 120 sends the convergence rule to the client 110.
[0097] In specific implementation, the server 120 can send the convergence rule of the URL to the client 110 through the network.
[0098] Step 204: The client 110 performs URL convergence according to the convergence rule.
[0099] In specific implementation, for the URL, the client 110 matches the URL with the convergence rule. If the match is successful, it converges according to the convergence rule, so as to converge multiple URLs into one URL, reducing the occupation of storage resources.
[0100] In some possible situations, the convergence rule can include a convergence threshold. Then, when the number of URLs matching the convergence rule reaches the convergence threshold, the client 110 can converge several URLs matching the convergence rule into one URL, such as converging into a regular expression value.
[0101] Among them, the convergence threshold can be a value set by the server 120 by default, or determined by the server 120 according to the number of URLs with divergence situations within a time period.
[0102] Exemplarily, for each convergence rule, the server 120 determines the number of URLs within a preset time period corresponding to the convergence rule; wherein, the URLs corresponding to the convergence rule indicate that the URLs can be converged by the convergence rule; the number of URLs within the preset time period corresponding to the convergence rule indicates the number of URLs converged by the convergence rule within the preset time period; according to the number of URLs within the preset time period corresponding to the convergence rule, a convergence threshold is determined; for example, the number of URLs within the preset time period corresponding to the convergence rule is used as the convergence threshold, or for another example, the number of URLs within the preset time period corresponding to the convergence rule is weighted as the convergence threshold, and the weighted value can be any value between 0 and 1, and can be specifically set in combination with the actual situation. Among them, the duration of the preset time period can be set in combination with the actual situation, and it cannot be too large or too small, and the memory occupation should be reduced as much as possible; exemplarily, the preset time period can be the time period from a certain moment to the current moment. In some possible scenarios, there can also be multiple preset time periods, and multiple preset time periods can partially overlap, and the durations of multiple preset time periods can be the same or different, and can be specifically set in combination with the actual situation; subsequently, based on the change in the number of URLs corresponding to the convergence rule in different time periods, a convergence threshold with greater reference value is obtained. For example, the number of URLs corresponding to the convergence rule within multiple preset time periods can be fused as the convergence threshold, and the fusion method can be averaging, or can be weighted after averaging.
[0103] In this solution, URLs with divergent situations can be learned in real time to generate convergence rules for URLs; on the other hand, identifying divergent URLs on the server to generate convergence rules for URLs can reduce the resource consumption of the client.
[0104] Figure 3 The flowchart of another method for URL convergence provided by an embodiment of the present application is shown.
[0105] As Figure 3 shown, based on the steps 201 to 204 shown in Figure 2 , in the embodiment of the present application, at least the following steps are further included:
[0106] Step 205: The client 110 reports usage information to the server 120, and the usage information indicates the convergence rule used.
[0107] In specific implementation, after using the convergence rule, the client 110 can immediately report the used convergence rule to the server 120, so as to facilitate the server 120 to perform statistical analysis of the convergence rule.
[0108] Step 206: The server 120 determines the usage frequency of the convergence rule.
[0109] Among them, the usage frequency can be understood as the number of times of usage within a time period. Here, the time period can be the time period between a certain moment and the current moment, and the duration of this time period is generally set in advance. In specific implementation, the server 120 counts the number of times of usage of the convergence rule within the time period based on the usage information reported by the client 110, and obtains the usage frequency based on the ratio of the number of times of usage to the duration of this time period.
[0110] Step 207: The server 120 sends determination control information to the client 110. When the usage frequency of the target convergence rule is less than or equal to a preset threshold, the control information indicates to stop the usage of the target convergence rule.
[0111] When the server 120 determines that the usage frequency of the convergence rule is less than or equal to the preset threshold, it indicates that the convergence rule is rarely used or hardly used. At this time, the server 120 can control the client 110 to stop using the convergence rule to remove useless information.
[0112] Step 208: The client 110 stops using the target convergence rule.
[0113] In this solution, through the automatic management of the convergence rule using the usage frequency, useless convergence rules can be removed in a timely manner, and the dynamic changes of the URL can be flexibly adapted.
[0114] Furthermore, the server 120 can manage the convergence rule, and the management methods include starting, stopping, adding or modifying. Among them, the server 120 can provide an interface for managing the convergence rule. For example, this interface can display each convergence rule and the management button for each convergence rule (which can include start / stop buttons, modify buttons, add buttons), and the user can manage the convergence rule through the management button. Subsequently, the server 120 can manage the convergence rule based on the user's operation on the interface; if the operation indicates start, the server 120 will send the started convergence rule to the client; if the operation indicates stop, the server 120 will send the command to stop using the convergence rule to the client 110, and the client 110 will stop using the convergence rule; if the operation indicates modification, the server 120 will modify the convergence rule and send the modified convergence rule to the client 110, and the client 110 will update the convergence rule and continue to use it. If the operation indicates addition, the server 120 will add a convergence rule and send the added convergence rule to the client 110.
[0115] Based on the same concept as the method embodiments of this application, the embodiments of this application also provide a URL convergence device. The URL convergence device includes several modules, and each module is used to execute each step in the URL convergence method provided by the embodiments of this application. There is no limitation on the division of modules here. Those skilled in the art can clearly understand that in practical applications, each step in the URL convergence method provided by the embodiments of this application can be allocated to different modules according to needs, that is, the internal structure of the device is divided into different modules to complete all or part of the functions described above. Each module in the embodiment can be integrated in a processing unit, or each unit can exist physically alone, or two or more modules can be integrated in one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit. In addition, the specific names of each module are only for the convenience of mutual distinction and do not limit the protection scope of this application. The specific working process of the modules in the above device can refer to the corresponding process in the foregoing method embodiments and will not be elaborated here.
[0116] Exemplarily, the URL convergence device is used to execute the URL convergence provided by the embodiments of this application, Figure 4 which is a schematic structural diagram of the URL convergence device provided by the embodiments of this application. As Figure 4 shown, the server 120 provided by the embodiments of this application includes:
[0117] A receiving module 410, which is used to receive a Uniform Resource Locator (URL) sent by the client 110; the URL includes parameters, and the parameters are used to locate the resource to be accessed;
[0118] An identification module 420, which is used to identify the URLs with divergence in the URL and determine the convergence rules for the URLs with divergence; the divergence situation is that the state of the parameter is variable;
[0119] A management module 430, which is used to send the convergence rules to the client 110 so that the client performs URL convergence according to the convergence rules.
[0120] In a possible implementation manner, as Figure 5 shown, the identification module 420 includes a learning unit 421 and a rule generation unit 422; wherein,
[0121] The learning unit 421 is used to establish a query tree with the parameters in the URL as nodes; the query tree includes query paths, and the query paths are formed by sequentially connecting the nodes and are used to represent the URL; based on the in-degree and out-degree of each node in the query tree, the nodes with divergence are determined.
[0122] The rule generation unit 422 is configured to determine a convergence rule based on the nodes and query paths with divergence situations in the query tree.
[0123] In some possible implementation manners, such as Figure 5 described, the recognition module 420 is configured to store the convergence rule into the database.
[0124] In some possible implementation manners, such as Figure 5 shown, the management module 430 provides an interface such as a web page, where users can view the convergence rule and manage the convergence rule. The management module 430 manages the convergence rule based on operations on the interface, such as start, stop, add, modify. Correspondingly, the usage status of the convergence rule is stored in the database. Wherein, the usage status indicates whether the convergence rule is started or stopped from being used.
[0125] Among them, the receiving module 410, the recognition module 420, and the management module 430 can all be implemented by software or can be implemented by hardware. Exemplarily, next, taking the receiving module 410 as an example, the implementation manner of the receiving module 410 will be introduced. Similarly, the implementation manners of the recognition module 420 and the management module 430 can refer to the implementation manner of the receiving module 410.
[0126] As an example of a software functional unit, the receiving module 410 may include code running on a computing instance. Wherein, the computing instance may include at least one of a physical host (computing device), a virtual machine, and a container. Further, the above computing instance may be one or more. For example, the receiving module 410 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers for running this code may be distributed in the same region, or may be distributed in different regions. Further, the multiple hosts / virtual machines / containers for running this code may be distributed in the same availability zone (AZ), or may be distributed in different AZs. Each AZ includes one data center or multiple geographically proximate data centers. Wherein, generally one region may include multiple AZs.
[0127] Similarly, the multiple hosts / virtual machines / containers for running this code may be distributed in the same virtual private cloud (VPC), or may be distributed in multiple VPCs. Wherein, generally one VPC is set within one region. For cross-region communication between two VPCs within the same region and between VPCs in different regions, a communication gateway needs to be set in each VPC, and the interconnection between VPCs is realized through the communication gateway.
[0128] As an example of a hardware functional unit, the receiving module 410 may include at least one computing device, such as a server or the like. Alternatively, the receiving module 410 may also be a device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). Among them, the above PLD may be implemented by a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0129] The multiple computing devices included in the receiving module 410 may be distributed in the same region or in different regions. The multiple computing devices included in the receiving module 410 may be distributed in the same availability zone (AZ) or in different AZs. Similarly, the multiple computing devices included in the receiving module 410 may be distributed in the same virtual private cloud (VPC) or in multiple VPCs. Among them, the multiple computing devices may be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.
[0130] It should be noted that in other embodiments, the receiving module 410 may be used to execute any step in the method of URL convergence, the identification module 420 may be used to execute any step in the method of URL convergence, and the management module 430 may be used to execute any step in the method of URL convergence. The steps implemented by the receiving module 410, the identification module 420, and the management module 430 can be specified as needed. The entire function of the URL convergence device is realized by respectively implementing different steps in the method of URL convergence through the receiving module 410, the identification module 420, and the management module 430.
[0131] This application also provides a computing device 600. As Figure 6 shown, the computing device 600 includes: a bus 602, a processor 604, a memory 606, and a communication interface 608. The processor 604, the memory 606, and the communication interface 608 communicate with each other through the bus 602. The computing device 600 may be a server or a terminal device. It should be understood that this application does not limit the number of processors and memories in the computing device 600.
[0132] The bus 602 can be a peripheral component interconnect (PCI) bus, an extended industry standard architecture (EISA) bus, or the like. The bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of convenience of representation, Figure 6 only one line is used to represent it in Figure 6 , but it does not mean that there is only one bus or one type of bus. The bus 602 can include a path for transmitting information between various components of the computing device 600 (for example, the memory 606, the processor 604, and the communication interface 608).
[0133] The processor 604 can include any one or more of processors such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).
[0134] The memory 606 can include volatile memory, such as random access memory (RAM). The processor 604 can also include non-volatile memory, such as read-only memory (ROM), flash memory, a hard disk drive (HDD), or a solid state drive (SSD).
[0135] The memory 606 stores executable program code, and the processor 604 executes the executable program code to respectively implement the functions of the foregoing receiving module 410, identifying module 420, and management module 430, thereby implementing the method for URL convergence. That is, the memory 606 stores instructions for executing the method for URL convergence.
[0136] The communication interface 608 uses a transceiver module such as, but not limited to, a network interface card or a transceiver to implement communication between the computing device 600 and other devices or a communication network.
[0137] The embodiments of the present application also provide a computing device cluster. The computing device cluster includes at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smart phone.
[0138] As Figure 7 shown, the computing device cluster includes at least one computing device 600. Instructions for executing the method of URL convergence can be stored in the same manner in the memories 606 of one or more of the computing devices 600 in the computing device cluster.
[0139] In some possible implementation manners, partial instructions for executing the method of URL convergence can also be stored separately in the memories 606 of one or more of the computing devices 600 in the computing device cluster. In other words, a combination of one or more computing devices 600 can jointly execute the instructions for executing the method of URL convergence.
[0140] It should be noted that different memories 606 in different computing devices 600 in the computing device cluster can store different instructions, which are respectively used to execute partial functions of the apparatus for URL convergence. That is, the instructions stored in the memories 606 of different computing devices 600 can implement the functions of one or more of the receiving module 410, the identifying module 420, and the management module 430.
[0141] In some possible implementation manners, one or more computing devices in the computing device cluster can be connected through a network. Among them, the network can be a wide area network or a local area network, etc. Figure 8 shows a possible implementation manner. As Figure 8 shown, two computing devices 600A and 600B are connected through a network. Specifically, they are connected to the network through the communication interfaces in each computing device. In this type of possible implementation manner, instructions for implementing the functions of the receiving module 410 and the identifying module 420 are stored in the memory 606 of the computing device 600A. At the same time, instructions for implementing the function of the management module 430 are stored in the memory 606 of the computing device 600B.
[0142] Figure 8 The connection manner between the computing device clusters shown can be considered because the method of URL convergence provided in the present application needs to receive, store, and process a large number of URLs; in order to improve the processing efficiency, it is therefore considered to hand over the functions implemented by the receiving module 410 and the identifying module 420 to the computing device 600A for execution.
[0143] It should be understood that Figure 8The functions of the computing device 600A shown can also be completed by multiple computing devices 600. Similarly, the functions of the computing device 600B can also be completed by multiple computing devices 600.
[0144] Embodiments of the present application also provide a computer program product containing instructions. The computer program product can be software or a program product containing instructions that can run on a computing device or be stored in any available medium. When the computer program product runs on at least one computing device, it causes at least one computing device to execute the method of URL convergence.
[0145] Embodiments of the present application also provide a computer-readable storage medium. The computer-readable storage medium can be any available medium that a computing device can store or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive), etc. The computer-readable storage medium includes instructions that direct the computing device to execute the method of URL convergence.
[0146] In the above embodiments, the descriptions of the various embodiments each have their own emphasis. For parts not detailed or recorded in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0147] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution. The order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
[0148] The basic principles of the present application have been described above in conjunction with specific embodiments. However, it should be noted that the advantages, benefits, effects, etc. mentioned in the present application are only examples and not limitations. It cannot be considered that these advantages, benefits, effects, etc. are essential for each embodiment of the present disclosure. Additionally, the specific details disclosed above are only for the purposes of illustration and facilitation of understanding, and not for limitation. The above details do not limit the present disclosure to necessarily implement using the above specific details.
[0149] The block diagrams of the devices, apparatuses, equipment, and systems involved in this disclosure are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including", "comprising", "having", etc. are open-ended terms, meaning "including but not limited to", and can be used interchangeably with each other. The word "or" and "and" used herein refer to the phrase "and / or", and can be used interchangeably with it, unless the context clearly indicates otherwise. The word "such as" used herein refers to the phrase "such as but not limited to", and can be used interchangeably with it.
[0150] It should also be noted that in the devices, equipment, and methods of this disclosure, each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent solutions of this disclosure.
[0151] The above description has been given for purposes of illustration and description. In addition, this description is not intended to limit the embodiments of this disclosure to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions, and sub-combinations thereof.
[0152] It can be understood that the various numerical numbers involved in the embodiments of this application are only for the convenience of description and are not used to limit the scope of the embodiments of this application.
Claims
1. A method for URL convergence, characterized in that, Applied to the server side, the method includes: Receiving a Uniform Resource Locator (URL) sent by a client; the URL includes parameters for locating the resource to be accessed; Identifying the URLs in the URL that have a divergence situation, and determining the convergence rules for the URLs with a divergence situation; the divergence situation is that the status of the parameter is variable; Sending the convergence rules to the client so that the client converges the URL according to the convergence rules.
2. The method according to claim 1, characterized in that, The convergence rules include the regular expression of the URL, and the regular expression includes the replacement value of the parameter with a divergence situation in the URL.
3. The method according to claim 2, characterized in that, The replacement value of the parameter is determined by the type of the parameter.
4. The method according to claim 2 or 3, characterized in that, The identifying the URLs in the URL that have a divergence situation and determining the convergence rules for the URLs with a divergence situation includes: Using the parameters in the URL as nodes to establish a query tree; the query tree includes a query path formed by sequentially connecting the nodes for representing the URL; Based on the in-degree and out-degree of each node in the query tree, determining the nodes with a divergence situation; Based on the nodes with a divergence situation and the query path in the query tree, determining the convergence rules.
5. The method according to any one of claims 1 to 4, characterized in that, The method further includes: Determining the usage frequency of the convergence rules by the client.
6. The method according to claim 5, characterized in that, The method further includes: When the usage frequency is less than or equal to a preset threshold, stopping the use of the convergence rules.
7. The method according to any one of claims 1 to 6, characterized in that, The method further includes: Managing the convergence rules, and the management includes starting, stopping or modifying.
8. A server, characterized in that, Including: A receiving module for receiving a Uniform Resource Locator (URL) sent by a client; An identifying module for identifying the URLs in the URL that have a divergence situation and determining the convergence rules for the URLs with a divergence situation; A management module for sending the convergence rules to the client so that the client converges according to the convergence rules.
9. A server, characterized in that, For executing the method according to any one of claims 1-7.
10. A computing device cluster, characterized in that, Including at least one computing device, each computing device including a processor and a memory; the processor of the at least one computing device is used to execute the instructions stored in the memory of the at least one computing device so that the computing device cluster executes the method according to any one of claims 1-7.
11. A computer storage medium, characterized in that, Instructions are stored in the computer storage medium, and when the instructions are run on a computer, the computer is made to execute the method according to any one of claims 1-7.
12. A computer program product containing instructions, characterized in that, When the instructions are run on a computer, the computer is made to execute the method according to any one of claims 1-7.