Network information processing method and apparatus, medium, program product, and electronic device

By identifying and filtering a subset of protocols with high access volume in the access layer access logs, and combining the matching conditions of proto files and PHP files, the system automatically identifies and detects undetected protocols in the backend service, solving the problem of the inability to identify undetected protocols in existing technologies and improving protocol detection coverage and service stability.

CN116781585BActive Publication Date: 2026-05-12TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2022-03-07
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing technologies cannot effectively identify undetected protocols in backend services, which affects business stability and availability.

Method used

By obtaining a set of URLs from the access layer access logs and determining the protocol corresponding to each URL based on the matching conditions of the preset target protocol set, a subset of protocols with access volume greater than or equal to a preset threshold is filtered out to further identify undetected protocols. By analyzing the matching conditions of proto files and PHP files, internal type protocols are filtered to achieve automatic identification and detection of undetected protocols.

Benefits of technology

It enables accurate identification and detection of undetected protocols in the backend service, improves protocol detection coverage, and ensures the stability and availability of the backend service.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116781585B_ABST
    Figure CN116781585B_ABST
Patent Text Reader

Abstract

The application discloses a network information processing method and device, medium, program product and electronic equipment. The method comprises the following steps: obtaining a set of uniform resource locators (URLs) that have been accessed in an access layer access log; determining a protocol corresponding to each URL in the set of URLs according to a matching condition of each protocol in a preset target protocol set, and obtaining the number of URLs corresponding to each protocol in the target protocol set; determining a protocol subset to be processed in the target protocol set; and determining an undetected protocol in the protocol subset to be processed. The application solves the technical problem that an undetected protocol in a background service cannot be determined in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computers, and more specifically, to a network information processing method and apparatus, medium, program product, and electronic device. Background Technology

[0002] In related technologies, business stability depends on the stability of backend services, and backend service protocol detection is an important means to improve business stability and availability. When a backend service fails, the service protocol detection will automatically detect the fault.

[0003] Service protocol testing needs to cover as many used service protocols as possible in the background. However, there are usually many service protocols in use in the background, making it difficult to test each one. Related technologies cannot identify untested protocols in the background services.

[0004] There is currently no effective solution to the above problems. Summary of the Invention

[0005] This invention provides a network information processing method and apparatus, medium, program product and electronic device to at least solve the technical problem in the prior art of being unable to determine undetected protocols in background services.

[0006] According to one aspect of the present invention, a network information processing method is provided, comprising: obtaining a set of accessed Uniform Resource Locators (URLs) from an access layer access log; determining the protocol corresponding to each URL in the URL set according to a matching condition for each protocol in a preset target protocol set, and obtaining the number of URLs in the target protocol set corresponding to each protocol; determining a subset of protocols to be processed in the target protocol set, wherein the number of URLs corresponding to the protocols in the URL set in the subset of protocols to be processed is greater than or equal to a preset number threshold; and determining undetected protocols in the subset of protocols to be processed.

[0007] Optionally, determining a subset of protocols to be processed in the target protocol set includes: searching the target protocol set for protocols that satisfy a preset access volume condition, wherein the number of URLs corresponding to the protocols satisfying the preset access volume condition in the URL set is greater than or equal to the preset number threshold; if a protocol satisfying the preset access volume condition is found, determining the found protocol satisfying the preset access volume condition as a protocol in the subset of protocols to be processed; or searching the target protocol set for protocols that satisfy the preset access volume condition, wherein the number of URLs corresponding to the protocols satisfying the preset access volume condition in the URL set is greater than or equal to the preset number threshold; if a protocol satisfying the preset access volume condition is found, searching for protocols of a preset internal type among the protocols satisfying the preset access volume condition; if a protocol of the internal type is found, determining the protocols satisfying the preset access volume condition other than the protocols of the internal type as protocols in the subset of protocols to be processed.

[0008] Optionally, the step of searching for a protocol of a preset internal type among protocols that meet the preset access volume conditions includes: performing the following operations on each protocol among the protocols that meet the preset access volume conditions, wherein each protocol is the current protocol when performing the following operations: if the matching conditions of the current protocol include a specified field corresponding to the protocol of the internal type, the current protocol is determined to be the protocol of the internal type.

[0009] Optionally, if the matching conditions of the current protocol include a specified field corresponding to the protocol of the internal type, the current protocol is determined to be the protocol of the internal type, including at least one of the following: if the current protocol is a protocol in a proto file and the matching conditions of the current protocol include a package name field containing the string "internal", the current protocol is determined to be the protocol of the internal type, wherein the specified field corresponding to the protocol of the internal type includes the package name field; if the current protocol is a protocol in a PHP file and the matching conditions of the current protocol include a method name field prefixed with an underscore, the current protocol is determined to be the protocol of the internal type, wherein the specified field corresponding to the protocol of the internal type includes the method name field.

[0010] Optionally, determining the protocol corresponding to each URL in the URL set based on the matching conditions of each protocol in the preset target protocol set includes: performing the following operations on each URL in the URL set, where each URL is the current URL during the operation: obtaining the concatenation format of the current URL; searching for a target protocol in the preset target protocol set, wherein the matching conditions of the target protocol correspond to the concatenation format of the current URL; and, if the target protocol is found, determining the target protocol as the protocol corresponding to the current URL.

[0011] Optionally, obtaining the set of visited URLs from the access layer access logs includes: obtaining the access logs of each of the multiple access layer machines to obtain multiple access logs, wherein the access logs of each access layer machine include URLs accessed within a preset time period, and the multiple access layer machines are located in the same access layer; and determining the URLs in the multiple access logs as the URL set.

[0012] Optionally, determining undetected protocols in the subset of protocols to be processed includes: obtaining a list of detected protocols and a list of protocols that do not need to be detected, wherein the list of detected protocols includes detected protocols and the list of protocols that do not need to be detected includes protocols that do not need to be detected; removing protocols from the list of detected protocols and protocols from the list of protocols that do not need to be detected from the subset of protocols to be processed to obtain the undetected protocols.

[0013] Optionally, after determining the undetected protocols in the subset of protocols to be processed, the method further includes: determining the number of protocols appearing in the list of detected protocols in the subset of protocols to be processed, wherein the list of detected protocols includes detected protocols; and determining the ratio of the determined number to the total number of protocols in the subset of protocols to be processed as the protocol detection coverage rate.

[0014] Optionally, after determining the undetected protocols in the subset of protocols to be processed, the method further includes: obtaining the service corresponding to the undetected protocol; detecting the service corresponding to the undetected protocol; and updating the undetected protocol to a detected protocol.

[0015] Optionally, after updating the undetected protocol to a detected protocol, the method further includes: sending an alarm command if the service corresponding to the updated detected protocol fails.

[0016] According to another aspect of the present invention, a network information processing apparatus is also provided, comprising: an acquisition module, configured to acquire a set of accessed Uniform Resource Locators (URLs) from an access layer access log; a first determination module, configured to determine the protocol corresponding to each URL in the URL set according to a matching condition of each protocol in a preset target protocol set, and acquire the number of URLs in the target protocol set corresponding to each protocol; a second determination module, configured to determine a subset of protocols to be processed in the target protocol set, wherein the number of URLs corresponding to the protocols in the URL set is greater than or equal to a preset number threshold; and a third determination module, configured to determine undetected protocols in the subset of protocols to be processed.

[0017] According to another aspect of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer program, wherein the computer program is configured to execute the above-described network information processing method at runtime.

[0018] According to another aspect of the embodiments of this application, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the network information processing method described above.

[0019] According to another aspect of the present invention, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to execute the network information processing method described above through the computer program.

[0020] In this embodiment of the invention, the protocol corresponding to each Uniform Resource Locator (URL) in the access layer access log is determined based on the matching conditions of each protocol in a preset target protocol set. Protocols whose number of corresponding URLs is greater than or equal to a preset threshold are found in the target protocol set, resulting in a subset of protocols to be processed. Undetected protocols are then identified within this subset. This achieves the goal of identifying undetected protocols in the backend service, thereby solving the technical problem in the prior art of being unable to identify undetected protocols in the backend service. Attached Figure Description

[0021] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:

[0022] Figure 1This is a schematic diagram of an application environment for an optional network information processing method according to an embodiment of the present invention;

[0023] Figure 2 This is a flowchart of an optional network information processing method according to an embodiment of the present invention;

[0024] Figure 3 This is an optional architecture diagram according to an embodiment of the present invention;

[0025] Figure 4 This is an optional flowchart according to an embodiment of the present invention;

[0026] Figure 5 This is another optional architecture diagram according to an embodiment of the present invention;

[0027] Figure 6 This is another optional flowchart according to an embodiment of the present invention;

[0028] Figure 7 This is another optional flowchart according to an embodiment of the present invention;

[0029] Figure 8 This is another optional flowchart according to an embodiment of the present invention;

[0030] Figure 9 This is a schematic diagram of the structure of an optional network information processing device according to an embodiment of the present invention;

[0031] Figure 10 This is a schematic diagram of the structure of an optional electronic device according to an embodiment of the present invention;

[0032] Figure 11 This is a computer system architecture block diagram of an optional electronic device according to an embodiment of the present invention. Detailed Implementation

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

[0034] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0035] According to one aspect of the present invention, a network information processing method is provided. Optionally, as an optional implementation, the above-described network information processing method may be applied to, but is not limited to, [examples of other methods]. Figure 1 The application environment shown above includes terminal device 101, server 102, and database 103.

[0036] Optionally, in this embodiment, the terminal device 101 may be a terminal device configured with a target client, which may include, but is not limited to, at least one of the following: mobile phone (such as Android phone, iOS phone, etc.), laptop computer, tablet computer, PDA, MID (Mobile Internet Devices), PAD, desktop computer, smart TV, etc. The target client may be a video client, instant messaging client, browser client, game client, etc.

[0037] Optionally, the aforementioned networks may include, but are not limited to, wired networks and wireless networks, wherein the wired network includes local area networks (LANs), metropolitan area networks (MANs), and wide area networks (WANs), and the wireless network includes Bluetooth, Wi-Fi, and other networks that enable wireless communication.

[0038] Optionally, the server 102 mentioned above can be a single server, a server cluster consisting of multiple servers, or a cloud server.

[0039] Optionally, the database 103 is used to store data, including but not limited to the access layer access logs and the matching conditions for each protocol in the target protocol set.

[0040] The above is merely an example, and no limitation is made in this embodiment.

[0041] Alternatively, as an alternative implementation method, such as Figure 2 As shown, the above-mentioned network information processing method includes:

[0042] Step S202: Obtain the set of accessed Uniform Resource Locator (URLs) from the access layer access log;

[0043] The access logs mentioned above include the URLs of the Uniform Resource Locators (URLs) used to access the access layer.

[0044] Step S204: Based on the matching conditions of each protocol in the preset target protocol set, determine the protocol corresponding to each URL in the URL set, and obtain the number of URLs in the target protocol set that correspond to each protocol;

[0045] The target protocol set mentioned above includes all service protocols used in the backend service. The matching criteria for each protocol include, but are not limited to, the URL concatenation format corresponding to that protocol. Based on the protocol matching criteria, the protocol corresponding to the visited URL can be determined.

[0046] Step S206: Determine a subset of protocols to be processed in the target protocol set, wherein the number of URLs corresponding to the protocols in the protocol subset to be processed in the URL set is greater than or equal to a preset number threshold.

[0047] Specifically, based on the number of URLs corresponding to each protocol, protocols to be processed are determined from the aforementioned target protocol set, resulting in a subset of protocols to be processed. The number of URLs corresponding to the protocols to be processed is greater than or equal to the aforementioned preset threshold, which can be determined according to actual circumstances, for example, 50, 80, 100, etc.

[0048] Step S208: Identify undetected protocols in the subset of protocols to be processed.

[0049] As an optional implementation, such as Figure 3 The architecture diagram shown includes an access layer, an undetected protocol analysis system, a code repository, and a database. The undetected protocol analysis system retrieves accessed URLs from the access layer's access logs, obtaining a URL set. It analyzes the matching conditions of each protocol based on files in the code repository (e.g., proto files, PHP files). The undetected protocol analysis system determines the protocol corresponding to each URL in the URL set and counts the number of URLs corresponding to each protocol. Protocols with a corresponding URL count greater than or equal to a preset threshold (which can be set according to actual conditions, such as 100, 80, etc.) are selected as protocols to be processed, resulting in a subset of protocols to be processed. The undetected protocol analysis system retrieves a list of detected protocols and a list of protocols that do not need to be detected from the database. Based on the detected and non-detectable protocols, it determines the undetected protocols from the subset of protocols to be processed.

[0050] Optionally, determining a subset of protocols to be processed in the target protocol set includes: searching for protocols in the target protocol set that satisfy a preset access volume condition, wherein the number of URLs corresponding to the protocols that satisfy the preset access volume condition in the URL set is greater than or equal to the preset number threshold; if a protocol that satisfies the preset access volume condition is found, the found protocol that satisfies the preset access volume condition is determined as a protocol in the subset of protocols to be processed.

[0051] As an optional implementation, protocols with very low access volume do not need to be detected, depending on the business detection requirements. Instead, a portion of protocols with low access volume are filtered out based on a preset threshold. Protocols that meet the preset access volume condition are those whose access volume is greater than or equal to the preset threshold, meaning the number of URLs corresponding to that protocol is greater than or equal to the preset threshold. This preset threshold can be determined based on actual circumstances, such as 30, 50, or 100.

[0052] Alternatively, a protocol that meets a preset access volume condition can be found in the target protocol set, wherein the number of URLs corresponding to the protocol that meets the preset access volume condition in the URL set is greater than or equal to the preset number threshold; if a protocol that meets the preset access volume condition is found, a protocol of a preset internal type is found among the protocols that meet the preset access volume condition; if a protocol of the internal type is found, the protocols that meet the preset access volume condition other than the protocols of the internal type are determined as protocols in the subset of protocols to be processed.

[0053] As an optional implementation, protocols with very low access volume and internal protocols do not need to be detected. First, a portion of protocols with low access volume are filtered out based on a preset access volume threshold, and then internal protocols are filtered out. Protocols that meet the preset access volume condition are those whose access volume is greater than or equal to the preset access volume threshold; that is, protocols with access volume less than or equal to the preset access volume threshold are filtered out. Then, internal protocols are filtered out from the remaining protocols.

[0054] As an optional implementation, a protocol of a preset internal type may be searched in the target protocol set; if a protocol of the preset internal type is found, protocols in the target protocol set other than those of the internal type are identified as protocols in the external protocol set; protocols that satisfy a preset access volume condition are searched in the external protocol set, wherein the number of URLs corresponding to the protocols that satisfy the preset access volume condition in the external protocol set is greater than or equal to the preset number threshold; if a protocol that satisfies the preset access volume condition is found, the protocol that satisfies the preset access volume condition is identified as a protocol in the subset of protocols to be processed.

[0055] As an optional implementation, protocols with very low access volume and internal protocols do not need to be detected. First, internal protocols are filtered out. Then, based on a preset access volume threshold, a portion of protocols with relatively low access volume are filtered out, followed by further filtering of internal protocols. Protocols meeting the preset access volume condition refer to protocols whose access volume is greater than or equal to the preset access volume threshold; in other words, protocols with access volume less than or equal to the preset access volume threshold are filtered out.

[0056] Optionally, the step of searching for a protocol of a preset internal type among protocols that meet the preset access volume conditions includes: performing the following operations on each protocol among the protocols that meet the preset access volume conditions, wherein each protocol is the current protocol when performing the following operations: if the matching conditions of the current protocol include a specified field corresponding to the protocol of the internal type, the current protocol is determined to be the protocol of the internal type.

[0057] As an optional implementation, proto files can be analyzed to obtain protobuf definition protocols. PHP files in the controllers folder can also be analyzed to obtain web class protocols. Analyzing proto and PHP files reveals that matching conditions for internal type protocols include specified fields. For example, analyzing a proto file shows that protocols with package names containing the `internal` field are internal protocols. Analyzing a PHP file shows that method names with an underscore prefix are internal protocols. If the current protocol among protocols that meet preset access volume conditions includes a package name with the `internal` field or a method name with an underscore prefix in its matching conditions, then the current protocol is an internal type protocol. Internal type protocols do not need to be detected but need to be filtered.

[0058] Optionally, if the matching conditions of the current protocol include a specified field corresponding to the protocol of the internal type, the current protocol is determined to be the protocol of the internal type, including at least one of the following: if the current protocol is a protocol in a proto file and the matching conditions of the current protocol include a package name field containing the string "internal", the current protocol is determined to be the protocol of the internal type, wherein the specified field corresponding to the protocol of the internal type includes the package name field; if the current protocol is a protocol in a PHP file and the matching conditions of the current protocol include a method name field prefixed with an underscore, the current protocol is determined to be the protocol of the internal type, wherein the specified field corresponding to the protocol of the internal type includes the method name field.

[0059] As an optional implementation, the specified fields mentioned above include, but are not limited to, the package name field and the method name field. For example... Figure 4As shown in the flowchart, the protocols of the internal types are obtained by analyzing the proto file and PHP file, and the protocols of the internal types are filtered to obtain the protocols to be processed.

[0060] The URL in the proto file is composed of three parts: package name, service name, and interface name. According to the specifications defined in the business protocol, protocols with an "internal" field in the package name are internal protocols. If the current protocol is a protocol in the proto file, and the matching conditions for the current protocol include "internal" in the package name field of the URL corresponding to the current protocol, then the current protocol is an internal protocol and does not need to be detected; it needs to be filtered out.

[0061] Analyzing the PHP file reveals the web's defined protocol. The protocol URL is composed of a fixed prefix, class name, and method name concatenated together. Method names prefixed with an underscore are internal protocols. If the current protocol is a protocol found in the PHP file, and the matching criteria for the current protocol include an underscore prefix in the method field of the corresponding URL, then the current protocol is an internal protocol and does not require further detection; it should be filtered out.

[0062] Optionally, determining the protocol corresponding to each URL in the URL set based on the matching conditions of each protocol in the preset target protocol set includes: performing the following operations on each URL in the URL set, where each URL is the current URL during the operation: obtaining the concatenation format of the current URL; searching for a target protocol in the preset target protocol set, wherein the matching conditions of the target protocol correspond to the concatenation format of the current URL; and, if the target protocol is found, determining the target protocol as the protocol corresponding to the current URL.

[0063] As an alternative implementation, the protocol corresponding to the URL can be determined based on the protocol matching criteria and the URL concatenation format. Specifically, proto files and PHP files can be analyzed.

[0064] In a proto file, the matching condition for a protocol is that the URL corresponding to that protocol consists of three parts: package name, service name, and interface name. If the current URL is composed of package name, service name, and interface name, then the URL is a protocol in the proto file. If the package name of the current URL contains "internal", then the URL is a protocol of an internal type in the proto file.

[0065] The matching criteria in the PHP file are that the URL corresponding to the protocol is composed of a fixed prefix / class name / method name concatenated together. If the current URL is composed of a fixed prefix / class name / method name concatenated together, then the URL is a protocol in the PHP file. If the method name in the current URL is prefixed with an underscore, then the URL is a protocol of an internal type in the proto file.

[0066] Optionally, obtaining the set of visited URLs from the access layer access logs includes: obtaining the access logs of each of the multiple access layer machines to obtain multiple access logs, wherein the access logs of each access layer machine include URLs accessed within a preset time period, and the multiple access layer machines are located in the same access layer; and determining the URLs in the multiple access logs as the URL set.

[0067] As an optional implementation, such as Figure 5 The system architecture diagram shown illustrates that the access layer includes multiple access layer machines. Each access layer machine can be deployed with a statistical calculator. This calculator periodically analyzes the URLs accessing that access layer machine within a preset time period (the preset time period can be set according to actual conditions, such as 12 hours, 24 hours, etc.), obtaining the access logs for that access layer machine. The URLs from the multiple access logs corresponding to multiple access layer machines are then aggregated to obtain the aforementioned URL set.

[0068] As an optional implementation, an HTTP query interface is also provided on each statistical calculator. Figure 5 The analysis program is deployed on the undetected protocol analysis machine shown. This program can query the URLs accessing the access layer machine from the HTTP query interface provided by the statistical calculator and obtain the access logs of the access layer machine. The undetected protocol analysis machine can also pull the latest business code from the code repository and obtain the matching conditions for each protocol by analyzing the proto files and PHP files. Based on the matching conditions of each protocol, the undetected protocol analysis machine determines the protocol corresponding to each URL in the above URL set, filters out protocols whose corresponding URL count is less than or equal to a preset threshold, and obtains a subset of protocols to be processed. The undetected protocol analysis machine can also retrieve the detected protocols and protocols that do not need to be detected from the database. Detected protocols and protocols that do not need to be detected are filtered out from the subset of protocols to be processed, resulting in undetected protocols. The undetected protocol analysis machine can also summarize the undetected protocols into an undetected protocol list, send the undetected protocol list to staff via email, and then perform detection on the undetected protocols in the undetected protocol list, thereby achieving comprehensive detection of the service protocols that need to be detected in the backend service.

[0069] As an optional implementation, such as Figure 6The flowchart shown illustrates a statistical calculator deployed on the access layer machine. This statistical calculator periodically analyzes the access logs of the access layer machine to obtain a list of URLs that accessed the access layer within a preset time period and writes them to a local file.

[0070] Each access layer machine is equipped with a statistics calculator, which periodically compiles access logs for each access layer machine within a preset time period. These logs record the URLs accessed within that time period. Each access layer machine can have multiple interfaces configured, and the statistics calculator can retrieve access logs for each interface on the access layer machine, such as... Figure 7 In the interface access log processing flow shown, the statistical calculator periodically retrieves the access log file access.log for each interface and analyzes it according to the access log format to count the URLs of the accessed interfaces. The statistical calculator retrieves the access logs for each interface, analyzes the URLs of each interface, compiles a list of request URLs for that access layer machine, saves it locally, and provides an HTTP interface for the data aggregator to retrieve the access logs for that access layer machine. The access layer access logs include the URLs accessed by multiple access layer machines.

[0071] The statistical calculator also provides a corresponding data interface for the data aggregator to obtain access logs from the access layer machines. For example... Figure 8 In the flowchart shown, the data aggregator, deployed on a specific machine, periodically retrieves the access logs of that access layer machine from a statistical calculator deployed on the access layer machine. It then merges and deduplicates these access logs to generate the access layer access logs for the entire service and writes them to a local file. A data interface is also provided for querying the set of accessed Uniform Resource Locators (URLs).

[0072] Optionally, determining undetected protocols in the subset of protocols to be processed includes: obtaining a list of detected protocols and a list of protocols that do not need to be detected, wherein the list of detected protocols includes detected protocols and the list of protocols that do not need to be detected includes protocols that do not need to be detected; removing protocols from the list of detected protocols and protocols from the list of protocols that do not need to be detected from the subset of protocols to be processed to obtain the undetected protocols.

[0073] As an optional implementation, a list of detected protocols and a list of protocols that do not need to be detected are stored in the database. The list of detected protocols records the protocols that have been detected, and the list of protocols that do not need to be detected records the protocols that do not need to be detected. The detected protocol list and the protocols that do not need to be detected are removed from the subset of protocols to be processed to obtain the undetected protocols.

[0074] Optionally, after determining the undetected protocols in the subset of protocols to be processed, the method further includes: determining the number of protocols appearing in the list of detected protocols in the subset of protocols to be processed, wherein the list of detected protocols includes detected protocols; and determining the ratio of the determined number to the total number of protocols in the subset of protocols to be processed as the protocol detection coverage rate.

[0075] As an optional implementation, detection coverage is an indicator that measures the completeness of service protocol detection on the existing network. It refers to the ratio of the number of detected protocols to the total number of protocols in the subset of protocols to be processed. In this embodiment, by adding access layer access logs as analysis data and combining them with protocol matching conditions, undetected protocols in the access layer are accurately and automatically analyzed, thereby improving protocol detection coverage.

[0076] Optionally, after determining the undetected protocols in the subset of protocols to be processed, the method further includes: obtaining the service corresponding to the undetected protocol; detecting the service corresponding to the undetected protocol; and updating the undetected protocol to a detected protocol.

[0077] As an optional implementation, after identifying an undetected service protocol, the service corresponding to that service protocol is detected, and the undetected protocol is converted into a detected protocol and recorded in the detected protocol list.

[0078] Optionally, after updating the undetected protocol to a detected protocol, the method further includes: sending an alarm command if the service corresponding to the updated detected protocol fails.

[0079] As an optional implementation, the stability of backend operations depends on the stability of backend services. When a backend service malfunctions, the service protocol detection system will proactively detect the fault and alert staff. Upon receiving the alert, staff will handle and repair the fault. The backend services detected by the service protocol detection system need to cover as many service protocols currently used on the network as possible. Given the large number of service protocols on the network, this application can accurately and efficiently analyze undetected service protocols, providing the service protocol detection system with accurate detection scope analysis. By implementing and integrating it into the CI pipeline, it automatically checks and analyzes undetected protocol interfaces daily and periodically, outputting analysis reports.

[0080] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the present invention is not limited to the described order of actions, because according to the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to the present invention.

[0081] According to another aspect of the present invention, a network information processing apparatus for implementing the above-described network information processing method is also provided. For example... Figure 9 As shown, the device includes: an acquisition module 902, used to acquire a set of accessed Uniform Resource Locators (URLs) from the access layer access log; a first determination module 904, used to determine the protocol corresponding to each URL in the URL set according to the matching conditions of each protocol in the preset target protocol set, and to acquire the number of URLs in the target protocol set corresponding to each protocol; a second determination module 906, used to determine a subset of protocols to be processed in the target protocol set, wherein the number of URLs corresponding to the protocols in the URL set is greater than or equal to a preset number threshold; and a third determination module 908, used to determine undetected protocols in the subset of protocols to be processed.

[0082] Optionally, the above apparatus is further configured to: search for protocols that satisfy a preset access volume condition in the target protocol set, wherein the number of URLs corresponding to the protocols satisfying the preset access volume condition in the URL set is greater than or equal to the preset number threshold; if a protocol satisfying the preset access volume condition is found, determine the found protocol satisfying the preset access volume condition as a protocol in the protocol subset to be processed; search for protocols that satisfy the preset access volume condition in the target protocol set, wherein the number of URLs corresponding to the protocols satisfying the preset access volume condition in the URL set is greater than or equal to the preset number threshold; if a protocol satisfying the preset access volume condition is found, search for protocols of a preset internal type among the protocols satisfying the preset access volume condition; if a protocol of the internal type is found, determine the protocols other than the protocols of the internal type among the protocols satisfying the preset access volume condition as protocols in the protocol subset to be processed.

[0083] Optionally, the above-described apparatus is further configured to perform the following operations on each of the protocols that satisfy the preset access volume conditions, wherein each protocol is the current protocol when performing the following operations: if the matching conditions of the current protocol include a specified field corresponding to the protocol of the internal type, the current protocol is determined to be the protocol of the internal type.

[0084] Optionally, the above-described apparatus is further configured to: determine the current protocol as a protocol of the internal type when the current protocol is a protocol in a proto file and the matching conditions of the current protocol include a package name field containing the string "internal", wherein the specified field corresponding to the protocol of the internal type includes the package name field; and determine the current protocol as a protocol of the internal type when the current protocol is a protocol in a PHP file and the matching conditions of the current protocol include a method name field prefixed with an underscore, wherein the specified field corresponding to the protocol of the internal type includes the method name field.

[0085] Optionally, the above-described apparatus is further configured to perform the following operations on each URL in the URL set, wherein each URL is the current URL when performing the following operations: obtaining the concatenation format of the current URL; searching for a target protocol in the preset target protocol set, wherein the matching conditions of the target protocol correspond to the concatenation format of the current URL; and, if the target protocol is found, determining the target protocol as the protocol corresponding to the current URL.

[0086] Optionally, the above-mentioned apparatus is further configured to obtain access logs of each of the multiple access layer machines to obtain multiple access logs, wherein the access logs of each access layer machine include URLs accessed within a preset time period, and the multiple access layer machines are located in the same access layer; and to determine the URLs in the multiple access logs as the URL set.

[0087] Optionally, the above-described apparatus is further configured to obtain a list of detected protocols and a list of protocols that do not need to be detected, wherein the list of detected protocols includes detected protocols and the list of protocols that do not need to be detected includes protocols that do not need to be detected; and to remove protocols from the list of detected protocols and the list of protocols that do not need to be detected from the subset of protocols to be processed, thereby obtaining the undetected protocols.

[0088] Optionally, the above-described apparatus is further configured to, after determining undetected protocols in the subset of protocols to be processed, determine the number of protocols appearing in the list of detected protocols in the subset of protocols to be processed, wherein the list of detected protocols includes detected protocols; and determine the ratio of the determined number to the total number of protocols in the subset of protocols to be processed as the protocol detection coverage rate.

[0089] Optionally, the above-described apparatus is further configured to, after determining the undetected protocols in the subset of protocols to be processed, obtain the services corresponding to the undetected protocols; detect the services corresponding to the undetected protocols; and update the undetected protocols to detected protocols.

[0090] Optionally, the above-mentioned device is further configured to send an alarm command if the service corresponding to the updated detected protocol fails after the undetected protocol has been updated to a detected protocol.

[0091] According to another aspect of the present invention, an electronic device for implementing the above-described network information processing method is also provided. This electronic device may be... Figure 1 The terminal device or server shown. This embodiment uses the electronic device as a server as an example for illustration. Figure 10 As shown, the electronic device includes a memory 1002 and a processor 1004. The memory 1002 stores a computer program, and the processor 1004 is configured to execute the steps of any of the above method embodiments via the computer program.

[0092] Optionally, in this embodiment, the aforementioned electronic device may be located in at least one of a plurality of network devices in a computer network.

[0093] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:

[0094] S1, retrieve the set of visited Uniform Resource Locator (URL) URLs from the access layer access log;

[0095] S2, based on the matching conditions of each protocol in the preset target protocol set, determine the protocol corresponding to each URL in the URL set, and obtain the number of URLs in the target protocol set that correspond to each protocol;

[0096] S3, determine a subset of protocols to be processed in the target protocol set, wherein the number of URLs corresponding to the protocols in the protocol subset to be processed in the URL set is greater than or equal to a preset number threshold;

[0097] S4, identify the undetected protocols in the subset of protocols to be processed.

[0098] Alternatively, as those skilled in the art will understand, Figure 10 The structure shown is for illustrative purposes only. Electronic devices can also be smartphones (such as Android phones, iOS phones, etc.), tablets, PDAs, mobile internet devices (MIDs), PADs, and other terminal devices. Figure 10 This does not limit the structure of the aforementioned electronic devices or electronic equipment. For example, electronic devices or electronic equipment may also include components that are more... Figure 10 The more or fewer components shown (such as network interfaces, etc.), or having the same Figure 10 The different configurations shown.

[0099] The memory 1002 can be used to store software programs and modules, such as the program instructions / modules corresponding to the network information processing method and apparatus in this embodiment of the invention. The processor 1004 executes various functional applications and data processing by running the software programs and modules stored in the memory 1002, thereby realizing the aforementioned network information processing method. The memory 1002 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 1002 may further include memory remotely located relative to the processor 1004, and these remote memories can be connected to the terminal via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Specifically, the memory 1002 may be used, but is not limited to, to store information such as access layer access logs. As an example, such as... Figure 10 As shown, the memory 1002 may include, but is not limited to, the acquisition module 902, the first determination module 904, the second determination module 906, and the third determination module 908 in the network information processing device. Furthermore, it may include, but is not limited to, other module units in the network information processing device, which will not be elaborated upon in this example.

[0100] Optionally, the transmission device 1006 described above is used to receive or send data via a network. Specific examples of the network described above may include wired networks and wireless networks. In one example, the transmission device 1006 includes a Network Interface Controller (NIC), which can be connected to other network devices and a router via a network cable to communicate with the Internet or a local area network. In another example, the transmission device 1006 is a Radio Frequency (RF) module, used for wireless communication with the Internet.

[0101] In addition, the aforementioned electronic device also includes: a display 1008 for displaying the aforementioned undetected protocol; and a connection bus 1010 for connecting the various module components in the aforementioned electronic device.

[0102] In other embodiments, the aforementioned terminal device or server can be a node in a distributed system, wherein the distributed system can be a blockchain system, which is a distributed system formed by connecting multiple nodes through network communication. The nodes can form a peer-to-peer (P2P) network, and any form of computing device, such as a server, terminal, or other electronic device, can become a node in the blockchain system by joining this peer-to-peer network.

[0103] According to one aspect of this application, a computer program product is provided, comprising a computer program / instructions containing program code for performing the methods shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via communication section 1109, and / or installed from removable media 1111. When the computer program is executed by central processing unit 1101, it performs various functions provided in embodiments of this application.

[0104] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0105] Figure 11 A schematic block diagram of a computer system architecture for implementing an electronic device according to embodiments of the present application is shown.

[0106] It should be noted that, Figure 11 The computer system 1100 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0107] like Figure 11 As shown, the computer system 1100 includes a central processing unit (CPU) 1101, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 1102 or programs loaded from storage section 1108 into random access memory (RAM). The RAM 1103 also stores various programs and data required for system operation. The CPU 1101, ROM 1102, and RAM 1103 are interconnected via a bus 1104. An input / output interface 1105 (I / O interface) is also connected to the bus 1104.

[0108] The following components are connected to the input / output interface 1105: an input section 1106 including a keyboard, mouse, etc.; an output section 1107 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 1108 including a hard disk, etc.; and a communication section 1109 including a network interface card such as a local area network card, modem, etc. The communication section 1109 performs communication processing via a network such as the Internet. A drive 1110 is also connected to the input / output interface 1105 as needed. Removable media 1111, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on the drive 1110 as needed so that computer programs read from them can be installed into the storage section 1108 as needed.

[0109] Specifically, according to embodiments of this application, the processes described in the various method flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 1109, and / or installed from removable medium 1111. When the computer program is executed by central processing unit 1101, it performs various functions defined in the system of this application.

[0110] According to one aspect of this application, a computer-readable storage medium is provided, wherein a processor of a computer device reads computer instructions from the computer-readable storage medium, and executes the computer instructions, causing the computer device to perform the methods provided in the various alternative implementations described above.

[0111] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:

[0112] S1, retrieve the set of visited Uniform Resource Locator (URL) URLs from the access layer access log;

[0113] S2, based on the matching conditions of each protocol in the preset target protocol set, determine the protocol corresponding to each URL in the URL set, and obtain the number of URLs in the target protocol set that correspond to each protocol;

[0114] S3, determine a subset of protocols to be processed in the target protocol set, wherein the number of URLs corresponding to the protocols in the protocol subset to be processed in the URL set is greater than or equal to a preset number threshold;

[0115] S4, identify the undetected protocols in the subset of protocols to be processed.

[0116] Optionally, in this embodiment, those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0117] If the integrated units in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in the aforementioned computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.

[0118] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0119] In the several embodiments provided in this application, it should be understood that the disclosed client can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection between units or modules, and may be electrical or other forms.

[0120] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0121] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0122] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A network information processing method, characterized in that, include: Retrieve the set of visited Uniform Resource Locator (URLs) from the access layer access logs; Based on the matching conditions of each protocol in the preset target protocol set, determine the protocol corresponding to each URL in the URL set, and obtain the number of URLs in the target protocol set that correspond to each protocol; A subset of protocols to be processed is determined from the target protocol set, wherein the number of URLs corresponding to the protocols in the protocol subset to be processed in the URL set is greater than or equal to a preset number threshold. Obtain a list of detected protocols and a list of protocols that do not need to be detected, wherein the list of detected protocols includes the protocols that have been detected, and the list of protocols that do not need to be detected includes the protocols that do not need to be detected; The protocols in the detected protocol list and the protocols in the protocol list that do not need to be detected are removed from the subset of protocols to be processed, resulting in undetected protocols.

2. The method according to claim 1, characterized in that, Determining a subset of protocols to be processed from the target protocol set includes: Search the target protocol set for protocols that meet a preset access volume condition, wherein the number of URLs corresponding to the protocols that meet the preset access volume condition in the URL set is greater than or equal to the preset number threshold; if a protocol that meets the preset access volume condition is found, the found protocol that meets the preset access volume condition is determined as a protocol in the subset of protocols to be processed; or In the target protocol set, a protocol that meets a preset access volume condition is searched, wherein the number of URLs corresponding to the protocol that meets the preset access volume condition in the URL set is greater than or equal to the preset number threshold; if a protocol that meets the preset access volume condition is found, a protocol of a preset internal type is searched among the protocols that meet the preset access volume condition; if a protocol of the internal type is found, the protocols that meet the preset access volume condition, excluding the protocols of the internal type, are determined as protocols in the subset of protocols to be processed.

3. The method according to claim 2, characterized in that, The step of searching for a preset internal type of protocol among protocols that meet the preset access volume conditions includes: Perform the following operations on each of the protocols that meet the preset access volume conditions, where each protocol performing the operations is the current protocol: If the matching criteria for the current protocol include a specified field corresponding to the protocol of the internal type, the current protocol is determined to be the protocol of the internal type.

4. The method according to claim 3, characterized in that, If the matching criteria for the current protocol include a specified field corresponding to a protocol of the internal type, then the current protocol is determined to be a protocol of the internal type, including at least one of the following: If the current protocol is a protocol in a proto file, and the matching conditions for the current protocol include a package name field containing the string "internal", then the current protocol is determined to be a protocol of the internal type, wherein the specified field corresponding to the protocol of the internal type includes the package name field; If the current protocol is a protocol in a PHP file, and the matching conditions for the current protocol include a method name field prefixed with an underscore, then the current protocol is determined to be a protocol of the internal type, wherein the specified field corresponding to the protocol of the internal type includes the method name field.

5. The method according to claim 1, characterized in that, The step of determining the protocol corresponding to each URL in the URL set based on the matching conditions of each protocol in the preset target protocol set includes: Perform the following operation on each URL in the URL set, where each URL is the current URL when the operation is performed: Obtain the concatenation format of the current URL; The target protocol is searched in the preset set of target protocols, wherein the matching criteria of the target protocol correspond to the concatenation format of the current URL; If the target protocol is found, the target protocol is determined to be the protocol corresponding to the current URL.

6. The method according to claim 1, characterized in that, The step of obtaining the set of visited URLs from the access layer access log includes: The access logs of each of the multiple access layer machines are obtained to obtain multiple access logs. The access logs of each access layer machine include the URLs accessed within a preset time period. The multiple access layer machines are located in the same access layer. The URLs in the multiple access logs are determined as the URL set.

7. The method according to any one of claims 1 to 6, characterized in that, After identifying undetected protocols in the subset of protocols to be processed, the method further includes: The number of protocols appearing in the list of detected protocols is determined in the subset of protocols to be processed, wherein the list of detected protocols includes the detected protocols; The ratio of the determined number to the total number of protocols in the protocol subset to be processed is determined as the protocol detection coverage rate.

8. The method according to any one of claims 1 to 6, characterized in that, After identifying undetected protocols in the subset of protocols to be processed, the method further includes: Obtain the service corresponding to the undetected protocol; The services corresponding to the undetected protocols are detected, and the undetected protocols are updated to the detected protocols.

9. The method according to claim 8, characterized in that, After updating the undetected protocol to a detected protocol, the method further includes: If the service corresponding to the detected protocol obtained from the update fails, an alarm command is sent.

10. A network information processing device, characterized in that, include: The acquisition module is used to obtain the set of accessed Uniform Resource Locator (URLs) from the access layer access logs; The first determining module is used to determine the protocol corresponding to each URL in the URL set according to the matching conditions of each protocol in the preset target protocol set, and to obtain the number of URLs in the target protocol set that correspond to each protocol; The second determining module is used to determine a subset of protocols to be processed in the target protocol set, wherein the number of URLs corresponding to the protocols in the protocol subset to be processed in the URL set is greater than or equal to a preset number threshold. The third determining module is used to obtain a list of detected protocols and a list of protocols that do not need to be detected, wherein the list of detected protocols includes detected protocols and the list of protocols that do not need to be detected includes protocols that do not need to be detected; and to remove the protocols in the list of detected protocols and the protocols in the list of protocols that do not need to be detected from the subset of protocols to be processed, thereby obtaining undetected protocols.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program, when executed, performs the method according to any one of claims 1 to 9.

12. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method according to any one of claims 1 to 9.

13. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to execute the method described in any one of claims 1 to 9 through the computer program.