Webpage link resolution processing method and device, computer device, and storage medium

By adopting a layered design of process node layer and target route parsing layer, the problem of maintenance and expansion difficulties in existing web page link parsing processing methods is solved, and web page link parsing processing that is easy to maintain and expand is realized.

CN117056631BActive Publication Date: 2026-01-06CHINA PING AN LIFE INSURANCE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310835263.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-07
Publication Date
2026-01-06
Estimated Expiration
2043-07-07

AI Technical Summary

Technical Problem

Existing methods for parsing and processing web page links are difficult to maintain and extend, have too many branch codes, and are not conducive to later maintenance and expansion.

Method used

A layered design is adopted, consisting of a process node layer and a target route resolution layer. The process node layer receives the target webpage link, determines the target node from the original node sequence, and sends it to the target route resolution layer for processing when the resolution is successful. If the resolution fails, the target node is updated and the resolution is repeated.

Benefits of technology

This makes the webpage link parsing process easier to maintain and extend, reduces the complexity of branch code, and improves the system's flexibility and scalability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117056631B_ABST
    Figure CN117056631B_ABST
Patent Text Reader

Abstract

The application discloses a webpage link analysis processing method and device, computer equipment and a storage medium, and relates to the technical field of webpage link analysis processing. The method comprises the following steps: receiving a target webpage link, determining a target node from an original node sequence of a flow node layer; when the target node is not an end node, sending the target webpage link to a target routing analysis layer corresponding to the target node; analyzing the target webpage link to obtain a webpage analysis result; when the analysis is successful, sending the target webpage link to a target event distribution layer for processing, and displaying a target interface corresponding to the target webpage link; when the analysis fails, sending an analysis failure identifier to the flow node layer; after receiving the analysis failure identifier, the flow node layer updates the target node according to the original node sequence, and when the new target node is not an end node, repeatedly sends the target webpage link to the target routing analysis layer corresponding to the target node. The method classifies huge processing logic, which is convenient for later maintenance and expansion.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a method, apparatus, computer device, and storage medium for parsing and processing web page links. Background Technology

[0002] Currently, the most common approach to parsing webpage links is to directly parse the URL and use if-else and switch-case conditional statements to distribute different scenarios to different code segments for appropriate logic processing. This centralized approach places all cases in the same block. However, as business requirements change, the branching code for webpage links becomes increasingly numerous and complex. In collaborative scenarios, various exceptions inevitably arise, and the method becomes difficult to maintain and extend. Therefore, designing a webpage link parsing and processing method that is easily maintainable and extendable in the future is a pressing issue that needs to be addressed. Summary of the Invention

[0003] This invention provides a webpage link parsing and processing method, apparatus, computer device, and storage medium to solve the problems of maintenance and expansion difficulties in existing webpage link parsing and processing methods.

[0004] A method for parsing and processing web page links, comprising:

[0005] The process node layer receives the target webpage link and determines the target node from the original node sequence of the process node layer;

[0006] When the target node is not an end node, the process node layer sends the target webpage link to the target routing resolution layer corresponding to the target node;

[0007] The target routing resolution layer parses the target webpage link and obtains the webpage parsing result;

[0008] When the target routing parsing layer finds that the webpage parsing result is successful, it sends the target webpage link to the target event dispatching layer corresponding to the target routing parsing layer for processing and displays the target interface corresponding to the target webpage link.

[0009] When the target routing resolution layer finds that the webpage resolution result is a resolution failure, it sends a resolution failure flag to the process node layer.

[0010] After receiving the parsing failure flag, the process node layer updates the target node according to the original node sequence. If the new target node is not the end node, the process node layer repeats the step of sending the target webpage link to the target route parsing layer corresponding to the target node.

[0011] Preferably, after determining the target node from the original node sequence of the process node layer, the webpage link parsing processing method further includes:

[0012] When the target node is the end node, the process node layer displays a link recognition failure interface and sends the target webpage link to the system database.

[0013] Preferably, the target routing resolution layer includes the Version routing resolution layer corresponding to the Version node;

[0014] The target routing resolution layer parses the target webpage link and obtains the webpage resolution result, including:

[0015] The Version routing parsing layer parses the target webpage link and identifies the current Version in the target webpage link;

[0016] If the current Version is less than the preset Version, then obtain the parsed webpage result of the successfully parsed webpage;

[0017] If the current Version is not less than the preset Version, then obtain the parsing result of the webpage that failed to be parsed.

[0018] Preferably, the target routing resolution layer includes the RN routing resolution layer corresponding to the RN node;

[0019] The target routing resolution layer parses the target webpage link and obtains the webpage resolution result, including:

[0020] The RN routing resolution layer parses the target webpage link and identifies whether the target webpage link includes an RN identifier;

[0021] If the target webpage link includes an RN identifier, then obtain the parsed webpage result of a successful parsing.

[0022] If the target webpage link does not contain an RN identifier, then obtain the parsing result of the webpage that failed to be parsed.

[0023] Preferably, the target route resolution layer includes the Vue route resolution layer corresponding to the Vue node;

[0024] The target routing resolution layer parses the target webpage link and obtains the webpage resolution result, including:

[0025] The Vue routing parsing layer parses the target webpage link and identifies whether the target webpage link includes the Vue identifier;

[0026] If the target webpage link includes the Vue identifier, then obtain the parsed webpage result of a successful parsing.

[0027] If the target webpage link does not contain the Vue identifier, then obtain the parsing result of the webpage that failed to be parsed.

[0028] Preferably, the target route resolution layer includes the native route resolution layer corresponding to the native node;

[0029] The target routing resolution layer parses the target webpage link and obtains the webpage resolution result, including:

[0030] The native routing parsing layer parses the target webpage link and identifies whether the target webpage link includes the Native identifier;

[0031] If the target webpage link includes a Native identifier, then obtain the parsed webpage result of a successful parsing.

[0032] If the target webpage link does not include the Native identifier, then obtain the parsing result of the webpage that failed to be parsed.

[0033] Preferably, after receiving the parsing failure identifier, the process node layer updates the target node according to the original node sequence. If the new target node is not the end node, the step of sending the target webpage link to the target route parsing layer corresponding to the target node is repeated, including:

[0034] After receiving the parsing failure flag, the process node layer updates the next original node of the target node in the original node sequence to a new target node. If the new target node is not the end node, the process node layer repeats the step of sending the target webpage link to the target route parsing layer corresponding to the target node.

[0035] A webpage link parsing and processing device, comprising:

[0036] The target node determination module is used to receive the target webpage link at the process node layer and determine the target node from the original node sequence of the process node layer;

[0037] The target webpage link sending module is used by the process node layer to send the target webpage link to the target routing resolution layer corresponding to the target node when the target node is not an end node;

[0038] The webpage parsing result acquisition module is used by the target routing parsing layer to parse the target webpage link and obtain the webpage parsing result;

[0039] The target interface display module is used by the target routing parsing layer to send the target webpage link to the target event distribution layer corresponding to the target routing parsing layer for processing when the webpage parsing result is successful, and to display the target interface corresponding to the target webpage link.

[0040] The parsing failure flag sending module is used by the target routing parsing layer to send a parsing failure flag to the process node layer when the parsing result of the webpage is a parsing failure.

[0041] The target node update module is used to update the target node according to the original node sequence after the process node layer receives the parsing failure flag. If the new target node is not the end node, the process node update module repeats the step of sending the target webpage link to the target route parsing layer corresponding to the target node.

[0042] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described webpage link parsing processing method.

[0043] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described webpage link parsing and processing method.

[0044] The aforementioned webpage link parsing processing method, apparatus, computer equipment, and storage medium involve the target node in the process node layer receiving a target webpage link called by an external calling layer. If the target node is determined not to be an end node, the target webpage link is sent to the target routing parsing layer corresponding to the target node for parsing, obtaining the parsing result. If parsing is successful, the target webpage link is sent to the target event dispatch layer for processing, displaying the target interface corresponding to the target webpage link. If parsing fails, a parsing failure flag is sent to the process node layer. Upon receiving the parsing failure flag, the process node layer updates the target node according to the original node sequence. If the new target node is determined not to be an end node, the step of sending the target webpage link to the target routing parsing layer corresponding to the target node is repeated. This application implements the complex processing logic according to different categories, solving the problem of excessive branch code caused by the intensive processing code blocks in existing webpage link parsing processes, which is detrimental to later maintenance and expansion. Attached Figure Description

[0045] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0046] Figure 1 This is a schematic diagram of an application environment for a webpage link parsing and processing method according to an embodiment of the present invention.

[0047] Figure 2 This is a flowchart of a webpage link parsing and processing method according to an embodiment of the present invention;

[0048] Figure 3 This is another flowchart of a webpage link parsing and processing method in one embodiment of the present invention;

[0049] Figure 4 This is another flowchart of a webpage link parsing and processing method in one embodiment of the present invention;

[0050] Figure 5 This is another flowchart of a webpage link parsing and processing method in one embodiment of the present invention;

[0051] Figure 6 This is another flowchart of a webpage link parsing and processing method in one embodiment of the present invention;

[0052] Figure 7 This is a schematic diagram of a webpage link parsing and processing device according to an embodiment of the present invention;

[0053] Figure 8 This is a schematic diagram of a computer device according to an embodiment of the present invention. Detailed Implementation

[0054] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0055] The webpage link parsing processing method provided in this embodiment of the invention can be applied to, for example... Figure 1 The application environment shown. Specifically, this webpage link parsing and processing method is applied in a webpage link parsing and processing system, which includes, as shown in the example, [example of such system]. Figure 1The diagram illustrates a client and server. The client and server communicate over a network to parse and process web page links, addressing the difficulties in maintaining and expanding existing web page link parsing and processing methods. The client, also known as the user terminal, is the program that provides local services to the client, corresponding to the server. The client can be installed on, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. The server can be a standalone server or a server cluster consisting of multiple servers.

[0056] In one embodiment, such as Figure 2 As shown, a method for parsing and processing web page links is provided. Taking the application of this method in a server as an example, the method includes the following steps:

[0057] S1: The process node layer receives the target webpage link and determines the target node from the original node sequence of the process node layer;

[0058] S2: When the target node is not the end node, the process node layer sends the target webpage link to the target route resolution layer corresponding to the target node;

[0059] S3: The target routing resolution layer parses the target webpage link and obtains the webpage parsing result;

[0060] S4: When the target routing parsing layer finds that the webpage parsing result is successful, it sends the target webpage link to the target event dispatching layer corresponding to the target routing parsing layer for processing and displays the target interface corresponding to the target webpage link.

[0061] S5: When the target route parsing layer finds that the parsing result of the webpage has failed, it sends a parsing failure flag to the process node layer.

[0062] S6: After receiving the parsing failure flag, the process node layer updates the target node according to the original node sequence. If the new target node is not the end node, the process node layer repeats the process of sending the target webpage link to the target route parsing layer corresponding to the target node.

[0063] In this system, the process node layer refers to the processor that receives web page links input from the external calling layer and forwards them to a specific routing resolution layer. This process node layer contains different raw nodes categorized by type. The target web page link is the web page link that needs to be parsed and displayed. Raw nodes are nodes of a specific type that have already been created in the process node layer. A raw node sequence is a sequence of multiple raw nodes set in a preset order. The target node is the raw node currently processing the target web page link.

[0064] As an example, in step S1, the process node layer receives the target webpage link input by the external calling layer of the webpage parsing and processing system. The process node layer includes multiple raw nodes arranged in a preset order, i.e., a sequence of raw nodes. The external calling layer calls the raw nodes of the process node layer through a head pointer (head) and a tail pointer (tail), where the head pointer points to the first raw node and the tail pointer points to the last raw node. After receiving the target webpage link, the external calling layer inputs the target webpage link into the first raw node of the process node layer and designates the first raw node as the target node.

[0065] In this context, the end node refers to the last original node in the original node sequence within the process node layer. This original node handles webpage links that none of the preceding original nodes could process. The target route resolution layer is the processing layer corresponding to the target node, used to parse the target webpage links. The resolution module is the module located in the target route resolution layer that parses the target webpage links.

[0066] As an example, in step S2, after determining the target node, the server checks whether it is an end node. If the target node is not an end node, the target webpage link is sent to the target routing resolution layer corresponding to the target node. The target routing resolution layer judges and parses the target webpage link according to preset rules. The target node in the process node layer contains a router object and a next pointer. The router object corresponds to a parsing module in the target routing resolution layer, and the next pointer points to the next original node corresponding to the target node in the original node sequence. After receiving the target webpage link, the target node, according to its maintained router object, inputs the target webpage link into the parsing module located in the target resolution layer for processing.

[0067] As an example, in step S3, after receiving the target webpage link, the specific type of parsing module of the target routing parsing layer parses the target webpage link according to preset rules, determines whether the target webpage link can be processed in the parsing module, and if it is determined that it can be processed, it sends the parsing result of the successfully parsed webpage to the target node, such as sending true to the target node; if it is determined that it cannot be processed, it sends the parsing result of the unparsed webpage to the target node, such as sending false to the target node.

[0068] The target event dispatch layer refers to the processing layer that displays the successfully parsed target webpage link on the interface. The event dispatch module is the module located in the target event dispatch layer that performs the dispatch processing of the target webpage. The target interface refers to the interface that the target webpage link ultimately needs to be displayed on.

[0069] As an example, in step S4, each parsing module in the target route parsing layer corresponds to an event dispatching module in the target event dispatching layer. This module handles the implementation of successfully parsed target webpage links sent by the parsing module, displaying the final interface required by the target webpage link. When the target route parsing layer successfully parses a target webpage link, it sends the link to the corresponding event dispatching module for processing. For instance, if the target webpage link is successfully parsed in the Native parsing module corresponding to the Native target node, the parsed parameters and fields are sent to the Native event dispatching module for implementation. If the parameter `pageld` is parsed, the Native event dispatching module can recognize `pageld` and complete the creation and redirection of the interface corresponding to `pageld`.

[0070] As an example, in step S5, when the target routing resolution layer fails to resolve the target webpage link, it outputs a flag indicating that the webpage link resolution failed and sends the flag to the target node in the process node layer.

[0071] As an example, in step S6, after receiving the flag indicating that the webpage link parsing failed, the target node in the process node layer sends the target webpage link to the next original node corresponding to the target node through the next pointer, and updates the original node to the target node, repeating the process of sending the target webpage link to the target routing parsing layer corresponding to the target node.

[0072] In this embodiment, the target node in the process node layer receives the target webpage link called by the external calling layer. If it determines that the target node is not an end node, it sends the target webpage link to the target routing parsing layer corresponding to the target node for parsing, obtaining the parsing result. If parsing is successful, the target webpage link is sent to the target event dispatch layer for processing, displaying the target interface corresponding to the target webpage link. If parsing fails, a parsing failure flag is sent to the process node layer. Upon receiving the parsing failure flag, the process node layer updates the target node according to the original node sequence. If it determines that the new target node is not an end node, it repeats the step of sending the target webpage link to the target routing parsing layer corresponding to the target node. This application implements the massive processing logic according to different categories, solving the problem of excessive branch code caused by the intensive processing code blocks in the existing webpage link parsing process, which is not conducive to later maintenance and expansion.

[0073] In one embodiment, after determining the target node from the original node sequence of the process node layer in step S1, the method further includes:

[0074] When the target node is the end node, the process node layer displays a link recognition failure interface and sends the target webpage link to the system database.

[0075] As an example, after the server identifies the target node, the target webpage link is entered into the target node, and it needs to determine whether the target node is an end node. If the target node is determined to be an end node, a preset webpage link recognition failure interface is directly displayed to inform the user that the target webpage link cannot be recognized, such as displaying a 404 page. At the same time, the target webpage link is sent to a pre-set system database for problem analysis.

[0076] In this embodiment, after identifying the target node, the server determines that the target node is an end node. If so, it directly displays a preset interface indicating that the webpage link identification failed and stores the target webpage link. This end node can handle target webpage links that other nodes in the process node layer cannot process, ensuring that all target webpage links input into the webpage link parsing and processing system can be processed.

[0077] In one embodiment, the target routing resolution layer includes the Version routing resolution layer corresponding to the Version node; such as Figure 3 As shown, in step S3, the target routing resolution layer parses the target webpage link and obtains the webpage parsing result, including:

[0078] S331: The Version routing resolution layer parses the target webpage link and identifies the current Version in the target webpage link;

[0079] S332: If the current Version is less than the preset Version, then obtain the parsing result of the successfully parsed webpage;

[0080] S333: If the current Version is not less than the preset Version, then obtain the parsing result of the webpage that failed to be parsed.

[0081] Here, "current Version" refers to the Version (version number) of the target webpage link; "preset Version" refers to a pre-set Version threshold.

[0082] As an example, in step S331, after receiving the target webpage link, the Version parsing module of the target routing parsing layer parses the target webpage link according to preset rules, identifies the Version in the target webpage link, and determines it as the current Version.

[0083] As an example, in step S332, when the target routing resolution layer detects that the current Version in the target webpage link is less than the preset Version, it determines that the target webpage link meets the execution conditions of the Version resolution module corresponding to the target node, that is, the target webpage link needs to be upgraded. Therefore, it sends the successfully resolved webpage resolution result to the target node. For example, if the current Version in the target webpage link is detected to be less than 1, it means that the target webpage link needs to be upgraded, so it sends "true" to the target node and simultaneously inputs the target webpage link into the Version event dispatch module corresponding to the Version resolution module for further version upgrade functionality.

[0084] As an example, in step S333, when the target routing resolution layer detects that the current Version in the target webpage link is not less than the preset Version, it determines that the target webpage link does not meet the execution conditions of the Version resolution module corresponding to the target node. Therefore, it sends the webpage resolution result of the failed resolution to the target node. For example, if the current Version in the target webpage link is detected to be greater than or equal to 1, it means that the target webpage link does not need to be upgraded. False is sent to the target node so that the target node can be updated and the execution conditions of the updated target node can be re-evaluated.

[0085] In this embodiment, a Version node is set to determine whether the target webpage link meets the execution conditions of the Version parsing module corresponding to the target node, i.e., whether it meets the conditions for needing a version upgrade. If the conditions for needing a version upgrade are met, the target webpage link is upgraded according to preset rules; if the conditions for needing a version upgrade are not met, the target node is updated, and the target webpage link is re-evaluated.

[0086] In one embodiment, the target routing resolution layer includes the RN routing resolution layer corresponding to the RN node; such as Figure 4 As shown, in step S3, the target routing resolution layer parses the target webpage link and obtains the webpage parsing result, including:

[0087] S431: The RN routing resolution layer parses the target webpage link and identifies whether the target webpage link includes the RN identifier;

[0088] S432: If the target webpage link includes the RN identifier, then obtain the parsing result of the successfully parsed webpage;

[0089] S433: If the target webpage link does not contain the RN identifier, then obtain the parsing result of the webpage that failed to be parsed.

[0090] RN stands for React-Native, a hybrid development technology used to redirect links from target web pages to corresponding preset pages in RN.

[0091] As an example, in S431, after receiving the target webpage link, the RN parsing module of the target routing parsing layer parses the target webpage link according to preset rules and identifies whether the target webpage link includes an RN identifier.

[0092] As an example, in step S432, when the target routing resolution layer detects that the target webpage link includes the RN identifier, it determines that the target webpage link meets the execution conditions of the RN resolution module corresponding to the target node, that is, the target webpage link needs to perform an RN page redirect. Therefore, it sends the successfully resolved webpage resolution result to the target node. For example, if the target webpage link is detected to include the "RN: / / " identifier, it means that the target webpage link needs to perform a page redirect, so it sends true to the target node and simultaneously inputs the target webpage link into the RN event dispatch module corresponding to the RN resolution module to further execute the page redirection function.

[0093] As an example, in S433, when the target routing resolution layer detects that the target webpage link does not include the RN identifier, it determines that the target webpage link does not meet the execution conditions of the RN resolution module corresponding to the target node. That is, the target webpage link does not need to perform an RN page redirect. Therefore, it sends the webpage resolution result of the failed resolution to the target node. For example, if the target webpage link is found to not include the "RN: / / " identifier, it means that the target webpage link does not need to perform a page redirect. It sends false to the target node so that the target node can be updated and re-evaluated to see if the target webpage link meets the updated execution conditions of the target node.

[0094] In this embodiment, an RN node is set to determine whether the target webpage link meets the execution conditions of the RN parsing module corresponding to the target node, that is, whether it meets the conditions for requiring an RN page redirect. If the conditions for requiring an RN page redirect are met, the target webpage link is redirected according to preset rules; if the conditions for requiring an RN page redirect are not met, the target node is updated, and the target webpage link is re-evaluated.

[0095] In one embodiment, the target route resolution layer includes the Vue route resolution layer corresponding to the Vue node; such as Figure 5 As shown, in step S3, the target routing resolution layer parses the target webpage link and obtains the webpage parsing result, including:

[0096] S531: The Vue routing parsing layer parses the target webpage link and identifies whether the target webpage link includes the Vue identifier;

[0097] S532: If the target webpage link includes the Vue identifier, then obtain the parsing result of the successfully parsed webpage;

[0098] S533: If the target webpage link does not contain the Vue tag, then obtain the parsing result of the webpage that failed to be parsed.

[0099] Vue is another hybrid development technology used to redirect links from target web pages to predefined Vue pages.

[0100] As an example, in S531, after receiving the target webpage link, the Vue parsing module of the target route parsing layer parses the target webpage link according to preset rules and identifies whether the target webpage link includes the Vue identifier.

[0101] As an example, in S532, when the target routing resolution layer detects that the target webpage link includes the Vue identifier, it determines that the target webpage link meets the execution conditions of the Vue resolution module corresponding to the target node, that is, the target webpage link needs to perform a Vue page redirect. Therefore, it sends the successfully resolved webpage resolution result to the target node. For example, if the target webpage link is detected to include the "Vue: / / " identifier, it means that the target webpage link needs to perform a page redirect, so it sends true to the target node, and at the same time inputs the target webpage link into the Vue event dispatch module corresponding to the Vue resolution module to further execute the page redirection function.

[0102] As an example, in S533, when the target route resolution layer detects that the target webpage link does not include the Vue identifier, it determines that the target webpage link does not meet the execution conditions of the Vue resolution module corresponding to the target node. That is, the target webpage link does not need to perform a Vue page redirect. Therefore, it sends the webpage resolution result of the failed resolution to the target node. For example, if it detects that the target webpage link does not include the "Vue: / / " identifier, it means that the target webpage link does not need to perform a page redirect. It sends false to the target node so that the target node can be updated and re-evaluated to see if the target webpage link meets the execution conditions of the updated target node.

[0103] In this embodiment, a Vue node is set to determine whether the target webpage link meets the execution conditions of the Vue parsing module corresponding to the target node, that is, whether the conditions for Vue page redirection are met. If the conditions for Vue page redirection are met, the target webpage link is redirected according to preset rules; if the conditions for Vue page redirection are not met, the target node is updated and the target webpage link is re-evaluated.

[0104] In one embodiment, the target route resolution layer includes the native route resolution layer corresponding to the native node; such as Figure 6As shown, in step S3, the target routing resolution layer parses the target webpage link and obtains the webpage parsing result, including:

[0105] S631: The Native routing resolution layer parses the target webpage link and identifies whether the target webpage link includes the Native identifier;

[0106] S632: If the target webpage link includes the Native identifier, then obtain the parsing result of the successfully parsed webpage;

[0107] S633: If the target webpage link does not include the Native tag, then obtain the parsing result of the webpage that failed to be parsed.

[0108] Here, "Native" refers to the interface developed using native language. In this solution, each Native page file defines a `pageld` parameter. The Native parsing module determines the specific value of the `pageld` parameter and uses this value to match the corresponding page, creating the page using the simple factory pattern.

[0109] As an example, in S631, after receiving the target webpage link, the Native parsing module of the target routing parsing layer parses the target webpage link according to preset rules and identifies whether the target webpage link includes a Native identifier.

[0110] As an example, in S632, when the target routing resolution layer detects that the target webpage link includes the Native identifier, it determines that the target webpage link meets the execution conditions of the Native resolution module corresponding to the target node. That is, the target webpage link needs to perform page creation corresponding to the pageld parameter in Native. Therefore, it sends the successfully resolved webpage resolution result to the target node. For example, if the target webpage link is detected to include the "Native: / / " identifier, it means that the target webpage needs to perform page creation corresponding to the pageld parameter in Native. It sends true to the target node and simultaneously inputs the target webpage link into the Native event dispatch module corresponding to the Native resolution module to further execute the page creation function corresponding to the pageld parameter in Native.

[0111] As an example, in S633, when the target routing resolution layer detects that the target webpage link does not include the Native identifier, it determines that the target webpage link does not meet the execution conditions of the Native resolution module corresponding to the target node. That is, the target webpage link does not need to create the page corresponding to the pageld parameter in Native. Therefore, it sends the webpage resolution result of the failed resolution to the target node. For example, if it detects that the target webpage link does not include the "Native: / / " identifier, it means that the target webpage link does not need to create the page corresponding to the pageld parameter in Native. It sends false to the target node so that the target node can be updated and re-evaluated to see if the target webpage link meets the execution conditions of the updated target node.

[0112] In this embodiment, a Native node is set to determine whether the target webpage link meets the execution conditions of the Native parsing module corresponding to the target node, that is, whether it meets the conditions for creating the page corresponding to the pageld parameter in Native. If the conditions for creating the page corresponding to the page parameter in Native are met, the page is created for the target webpage link according to preset rules; if the conditions for creating the page corresponding to the page parameter in Native are not met, the target node is updated and the target webpage link is re-evaluated.

[0113] In one embodiment, step S6, after receiving the parsing failure flag, the process node layer updates the target node according to the original node sequence. If the new target node is not the end node, the process of sending the target webpage link to the target route parsing layer corresponding to the target node is repeated, including:

[0114] After receiving a resolution failure flag, the process node layer updates the next original node of the target node in the original node sequence to a new target node. If the new target node is not the end node, the process repeats the process of sending the target webpage link to the target route resolution layer corresponding to the target node.

[0115] As an example, after receiving a flag indicating that the webpage link parsing failed, the target node in the process node layer sends the target webpage link to the next original node corresponding to the target node through the next pointer, updates the original node to the target node, and then determines whether the updated target node is the end node. If it is determined that the updated node is not the end node, the above process of sending the target webpage link to the target routing parsing layer corresponding to the target node is repeated. The target routing parsing layer determines the parsing result of the target webpage link and performs corresponding processing based on the parsing result of the target webpage link.

[0116] In this embodiment, when the current target webpage link does not meet the execution conditions of the target node, the next original node corresponding to the target node is updated to the target node, and the target webpage link is parsed and judged again to ensure that the target webpage link is executed according to the preset node order.

[0117] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0118] In one embodiment, a webpage link parsing and processing apparatus is provided, which corresponds one-to-one with the webpage link parsing and processing methods described in the above embodiments. For example... Figure 7 As shown, the webpage link parsing processing device includes a target node determination module 701, a target webpage link sending module 702, a webpage parsing result acquisition module 703, a target interface display module 704, a parsing failure flag sending module 705, and a target node update module 706. Detailed descriptions of each functional module are as follows:

[0119] The target node determination module 701 is used to receive the target webpage link at the process node layer and determine the target node from the original node sequence of the process node layer;

[0120] The target webpage link sending module 702 is used by the process node layer to send the target webpage link to the target routing resolution layer corresponding to the target node when the target node is not the end node.

[0121] The webpage parsing result acquisition module 703 is used by the target routing parsing layer to parse the target webpage link and obtain the webpage parsing result;

[0122] The target interface display module 704 is used by the target routing parsing layer to send the target webpage link to the target event dispatching layer corresponding to the target routing parsing layer for processing when the webpage parsing result is successful, and to display the target interface corresponding to the target webpage link.

[0123] The parsing failure flag sending module 705 is used by the target route parsing layer to send a parsing failure flag to the process node layer when the parsing result of the webpage is a parsing failure.

[0124] The target node update module 706 is used to update the target node according to the original node sequence after the process node layer receives the parsing failure flag. If the new target node is not the end node, the process of sending the target webpage link to the target route parsing layer corresponding to the target node is repeated.

[0125] In one embodiment, the webpage parsing result acquisition module 703 includes:

[0126] The target webpage link parsing unit is used by the Version routing parsing layer to parse the target webpage link and identify the current Version in the target webpage link;

[0127] The successful webpage parsing result acquisition unit is used to acquire the successful webpage parsing result if the current Version is less than the preset Version.

[0128] The unit for obtaining the parsing result of a webpage that failed to be parsed is used to obtain the parsing result of a webpage that failed to be parsed if the current Version is not less than the preset Version.

[0129] In one embodiment, the webpage parsing result acquisition module 703 includes:

[0130] The target webpage link parsing unit is used by the RN routing parsing layer to parse target webpage links and identify whether the target webpage link includes the RN identifier;

[0131] The successful webpage parsing result acquisition unit is used to acquire the successful webpage parsing result if the target webpage link includes the RN identifier;

[0132] The unit for obtaining the parsing result of a webpage that failed to be parsed is used to obtain the parsing result of a webpage that failed to be parsed if the target webpage link does not contain the RN identifier.

[0133] In one embodiment, the webpage parsing result acquisition module 703 includes:

[0134] The target webpage link parsing unit is used by the Vue routing parsing layer to parse target webpage links and identify whether the target webpage link includes the Vue identifier;

[0135] The successful parsing result acquisition unit is used to acquire the successful parsing result of the target webpage if the target webpage link includes the Vue identifier;

[0136] The unit for obtaining the parsing result of a webpage that failed to be parsed is used to obtain the parsing result of a webpage that failed to be parsed if the target webpage link does not contain a Vue tag.

[0137] In one embodiment, the webpage parsing result acquisition module 703 includes:

[0138] The target webpage link parsing unit is used by the Native routing parsing layer to parse the target webpage link and identify whether the target webpage link includes the Native identifier;

[0139] The successful webpage parsing result acquisition unit is used to acquire the successful webpage parsing result if the target webpage link includes the Native identifier;

[0140] The unit for obtaining the parsing result of a webpage that failed to be parsed is used to obtain the parsing result of a webpage that failed to be parsed if the target webpage link does not contain the Native identifier.

[0141] Specific limitations regarding the webpage link parsing and processing device can be found in the limitations of the webpage link parsing and processing method described above, and will not be repeated here. Each module in the aforementioned webpage link parsing and processing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0142] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 8 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores data required for the webpage link parsing processing method, such as target webpage links that need further analysis and are input to the end node. The network interface communicates with external terminals via a network connection. When the computer program is executed by the processor, it implements a webpage link parsing processing method.

[0143] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the webpage link parsing processing method described in the above embodiment, for example... Figure 2 As shown in S1-S6, or Figures 3 to 6 As shown, to avoid repetition, it will not be described again here. Alternatively, when the processor executes a computer program, it implements the functions of each module / unit in this embodiment of the webpage link parsing processing device, for example... Figure 1 The functions of the webpage link parsing and processing methods shown are not described again here to avoid repetition.

[0144] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When executed by a processor, the computer program implements the webpage link parsing processing method described above, for example... Figure 1 As shown in S1-S6, or Figures 2 to 5As shown, to avoid repetition, it will not be described again here. Alternatively, when the computer program is executed by the processor, it implements the functions of each module / unit in this embodiment of the webpage link parsing processing apparatus, for example... Figure 8 The target node determination module 701, target webpage link sending module 702, webpage parsing result acquisition module 703, target interface display module 704, parsing failure flag sending module 705, and target node update module 706 shown are not described in detail here to avoid repetition. The computer-readable storage medium can be non-volatile or volatile.

[0145] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.

[0146] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0147] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.

Claims

1. A method of processing a web page link resolution, characterized by, The method comprises the following steps: The flow node layer receives a target webpage link and determines a target node from an original node sequence of the flow node layer; When the target node is not an end node, the flow node layer sends the target webpage link to a target routing analysis layer corresponding to the target node; the target routing analysis layer comprises a Version routing analysis layer corresponding to a Version node, an RN routing analysis layer corresponding to an RN node, a Vue routing analysis layer corresponding to a Vue node, and a Native routing analysis layer corresponding to a Native node; The target routing analysis layer analyzes the target webpage link and obtains a webpage analysis result; When the webpage analysis result is successful, the target routing analysis layer sends the target webpage link to a target event distribution layer corresponding to the target routing analysis layer for processing, and displays a target interface corresponding to the target webpage link; When the webpage analysis result is unsuccessful, the target routing analysis layer sends an analysis failure identifier to the flow node layer; After receiving the analysis failure identifier, the flow node layer updates the target node according to the original node sequence, and repeatedly sends the target webpage link to the target routing analysis layer corresponding to the target node when the new target node is not an end node; The target routing analysis layer analyzes the target webpage link and obtains a webpage analysis result, which comprises the following steps: The RN routing analysis layer analyzes the target webpage link and identifies whether the target webpage link comprises an RN identifier; the Vue routing analysis layer analyzes the target webpage link and identifies whether the target webpage link comprises a Vue identifier; and the Native routing analysis layer analyzes the target webpage link and identifies whether the target webpage link comprises a Native identifier; The Version routing analysis layer analyzes the target webpage link and identifies a current Version in the target webpage link; if the current Version is less than a preset Version, it is determined that the target webpage link meets an execution condition of the Version analysis layer corresponding to the target node, the target webpage link needs to be upgraded, a successful webpage analysis result is sent to the target node, and the target webpage link is input into a Version event distribution module corresponding to the Version analysis layer for further version upgrade; if the current Version is not less than the preset Version, it is determined that the target webpage link does not meet the execution condition of the Version analysis layer corresponding to the target node, and the target webpage link does not need to be upgraded, and an unsuccessful webpage analysis result is sent to the target node.

2. The web page link resolution processing method of claim 1, wherein, After determining the target node from the original node sequence of the flow node layer, the webpage link analysis processing method further comprises the following steps: When the target node is an end node, the flow node layer displays a link identification failure interface and sends the target webpage link to a system database.

3. The web link resolution processing method of claim 1, wherein, The target routing resolution layer resolves the target webpage link to obtain a webpage resolution result, including: If the target webpage link includes an RN identifier, a webpage resolution result of resolution success is obtained; If the target webpage link does not include an RN identifier, a webpage resolution result of resolution failure is obtained.

4. The web page link resolution processing method of claim 1, wherein, The target routing resolution layer resolves the target webpage link to obtain a webpage resolution result, including: If the target webpage link includes a Vue identifier, a webpage resolution result of resolution success is obtained; If the target webpage link does not include a Vue identifier, a webpage resolution result of resolution failure is obtained.

5. The web page link resolution processing method of claim 1, wherein, The target routing resolution layer resolves the target webpage link to obtain a webpage resolution result, including: If the target webpage link includes a Native identifier, a webpage resolution result of resolution success is obtained; If the target webpage link does not include a Native identifier, a webpage resolution result of resolution failure is obtained.

6. The web page link resolution processing method of claim 1, wherein, The flow node layer, after receiving the resolution failure identifier, updates a target node according to the original node sequence, and repeatedly executes the sending of the target webpage link to the target routing resolution layer corresponding to the target node when the new target node is not an end node, including: The flow node layer, after receiving the resolution failure identifier, updates a next original node of the target node as a new target node in the original node sequence, and repeatedly executes the sending of the target webpage link to the target routing resolution layer corresponding to the target node when the new target node is not an end node.

7. A web page link resolution processing apparatus characterized by comprising: Including: A target node determination module configured to receive a target webpage link by a flow node layer and determine a target node from an original node sequence of the flow node layer; A target webpage link sending module configured to send the target webpage link to a target routing resolution layer corresponding to the target node when the target node is not an end node by the flow node layer; the target routing resolution layer includes a Version routing resolution layer corresponding to a Version node, an RN routing resolution layer corresponding to an RN node, a Vue routing resolution layer corresponding to a Vue node, and a Native routing resolution layer corresponding to a Native node; A webpage resolution result obtaining module configured to resolve the target webpage link by the target routing resolution layer to obtain a webpage resolution result; A target interface display module configured to send the target webpage link to a target event distribution layer corresponding to the target routing resolution layer for processing and display a target interface corresponding to the target webpage link when the webpage resolution result is resolution success by the target routing resolution layer; A resolution failure identifier sending module configured to send a resolution failure identifier to the flow node layer when the webpage resolution result is resolution failure by the target routing resolution layer; A target node updating module configured to update a target node according to the original node sequence by the flow node layer after receiving the resolution failure identifier, and repeatedly execute the sending of the target webpage link to the target routing resolution layer corresponding to the target node when the new target node is not an end node. The webpage analysis result acquisition module comprises: the RN route analysis layer analyzes the target webpage link to identify whether the target webpage link comprises an RN identifier; the Vue route analysis layer analyzes the target webpage link to identify whether the target webpage link comprises a Vue identifier; the Native route analysis layer analyzes the target webpage link to identify whether the target webpage link comprises a Native identifier; the Version route analysis layer analyzes the target webpage link to identify a current Version in the target webpage link; if the current Version is less than a preset Version, it is determined that the target webpage link satisfies an execution condition of the Version analysis layer corresponding to the target node, the target webpage link needs to be upgraded in version, the webpage analysis result of successful analysis is sent to the target node, and the target webpage link is input into a Version event distribution module corresponding to the Version analysis layer for further version upgrade function; if the current Version is not less than the preset Version, it is determined that the target webpage link does not satisfy the execution condition of the Version analysis layer corresponding to the target node, the target webpage link does not need to be upgraded in version, and the webpage analysis result of failed analysis is sent to the target node.

8. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the webpage link analysis processing method of any one of claims 1 to 6.

9. A computer-readable storage medium storing a computer program, the computer program comprising instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 8. The computer program is executed by the processor to implement the webpage link analysis processing method of any one of claims 1 to 6.

Citation Information

Patent Citations

  • Page display method and device, electronic equipment and storage medium

    CN113094674A