CN116781585A - Network information processing method and device, storage medium and electronic equipment - Google Patents

Network information processing method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN116781585A
CN116781585A CN202210225908.7A CN202210225908A CN116781585A CN 116781585 A CN116781585 A CN 116781585A CN 202210225908 A CN202210225908 A CN 202210225908A CN 116781585 A CN116781585 A CN 116781585A
Authority
CN
China
Prior art keywords
protocol
protocols
url
determining
preset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210225908.7A
Other languages
Chinese (zh)
Inventor
刘波
陈祖文
李亚飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202210225908.7A priority Critical patent/CN116781585A/en
Publication of CN116781585A publication Critical patent/CN116781585A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/18Protocol analysers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]

Abstract

The invention discloses a network information processing method and device, a storage medium and electronic equipment. Wherein the method comprises the following steps: acquiring an accessed Uniform Resource Locator (URL) set from an access layer access log; determining a protocol corresponding to each URL in a URL set according to a preset matching condition of each protocol in the target protocol set, and acquiring the number of the URLs corresponding to each protocol in the target protocol set; determining a protocol subset to be processed in a target protocol set; an undetected protocol is determined among the subset of protocols to be processed. The method and the device solve the technical problem that the undetected protocol in the background service cannot be determined in the prior art.

Description

Network information processing method and device, storage medium and electronic equipment
Technical Field
The present invention relates to the field of computers, and in particular, to a network information processing method and apparatus, a storage medium, and an electronic device.
Background
In the related art, the stability of the service depends on the stability of the background service, and background service protocol detection is an important means for improving the stability and usability of the service. When the background service fails, the fault is automatically perceived through detection of a service protocol.
Background services detected by service protocols need to be covered with service protocols as much as possible, however, the background services generally have a plurality of service protocols, and each service protocol is difficult to detect. The related art cannot determine an undetected protocol in the background service.
In view of the above problems, no effective solution has been proposed at present.
Disclosure of Invention
The embodiment of the invention provides a network information processing method and device, a storage medium and electronic equipment, which at least solve the technical problem that undetected protocols in background service cannot be determined in the prior art.
According to an aspect of an embodiment of the present invention, there is provided a network information processing method including: acquiring an accessed Uniform Resource Locator (URL) set from an access layer access log; determining a protocol corresponding to each URL in a URL set according to a preset matching condition of each protocol in a target protocol set, and acquiring 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, 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; and determining undetected protocols in the protocol subset to be processed.
Optionally, determining a subset of protocols to be processed in the target protocol set includes: searching a protocol meeting a preset access amount condition in the target protocol set, wherein the number of URLs corresponding to the protocol meeting the preset access amount condition in the URL set is larger than or equal to the preset number threshold; under the condition that the protocol meeting the preset access quantity condition is found, determining the found protocol meeting the preset access quantity condition as the protocol in the protocol subset to be processed; or searching a protocol meeting a preset access amount condition in the target protocol set, wherein the number of URLs corresponding to the protocol meeting the preset access amount condition in the URL set is greater than or equal to the preset number threshold; under the condition that the protocol meeting the preset access quantity condition is found, searching a protocol of a preset internal type in the protocol meeting the preset access quantity condition; and under the condition that the protocol of the internal type is found, determining the protocols except the protocol of the internal type in the protocols meeting the preset access quantity condition as the protocols in the protocol subset to be processed.
Optionally, the searching a preset internal type of protocol in the protocols meeting the preset access quantity condition includes: executing the following operations on each protocol in the protocols meeting the preset access quantity condition, wherein each protocol in executing the following operations is a current protocol: and determining the current protocol as the internal type protocol in the case that the matching condition of the current protocol includes a specified field corresponding to the internal type protocol.
Optionally, in a case that the matching condition of the current protocol includes a specified field corresponding to the internal type of protocol, determining the current protocol as the internal type of protocol includes at least one of: determining the current protocol as the internal type protocol under the condition that the current protocol is a protocol in a proto file and the matching condition of the current protocol comprises a packet name field containing an internal character string, wherein a specified field corresponding to the internal type protocol comprises the packet name field; and determining the current protocol as the internal type protocol under the condition that the current protocol is a protocol in a PHP file and the matching condition of the current protocol comprises a method name field with an underlined prefix, wherein a specified field corresponding to the internal type protocol comprises the method name field.
Optionally, the determining, according to the matching condition of each protocol in the preset target protocol set, a protocol corresponding to each URL in the URL set includes: performing the following operation on each URL in the URL set, wherein each URL when performing the following operation is a current URL: acquiring the splicing format of the current URL; searching a target protocol in the preset target protocol set, wherein the matching condition of the target protocol corresponds to the splicing format of the current URL; and under the condition that the target protocol is found, determining the target protocol as the protocol corresponding to the current URL.
Optionally, the acquiring the accessed URL set in the access layer access log includes: obtaining access logs of each access layer machine in a plurality of access layer machines to obtain a plurality of access logs, wherein the access logs of each access layer machine comprise URL accessed within a preset time period, and the access layer machines are positioned on the same access layer; and determining the URLs in the access logs as the URL set.
Optionally, determining an undetected protocol in the subset of protocols to be processed includes: acquiring a detected protocol list and a protocol list which does not need to be detected, wherein the detected protocol list comprises detected protocols, and the protocol list which does not need to be detected comprises protocols which do not need to be detected; and removing the protocol in the detected protocol list and the protocol in the protocol list which does not need to be detected in the protocol subset to be processed, so as to obtain the undetected protocol.
Optionally, after determining the undetected protocol in the subset of protocols to be processed, the method further comprises: determining the number of the protocols in a detected protocol list from the protocol subset to be processed, wherein the detected protocol list comprises the detected protocols; and determining the ratio of the determined number to the total number of the protocols in the protocol subset to be processed as the protocol detection coverage rate.
Optionally, after determining the undetected protocol in the subset of protocols to be processed, the method further comprises: acquiring a service corresponding to the undetected protocol; and detecting the service corresponding to the undetected protocol, and updating the undetected protocol into the detected protocol.
Optionally, after the updating the undetected protocol to the detected protocol, the method further comprises: and sending an alarm instruction under the condition that the service corresponding to the detected protocol obtained by updating fails.
According to another aspect of the embodiment of the present invention, there is also provided a network information processing apparatus including: the acquisition module is used for acquiring the accessed URL set from the access log of the access layer; the first determining module is used for determining a protocol corresponding to each URL in the URL set according to a matching condition of each protocol in a preset target protocol set, and acquiring the number of the URLs corresponding to each protocol in the target protocol set; a second determining module, configured to determine a subset of protocols to be processed in the target protocol set, where the number of URLs corresponding to the protocols in the subset of protocols to be processed in the URL set is greater than or equal to a preset number threshold; and a third determining module, configured to determine an undetected protocol in the subset of protocols to be processed.
According to still another aspect of the embodiments of the present application, there is also provided a computer-readable storage medium having a computer program stored therein, wherein the computer program is configured to execute the above-described network information processing method when run.
According to yet another aspect of embodiments of the present application, there is provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions so that the computer device performs the network information processing method as above.
According to still another aspect of the embodiments of the present application, there is also provided an electronic device including a memory in which a computer program is stored, and a processor configured to execute the network information processing method described above by the computer program.
In the embodiment of the application, the protocol corresponding to each uniform resource locator URL in the access log of the access layer is determined according to the matching condition of each protocol in the preset target protocol set. Searching the protocols with the number of corresponding URLs being greater than or equal to a preset number threshold value in the target protocol set, and obtaining a protocol subset to be processed. An undetected protocol is determined among the subset of protocols to be processed. The method and the device achieve the purpose of determining the undetected protocol in the background service, and further solve the technical problem that the undetected protocol in the background service cannot be determined in the prior art.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
FIG. 1 is a schematic illustration of an application environment of an alternative network information processing method according to an embodiment of the present application;
FIG. 2 is a flow chart of an alternative network information processing method according to an embodiment of the application;
FIG. 3 is an alternative architecture diagram according to an embodiment of the present application;
FIG. 4 is an alternative flow chart according to an embodiment of the present application;
FIG. 5 is another alternative architecture diagram according to an embodiment of the present application;
FIG. 6 is another alternative flow chart according to an embodiment of the present application;
FIG. 7 is yet another alternative flow chart according to an embodiment of the present application;
FIG. 8 is a further alternative flow chart according to an embodiment of the present application;
fig. 9 is a schematic diagram of an alternative network information processing apparatus according to an embodiment of the present application;
FIG. 10 is a schematic diagram of an alternative electronic device according to an embodiment of the application;
FIG. 11 is a block diagram of a computer system of an alternative electronic device in accordance with an embodiment of the present application.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to an aspect of the embodiment of the present invention, there is provided a network information processing method, optionally, as an optional implementation manner, the network information processing method may be applied, but is not limited to, in an application environment as shown in fig. 1. The application environment includes a terminal device 101, a server 102 and a database 103.
Alternatively, in the present embodiment, the terminal device 101 may be a terminal device configured with a target client, and may include, but is not limited to, at least one of the following: a mobile phone (e.g., an Android mobile phone, iOS mobile phone, etc.), a notebook computer, a tablet computer, a palm computer, a MID (Mobile Internet Devices, mobile internet device), a PAD, a desktop computer, a smart television, etc. The target client may be a video client, an instant messaging client, a browser client, a game client, etc.
Alternatively, the network may include, but is not limited to: a wired network, a wireless network, wherein the wired network comprises: local area networks, metropolitan area networks, and wide area networks, the wireless network comprising: bluetooth, WIFI, and other networks that enable wireless communications.
Alternatively, the server 102 may be a single server, a server cluster including a plurality of servers, or a cloud server.
Optionally, the database 103 is used to store data, including but not limited to the access stratum access log, the matching condition of each protocol in the target protocol set, and the like.
The above is merely an example, and is not limited in any way in the present embodiment.
Optionally, as an optional embodiment, as shown in fig. 2, the network information processing method includes:
step S202, acquiring an accessed URL set from an access layer access log;
the access layer access log includes a uniform resource locator URL for accessing the access layer.
Step S204, determining a protocol corresponding to each URL in a URL set according to a matching condition of each protocol in a preset target protocol set, and acquiring the number of URLs corresponding to each protocol in the target protocol set;
all service protocols in use in the background service are included in the protocol in the target protocol set, and the matching condition of each protocol includes but is not limited to the splicing format of the URL corresponding to the protocol. And determining the protocol corresponding to the accessed URL according to the matching condition of the protocol.
Step S206, determining a protocol subset 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;
And determining the protocol to be processed in the target protocol set according to the number of URLs corresponding to each protocol, and obtaining a protocol subset to be processed. The number of URLs corresponding to the protocol to be processed is greater than or equal to the preset number threshold, and the preset number threshold may be determined according to practical situations, for example, may be 50, 80, 100, etc.
Step S208, determining an undetected protocol in the subset of protocols to be processed.
As an alternative embodiment, the architecture diagram shown in fig. 3 includes an access layer, an undetected protocol analysis system, a code repository, and a database. The undetected protocol analysis system acquires the accessed URL from the access layer access log acquired by the access layer to acquire a URL set. The matching condition of each protocol is analyzed from files in the code repository (e.g., proto file, PHP file). The undetected protocol analysis system determines the protocol corresponding to each URL in the URL set, counts the number of the URLs corresponding to each protocol, and selects the protocol with the number of the corresponding URLs being greater than or equal to a preset number threshold (which can be set according to practical situations, such as 100, 80, etc.) as the protocol to be processed, so as to obtain a protocol subset to be processed. The undetected protocol analysis system acquires a detected protocol list and an undetected protocol list from the database, and determines an undetected protocol in the protocol subset to be processed according to the detected protocol and the undetected protocol.
Optionally, determining a subset of protocols to be processed in the target protocol set includes: searching a protocol meeting a preset access amount condition in the target protocol set, wherein the number of URLs corresponding to the protocol meeting the preset access amount condition in the URL set is larger than or equal to the preset number threshold; under the condition that the protocol meeting the preset access quantity condition is found, determining the found protocol meeting the preset access quantity condition as the protocol in the protocol subset to be processed;
as an alternative embodiment, according to the service detection requirement, a protocol with a too small access amount does not need to be detected, and a part of protocols with a relatively small access amount are filtered out according to a preset number threshold. The above protocol meeting the preset access amount condition means that the access amount of the protocol is greater than or equal to a preset number threshold, that is, the number of URLs corresponding to the protocol is greater than or equal to the preset number threshold, where the preset number threshold may be determined according to practical situations, for example, 30, 50, 100, etc.
Or searching a protocol meeting a preset access amount condition in the target protocol set, wherein the number of URLs corresponding to the protocol meeting the preset access amount condition in the URL set is greater than or equal to the preset number threshold; under the condition that the protocol meeting the preset access quantity condition is found, searching a protocol of a preset internal type in the protocol meeting the preset access quantity condition; and under the condition that the protocol of the internal type is found, determining the protocols except the protocol of the internal type in the protocols meeting the preset access quantity condition as the protocols in the protocol subset to be processed.
As an alternative embodiment, protocols and internal protocols with too small an access need not be detected. Firstly, filtering out a part of protocols with smaller access quantity according to a preset quantity threshold value, and then filtering out internal protocols. The above protocol meeting the preset access amount condition refers to a protocol whose access amount is greater than or equal to a preset number threshold, that is, a protocol whose access amount is less than or equal to the preset number threshold is filtered out. The internal type of protocol is then filtered out of the remaining protocols.
As an optional implementation manner, or searching a preset internal type protocol in the target protocol set; under the condition that a preset internal type protocol is found, determining the protocols except the internal type protocol in the target protocol set as the protocols in an external protocol set; searching protocols meeting a preset access quantity condition in the external protocol set, wherein the number of URLs corresponding to the protocols meeting the preset access quantity condition in the external protocol set is larger than or equal to the preset number threshold; and under the condition that the protocol meeting the preset access quantity condition is found, determining the protocol meeting the preset access quantity condition as the protocol in the protocol subset to be processed.
As an alternative embodiment, protocols and internal protocols with too small an access need not be detected. The method comprises the steps of filtering out internal protocols, filtering out a part of protocols with smaller access quantity according to a preset quantity threshold, and filtering out the internal protocols. The above protocol meeting the preset access amount condition refers to a protocol whose access amount is greater than or equal to a preset number threshold, that is, a protocol whose access amount is less than or equal to the preset number threshold is filtered out.
Optionally, the searching a preset internal type of protocol in the protocols meeting the preset access quantity condition includes: executing the following operations on each protocol in the protocols meeting the preset access quantity condition, wherein each protocol in executing the following operations is a current protocol: and determining the current protocol as the internal type protocol in the case that the matching condition of the current protocol includes a specified field corresponding to the internal type protocol.
As an alternative embodiment, the proto file may be analyzed to obtain a protobuf definition protocol. PHP files under the controllers folder can be analyzed to obtain web type protocols. Analysis of the proto file and the PHP file may result in a matching condition of the internal type protocol including the specified field, e.g., analysis of the proto file may result in the protocol having the packet name of the internal field being the internal protocol. The method by which the PHP file is analyzed for an underlined prefix is called internal protocol. If the matching condition of the current protocol in the protocols meeting the preset access quantity condition comprises a packet name with an internal field or a method name with an underlined prefix, the current protocol is an internal type protocol, and the internal type protocol does not need to be detected and needs to be filtered.
Optionally, in a case that the matching condition of the current protocol includes a specified field corresponding to the internal type of protocol, determining the current protocol as the internal type of protocol includes at least one of: determining the current protocol as the internal type protocol under the condition that the current protocol is a protocol in a proto file and the matching condition of the current protocol comprises a packet name field containing an internal character string, wherein a specified field corresponding to the internal type protocol comprises the packet name field; and determining the current protocol as the internal type protocol under the condition that the current protocol is a protocol in a PHP file and the matching condition of the current protocol comprises a method name field with an underlined prefix, wherein a specified field corresponding to the internal type protocol comprises the method name field.
As an alternative embodiment, the specified fields include, but are not limited to, a packet name field and a method name field. In the flowchart shown in fig. 4, the proto file and the PHP file are analyzed to obtain an internal type protocol, and the internal type protocol is filtered to obtain a protocol to be processed.
The URL in the analysis proto file is formed by splicing three parts of package name, service name and interface name, and according to the specification defined by service protocol, the protocol with the internal package name field is an internal protocol. If the current protocol is a protocol in the proto file and the packet name field of the URL corresponding to the current protocol is included in the matching condition of the current protocol, the current protocol is an internal protocol, and detection is not required and filtering is required.
And analyzing the PHP file to obtain a web defined protocol, wherein the protocol url is formed by splicing formats of fixed prefix/class name/method name, and the prefix of the method name is underlined to be an internal protocol. If the current protocol is a protocol in the PHP file and the prefix of the method field including the URL corresponding to the current protocol in the matching condition of the current protocol is underlined, the current protocol is an internal protocol, and detection is not needed and filtering is needed.
Optionally, the determining, according to the matching condition of each protocol in the preset target protocol set, a protocol corresponding to each URL in the URL set includes: performing the following operation on each URL in the URL set, wherein each URL when performing the following operation is a current URL: acquiring the splicing format of the current URL; searching a target protocol in the preset target protocol set, wherein the matching condition of the target protocol corresponds to the splicing format of the current URL; and under the condition that the target protocol is found, determining the target protocol as the protocol corresponding to the current URL.
As an alternative embodiment, the protocol corresponding to the URL may be determined according to the matching condition of the protocol and the concatenation format of the URL. In particular, the proto file, PHP file may be analyzed.
The matching condition of the protocol in the proto file is that the URL corresponding to the protocol is formed by splicing three parts of package name, service name and interface name. If the current URL is formed by splicing package names, service names and interface names, the URL is a protocol in the proto file, and if the package names of the current URL contain internal, the URL is an internal type protocol in the proto file.
The matching condition in the PHP file is that the URL corresponding to the protocol is formed by format concatenation of fixed prefix/class name/method name. If the current URL is formed by format concatenation of package fixed prefix/class name/method name, the URL is a protocol in the PHP file, and if the prefix of the method name of the current URL is underlined, the URL is a protocol of an internal type in the proto file.
Optionally, the acquiring the accessed URL set in the access layer access log includes: obtaining access logs of each access layer machine in a plurality of access layer machines to obtain a plurality of access logs, wherein the access logs of each access layer machine comprise URL accessed within a preset time period, and the access layer machines are positioned on the same access layer; and determining the URLs in the access logs as the URL set.
As an alternative embodiment, in the system architecture diagram shown in fig. 5, the access layer includes a plurality of access layer machines, and a statistical calculator may be disposed on each access layer machine, where the statistical calculator is configured to access the URL of the access layer machine during a predetermined period of time for timing analysis (the predetermined period of time may be set according to practical situations, for example, 12 hours, 24 hours, etc.), to obtain an access log of the access layer machine. And aggregating the URLs in a plurality of access logs corresponding to the access layer machines to obtain the URL set.
As an alternative embodiment, each statistics calculator is further provided with an HTTP query interface. An analysis program is deployed on the undetected protocol analysis machine shown in fig. 5, and the analysis program can query the URL of the access layer machine from the HTTP query interface provided by the statistics calculator, and obtain the access log of the access layer machine. The undetected protocol analysis machine can also pull the latest business codes from the code warehouse, and can obtain the matching condition of each protocol by analyzing the proto file and the PHP file. And the undetected protocol analysis machine determines the protocol corresponding to each URL in the URL set according to the matching condition of each protocol, filters out the protocols with the number of corresponding URLs being smaller than or equal to a preset number threshold value, and obtains a protocol subset to be processed. The undetected protocol analysis machine may also obtain detected protocols and protocols that do not require detection from a database. Filtering detected protocols and protocols which do not need to be detected from the protocol subset to be processed, and obtaining undetected protocols. The undetected protocol analysis machine can also assemble undetected protocols into an undetected protocol list, send the mail of the undetected protocol list to staff, and then detect the undetected protocols in the undetected protocol list, so as to realize comprehensive detection of service protocols needing to be detected in background service.
As an alternative embodiment, as shown in the flowchart of fig. 6, a statistics calculator is deployed on the access layer machine, and the statistics calculator obtains a URL list for accessing the access layer in a preset duration by analyzing the access log of the access layer machine at fixed time, and writes the URL list into a local file.
A statistic calculator is deployed on each access layer machine of the access layer, access logs for accessing the access layer machine within a preset time period are counted regularly, and URLs for accessing the access layer machine within the preset time period are recorded in the access logs. Each access layer machine can be provided with a plurality of interfaces, the statistical calculator can acquire the access log of each interface on the access layer machine, as in the interface access log processing flow shown in fig. 7, the statistical calculator periodically acquires the access log file access.log of each interface, analyzes the access log according to the format of the access log, and calculates the URL of the access interface. The statistics calculator obtains the access log of each interface, analyzes the URL of each interface, calculates the request URL of the access layer machine as a URL list, stores the URL list in the local place, and provides HTTP interfaces for the data gatherer to obtain the access log of the access layer machine, wherein the access log of the access layer comprises the accessed URLs of a plurality of access layer machines in the access layer.
The statistics computer also provides a corresponding data interface for the data aggregator to obtain the access stratum machine access log. In the flowchart shown in fig. 8, the data aggregator is deployed on a specific machine to periodically obtain the access log of the access layer machine from the statistics calculator deployed on the access layer machine, and combine and deduplicate the access log to generate an access layer access log of the whole service, and write the access layer access log into a local file. A data interface is also provided for querying the accessed URL set.
Optionally, determining an undetected protocol in the subset of protocols to be processed includes: acquiring a detected protocol list and a protocol list which does not need to be detected, wherein the detected protocol list comprises detected protocols, and the protocol list which does not need to be detected comprises protocols which do not need to be detected; and removing the protocol in the detected protocol list and the protocol in the protocol list which does not need to be detected in the protocol subset to be processed, so as to obtain the undetected protocol.
As an alternative embodiment, a detected protocol list and a protocol list not needing to be detected are stored in the database, wherein the detected protocol is recorded in the detected protocol list, the protocol not needing to be detected is recorded in the protocol list not needing to be detected, and the detected protocol list and the protocol not needing to be detected are removed from the protocol subset to be processed, so that the undetected protocol is obtained.
Optionally, after determining the undetected protocol in the subset of protocols to be processed, the method further comprises: determining the number of the protocols in a detected protocol list from the protocol subset to be processed, wherein the detected protocol list comprises the detected protocols; and determining the ratio of the determined number to the total number of the protocols in the protocol subset to be processed as the protocol detection coverage rate.
As an alternative embodiment, the detection coverage rate is an index for measuring the detection integrity of the existing network service protocol, and refers to the ratio of the number of detected protocols to the total number of protocols in the protocol subset to be processed. In this embodiment, by adding access logs of the access layer as analysis data and combining with matching conditions of the protocol, undetected protocols in the access layer are accurately and automatically analyzed, so as to improve the detection coverage rate of the protocols.
Optionally, after determining the undetected protocol in the subset of protocols to be processed, the method further comprises: acquiring a service corresponding to the undetected protocol; and detecting the service corresponding to the undetected protocol, and updating the undetected protocol into the detected protocol.
As an optional implementation manner, after determining the undetected service protocol, detecting the service corresponding to the service protocol, converting the undetected protocol into a detected protocol, and recording the detected protocol in a detected protocol list.
Optionally, after the updating the undetected protocol to the detected protocol, the method further comprises: and sending an alarm instruction under the condition that the service corresponding to the detected protocol obtained by updating fails.
As an alternative implementation manner, the stability of the background service depends on the stability of the background service, and when the background service fails, the service protocol detection system actively senses the failure and alarms to the staff, and the staff processes and repairs the failure after receiving the alarm message. Background service detected by the service protocol detection system needs to cover the service protocols in use of the existing network as much as possible, and the existing network service protocols are numerous. By implementing and integrating the analysis report into the CI pipeline, the protocol interfaces which are not detected by analysis are automatically checked and analyzed periodically every day, and analysis reports are output.
It should be noted that, for simplicity of description, the foregoing method embodiments are all described as a series of acts, but it should be understood by those skilled in the art that the present invention is not limited by the order of acts described, as some steps may be performed in other orders or concurrently in accordance with the present invention. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required for the present invention.
According to another aspect of the embodiment of the present invention, there is also provided a network information processing apparatus for implementing the above network information processing method. As shown in fig. 9, the apparatus includes: an obtaining module 902, configured to obtain an accessed URL set in an access layer access log; a first determining module 904, configured to determine, according to a matching condition of each protocol in a preset target protocol set, a protocol corresponding to each URL in the URL set, and obtain a number of URLs corresponding to each protocol in the target protocol set; a second determining module 906, configured to determine a subset of protocols to be processed in the target protocol set, where a number of URLs corresponding to the protocols in the subset of protocols to be processed in the URL set is greater than or equal to a preset number threshold; a third determining module 908 is configured to determine an undetected protocol in the subset of protocols to be processed.
Optionally, the above device is further configured to search the target protocol set for a protocol that meets a preset access amount condition, where the number of URLs corresponding to the protocol that meets the preset access amount condition in the URL set is greater than or equal to the preset number threshold; under the condition that the protocol meeting the preset access quantity condition is found, determining the found protocol meeting the preset access quantity condition as the protocol in the protocol subset to be processed; searching a protocol meeting a preset access amount condition in the target protocol set, wherein the number of URLs corresponding to the protocol meeting the preset access amount condition in the URL set is larger than or equal to the preset number threshold; under the condition that the protocol meeting the preset access quantity condition is found, searching a protocol of a preset internal type in the protocol meeting the preset access quantity condition; and under the condition that the protocol of the internal type is found, determining the protocols except the protocol of the internal type in the protocols meeting the preset access quantity condition as the protocols in the protocol subset to be processed.
Optionally, the above apparatus is further configured to perform the following operation on each of the protocols that meet the preset access amount condition, where each protocol when performing the following operation is a current protocol: and determining the current protocol as the internal type protocol in the case that the matching condition of the current protocol includes a specified field corresponding to the internal type protocol.
Optionally, the above device is further configured to determine the current protocol as the internal type of protocol, where the specified field corresponding to the internal type of protocol includes the packet name field when the current protocol is a protocol in the proto file and the matching condition of the current protocol includes the packet name field including an internal character string; and determining the current protocol as the internal type protocol under the condition that the current protocol is a protocol in a PHP file and the matching condition of the current protocol comprises a method name field with an underlined prefix, wherein a specified field corresponding to the internal type protocol comprises the method name field.
Optionally, the above apparatus is further configured to perform the following operation on each URL in the URL set, where each URL when performing the following operation is a current URL: acquiring the splicing format of the current URL; searching a target protocol in the preset target protocol set, wherein the matching condition of the target protocol corresponds to the splicing format of the current URL; and under the condition that the target protocol is found, determining the target protocol as the protocol corresponding to the current URL.
Optionally, the device is further configured to obtain an access log of each access stratum machine in the multiple access stratum machines, to obtain multiple access logs, where the access log of each access stratum machine includes URLs visited within a preset duration, and the multiple access stratum machines are located in the same access stratum; and determining the URLs in the access logs as the URL set.
Optionally, the device is further configured to obtain a detected protocol list and a protocol list that does not need to be detected, where the detected protocol list includes a detected protocol, and the protocol list that does not need to be detected includes a protocol that does not need to be detected; and removing the protocol in the detected protocol list and the protocol in the protocol list which does not need to be detected in the protocol subset to be processed, so as to obtain the undetected protocol.
Optionally, the above device is further configured to determine, after determining an undetected protocol in the to-be-processed protocol subset, a number of protocols that appear in a detected protocol list in the to-be-processed protocol subset, where the detected protocol list includes the detected protocols; and determining the ratio of the determined number to the total number of the protocols in the protocol subset to be processed as the protocol detection coverage rate.
Optionally, the above device is further configured to obtain a service corresponding to an undetected protocol after determining the undetected protocol in the subset of protocols to be processed; and detecting the service corresponding to the undetected protocol, and updating the undetected protocol into the detected protocol.
Optionally, the device is further configured to send an alarm instruction when a service corresponding to the detected protocol obtained by updating is faulty after the undetected protocol is updated to the detected protocol.
According to still another aspect of the embodiment of the present invention, there is also provided an electronic device for implementing the above network information processing method, where the electronic device may be a terminal device or a server as shown in fig. 1. The present embodiment is described taking the electronic device as a server as an example. As shown in fig. 10, the electronic device comprises a memory 1002 and a processor 1004, the memory 1002 having stored therein a computer program, the processor 1004 being arranged to perform the steps of any of the method embodiments described above by means of the computer program.
Alternatively, in this embodiment, the electronic device may be located in at least one network device of a plurality of network devices of the computer network.
Alternatively, in the present embodiment, the above-described processor may be configured to execute the following steps by a computer program:
s1, acquiring an accessed uniform resource locator URL set from an access layer access log;
s2, determining a protocol corresponding to each URL in a URL set according to a preset matching condition of each protocol in a target protocol set, and acquiring the number of URLs corresponding to each protocol in the target protocol set;
s3, determining a protocol subset 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;
s4, determining undetected protocols in the protocol subset to be processed.
Alternatively, as will be appreciated by those skilled in the art, the structure shown in fig. 10 is merely illustrative, and the electronic device may be a smart phone (such as an Android mobile phone, an iOS mobile phone, etc.), a tablet computer, a palmtop computer, a mobile internet device (Mobile Internet Devices, MID), a PAD, or other terminal devices. Fig. 10 is not limited to the structure of the electronic device and the electronic apparatus described above. For example, the electronics may also include more or fewer components (e.g., network interfaces, etc.) than shown in FIG. 10, or have a different configuration than shown in FIG. 10.
The memory 1002 may be configured to store software programs and modules, such as program instructions/modules corresponding to the network information processing methods and apparatuses in the embodiments of the present invention, and the processor 1004 executes the software programs and modules stored in the memory 1002 to perform various functional applications and data processing, that is, implement the network information processing methods described above. 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 examples, the memory 1002 may further include memory located remotely from the processor 1004, which may be connected to the terminal via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof. The memory 1002 may be, but is not limited to, storing information such as access stratum access logs. As an example, as shown in fig. 10, the memory 1002 may include, but is not limited to, the acquiring module 902, the first determining module 904, the second determining module 906, and the third determining module 908 in the network information processing device. In addition, other module units in the network information processing apparatus may be included, but are not limited to, and are not described in detail in this example.
Optionally, the transmission device 1006 is configured to receive or transmit data via a network. Specific examples of the network described above may include wired networks and wireless networks. In one example, the transmission means 1006 includes a network adapter (Network Interface Controller, NIC) that can be connected to other network devices and routers via a network cable to communicate with the internet or a local area network. In one example, the transmission device 1006 is a Radio Frequency (RF) module for communicating with the internet wirelessly.
In addition, the electronic device further includes: a display 1008 for displaying the undetected protocol; and a connection bus 1010 for connecting the respective module parts in the above-described electronic apparatus.
In other embodiments, the terminal device or the server may be a node in a distributed system, where the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting the plurality of nodes through a network communication. Among them, the nodes may form a Peer-To-Peer (P2P) network, and any type of computing device, such as a server, a terminal, etc., may become a node in the blockchain system by joining the Peer-To-Peer network.
According to one aspect of the present application, there is provided a computer program product comprising a computer program/instruction containing program code for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication portion 1109, and/or installed from the removable media 1111. When executed by the central processor 1101, performs the various functions provided by the embodiments of the present application.
The foregoing embodiment numbers of the present application are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
Fig. 11 schematically shows a block diagram of a computer system of an electronic device for implementing an embodiment of the application.
It should be noted that, the computer system 1100 of the electronic device shown in fig. 11 is only an example, and should not impose any limitation on the functions and the application scope of the embodiments of the present application.
As shown in fig. 11, the computer system 1100 includes a central processing unit 1101 (Central Processing Unit, CPU) that can execute various appropriate actions and processes according to a program stored in a Read-Only Memory 1102 (ROM) or a program loaded from a storage section 1108 into a random access Memory 1103 (Random Access Memory, RAM). In the random access memory 1103, various programs and data necessary for the system operation are also stored. The cpu 1101, the rom 1102, and the ram 1103 are connected to each other via a bus 1104. An Input/Output interface 1105 (i.e., an I/O interface) is also connected to bus 1104.
The following components are connected to the input/output interface 1105: an input section 1106 including a keyboard, a mouse, and the like; an output portion 1107 including a Cathode Ray Tube (CRT), a liquid crystal display (Liquid Crystal Display, LCD), and a speaker; a storage section 1108 including a hard disk or the like; and a communication section 1109 including a network interface card such as a local area network card, a modem, and the like. The communication section 1109 performs communication processing via a network such as the internet. The drive 1110 is also connected to the input/output interface 1105 as needed. Removable media 1111, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like, is installed as needed in drive 1110, so that a computer program read therefrom is installed as needed in storage section 1108.
In particular, the processes described in the various method flowcharts may be implemented as computer software programs according to embodiments of the application. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from a network via the communication portion 1109, and/or installed from the removable media 1111. The computer programs, when executed by the central processor 1101, perform the various functions defined in the system of the present application.
According to one aspect of the present application, there is provided a computer-readable storage medium, from which a processor of a computer device reads the computer instructions, the processor executing the computer instructions, causing the computer device to perform the methods provided in the various alternative implementations described above.
Alternatively, in the present embodiment, the above-described computer-readable storage medium may be configured to store a computer program for performing the steps of:
s1, acquiring an accessed uniform resource locator URL set from an access layer access log;
s2, determining a protocol corresponding to each URL in a URL set according to a preset matching condition of each protocol in a target protocol set, and acquiring the number of URLs corresponding to each protocol in the target protocol set;
s3, determining a protocol subset 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;
s4, determining undetected protocols in the protocol subset to be processed.
Alternatively, in this embodiment, it will be understood by those skilled in the art that all or part of the steps in the methods of the above embodiments may be performed by a program for instructing a terminal device to execute the steps, where the program may be stored in a computer readable storage medium, and the storage medium may include: flash disk, read-Only Memory (ROM), random-access Memory (Random Access Memory, RAM), magnetic or optical disk, and the like.
The integrated units in the above embodiments may be stored in the above-described computer-readable storage medium if implemented in the form of software functional units and sold or used as separate products. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, comprising several instructions for causing one or more computer devices (which may be personal computers, servers or network devices, etc.) to perform all or part of the steps of the method described in the embodiments of the present application.
In the foregoing embodiments of the present application, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In several embodiments provided by the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of the units, such as the division of the units, is merely a logical function division, and may be implemented in another manner, for example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The foregoing is merely a preferred embodiment of the present invention and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present invention, which are intended to be comprehended within the scope of the present invention.

Claims (14)

1. A network information processing method, comprising:
acquiring an accessed Uniform Resource Locator (URL) set from an access layer access log;
Determining a protocol corresponding to each URL in a URL set according to a preset matching condition of each protocol in a target protocol set, and acquiring 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, 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;
and determining undetected protocols in the protocol subset to be processed.
2. The method of claim 1, wherein determining a subset of protocols to be processed in the set of target protocols comprises:
searching a protocol meeting a preset access amount condition in the target protocol set, wherein the number of URLs corresponding to the protocol meeting the preset access amount condition in the URL set is larger than or equal to the preset number threshold; under the condition that the protocol meeting the preset access quantity condition is found, determining the found protocol meeting the preset access quantity condition as the protocol in the protocol subset to be processed; or alternatively
Searching a protocol meeting a preset access amount condition in the target protocol set, wherein the number of URLs corresponding to the protocol meeting the preset access amount condition in the URL set is larger than or equal to the preset number threshold; under the condition that the protocol meeting the preset access quantity condition is found, searching a protocol of a preset internal type in the protocol meeting the preset access quantity condition; and under the condition that the protocol of the internal type is found, determining the protocols except the protocol of the internal type in the protocols meeting the preset access quantity condition as the protocols in the protocol subset to be processed.
3. The method according to claim 2, wherein searching for a preset internal type of protocol among the protocols satisfying the preset access amount condition includes:
executing the following operations on each protocol in the protocols meeting the preset access quantity condition, wherein each protocol in executing the following operations is a current protocol:
and determining the current protocol as the internal type protocol in the case that the matching condition of the current protocol includes a specified field corresponding to the internal type protocol.
4. A method according to claim 3, wherein, in case the matching condition of the current protocol comprises a specified field corresponding to the protocol of the internal type, determining the current protocol as the protocol of the internal type comprises at least one of:
determining the current protocol as the internal type protocol under the condition that the current protocol is a protocol in a proto file and the matching condition of the current protocol comprises a packet name field containing an internal character string, wherein a specified field corresponding to the internal type protocol comprises the packet name field;
and determining the current protocol as the internal type protocol under the condition that the current protocol is a protocol in a PHP file and the matching condition of the current protocol comprises a method name field with an underlined prefix, wherein a specified field corresponding to the internal type protocol comprises the method name field.
5. The method according to claim 1, wherein the determining, according to the matching condition of each protocol in the preset target protocol set, the protocol corresponding to each URL in the URL set includes:
performing the following operation on each URL in the URL set, wherein each URL when performing the following operation is a current URL:
acquiring the splicing format of the current URL;
searching a target protocol in the preset target protocol set, wherein the matching condition of the target protocol corresponds to the splicing format of the current URL;
and under the condition that the target protocol is found, determining the target protocol as the protocol corresponding to the current URL.
6. The method of claim 1, wherein the obtaining the accessed URL sets in the access stratum access log comprises:
obtaining access logs of each access layer machine in a plurality of access layer machines to obtain a plurality of access logs, wherein the access logs of each access layer machine comprise URL accessed within a preset time period, and the access layer machines are positioned on the same access layer;
and determining the URLs in the access logs as the URL set.
7. The method of claim 1, wherein determining an undetected protocol in the subset of protocols to be processed comprises:
acquiring a detected protocol list and a protocol list which does not need to be detected, wherein the detected protocol list comprises detected protocols, and the protocol list which does not need to be detected comprises protocols which do not need to be detected;
and removing the protocol in the detected protocol list and the protocol in the protocol list which does not need to be detected in the protocol subset to be processed, so as to obtain the undetected protocol.
8. The method according to any of claims 1 to 7, wherein after determining undetected protocols in the subset of protocols to be processed, the method further comprises:
determining the number of the protocols in a detected protocol list from the protocol subset to be processed, wherein the detected protocol list comprises the detected protocols;
and determining the ratio of the determined number to the total number of the protocols in the protocol subset to be processed as the protocol detection coverage rate.
9. The method according to any of claims 1 to 7, wherein after determining undetected protocols in the subset of protocols to be processed, the method further comprises:
Acquiring a service corresponding to the undetected protocol;
and detecting the service corresponding to the undetected protocol, and updating the undetected protocol into the detected protocol.
10. The method of claim 9, wherein after said updating the undetected protocol to a detected protocol, the method further comprises:
and sending an alarm instruction under the condition that the service corresponding to the detected protocol obtained by updating fails.
11. A network information processing apparatus, comprising:
the acquisition module is used for acquiring the accessed URL set from the access log of the access layer;
the first determining module is used for determining a protocol corresponding to each URL in the URL set according to a matching condition of each protocol in a preset target protocol set, and acquiring the number of the URLs corresponding to each protocol in the target protocol set;
a second determining module, configured to determine a subset of protocols to be processed in the target protocol set, where the number of URLs corresponding to the protocols in the subset of protocols to be processed in the URL set is greater than or equal to a preset number threshold;
And a third determining module, configured to determine an undetected protocol in the subset of protocols to be processed.
12. A computer readable storage medium, characterized in that the computer readable storage medium comprises a stored program, wherein the program when run performs the method of any one of claims 1 to 10.
13. A computer program product comprising computer programs/instructions which, when executed by a processor, implement the steps of the method of any one of claims 1 to 10.
14. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method according to any of the claims 1 to 10 by means of the computer program.
CN202210225908.7A 2022-03-07 2022-03-07 Network information processing method and device, storage medium and electronic equipment Pending CN116781585A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210225908.7A CN116781585A (en) 2022-03-07 2022-03-07 Network information processing method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210225908.7A CN116781585A (en) 2022-03-07 2022-03-07 Network information processing method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN116781585A true CN116781585A (en) 2023-09-19

Family

ID=87995046

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210225908.7A Pending CN116781585A (en) 2022-03-07 2022-03-07 Network information processing method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN116781585A (en)

Similar Documents

Publication Publication Date Title
US20210342337A1 (en) Dynamically monitoring an information technology networked entity
CN111522922B (en) Log information query method and device, storage medium and computer equipment
CN111831548B (en) Dependency relationship topological graph drawing method and device
US11144376B2 (en) Veto-based model for measuring product health
KR20070083389A (en) Interferring server state in a stateless communication protocol
CN103428042A (en) Method and system for carrying out stress test on server
CN110932918B (en) Log data acquisition method and device and storage medium
US11188443B2 (en) Method, apparatus and system for processing log data
KR101443071B1 (en) Error Check System of Webpage
US11663172B2 (en) Cascading payload replication
US11301475B1 (en) Transmission handling of analytics query response
CN110928934A (en) Data processing method and device for business analysis
CN109039787A (en) log processing method, device and big data cluster
CN105553770B (en) Data acquisition control method and device
CN115705190A (en) Method and device for determining dependence degree
US9645877B2 (en) Monitoring apparatus, monitoring method, and recording medium
CN110442439B (en) Task process processing method and device and computer equipment
CN112130944A (en) Page abnormity detection method, device, equipment and storage medium
CN116781585A (en) Network information processing method and device, storage medium and electronic equipment
KR20210000041A (en) Method and apparatus for analyzing log data in real time
CN115185778A (en) Database monitoring method and device
US20140337069A1 (en) Deriving business transactions from web logs
CN110119334A (en) A kind of page script monitoring method and device
CN109634931B (en) Log uploading method and device
CN111078975B (en) Multi-node incremental data acquisition system and acquisition method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination