A method for managing protocol data and related apparatus
By automating the processing of network protocol data and extracting and generating database tables based on preset rules, the problem of time-consuming and labor-intensive manual management is solved, and efficient protocol data management is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2021-03-31
- Publication Date
- 2026-08-04
AI Technical Summary
In existing technologies, manually managing massive amounts of network protocol data is time-consuming and labor-intensive, and cannot be processed one by one, resulting in missing protocol features and affecting the accuracy and effectiveness of network protocol management.
By acquiring protocol data from the target database, extracting protocol fields based on preset rules, generating a database definition language and constructing database tables, parsing and populating them, and using business data tables for parameter statistics, automated management is achieved.
It improves the accuracy and effectiveness of network protocol management, reduces data interference, and enables rapid response to massive protocol management needs.
Smart Images

Figure CN115145910B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method and apparatus for managing protocol data. Background Technology
[0002] Given the need for risk control analysis of massive amounts of business data, it is essential to transmit business data to the risk control system. Therefore, the Hypertext Transfer Protocol (HTTP) is used to transmit this massive amount of production data to the risk control system for storage. HTTP is the most widely used network protocol on the Internet. All Internet files must adhere to this standard.
[0003] Generally, technical personnel can understand the fields of different business agreement data and manually create tables in the database based on the agreement data fields, and then conduct quality management or monitoring based on the information created in the database tables.
[0004] However, due to the diversity of network protocol characteristics, the process of managing them manually is time-consuming and labor-intensive. Furthermore, in scenarios involving the management of massive amounts of network protocol input, it is impossible to process each protocol individually, resulting in the loss of protocol characteristics and affecting the accuracy and effectiveness of network protocol management. Summary of the Invention
[0005] In view of this, this application provides a method for managing protocol data, which can effectively improve the accuracy of network protocol management.
[0006] The first aspect of this application provides a method for managing protocol data, which can be applied to a system or program in a terminal device that includes protocol data management functions, specifically including:
[0007] Retrieve protocol data from the target database that is associated with multiple services;
[0008] The protocol data is extracted based on preset rules to obtain the protocol fields corresponding to each service. The preset rules are set based on the feature identifiers corresponding to different services.
[0009] The database definition language is obtained by concatenating the protocol fields, and the database tables corresponding to each business are generated based on the database definition language.
[0010] The database operation language corresponding to the database table is determined so as to parse the protocol data to obtain business data, and the database table is populated based on the business data to obtain the business data table corresponding to each business.
[0011] Parameter statistics are performed based on the feature items in the business data table corresponding to each business, so as to perform corresponding management operations on each business.
[0012] Optionally, in some possible implementations of this application, obtaining protocol data associated with multiple services in the target database includes:
[0013] Obtain the summary data table obtained from the target database based on data transmission statistics;
[0014] Determine the indicator business code in the summary data table;
[0015] Based on the business code, business identification is performed to determine the protocol data corresponding to each business.
[0016] Optionally, in some possible implementations of this application, the method further includes:
[0017] Receive and process the transmitted data generated during the execution of the service;
[0018] Determine the processing code corresponding to the processing service;
[0019] Based on the processing code, the corresponding statistical items are determined in the summary data table, and the statistical items are updated based on the transmitted data.
[0020] Optionally, in some possible implementations of this application, the step of extracting data from the protocol data based on preset rules to obtain the protocol fields corresponding to each service includes:
[0021] Based on the preset rules, the feature identifiers corresponding to each business are determined;
[0022] The protocol data is split according to the feature identifier to obtain split data;
[0023] Regular expressions are used to extract data from the split data to obtain the protocol fields corresponding to each business.
[0024] Optionally, in some possible implementations of this application, the method further includes:
[0025] Determine the statistical method for the items corresponding to the database table;
[0026] The arrangement of the protocol fields is updated based on the project statistics method to ensure that the protocol fields match the database table.
[0027] Optionally, in some possible implementations of this application, the step of concatenating the protocol fields to obtain the database definition language, and generating database tables corresponding to each business based on the database definition language, includes:
[0028] Obtain the standardized input format and the configuration statement corresponding to the target database;
[0029] The protocol fields extracted from the configuration statement are concatenated based on the input format to obtain the database definition language;
[0030] Generate database tables corresponding to each business based on the database definition language.
[0031] Optionally, in some possible implementations of this application, the step of determining the database operation language corresponding to the database table, parsing the protocol data to obtain business data, and populating the database table based on the business data to obtain a business data table corresponding to each business includes:
[0032] Determine the structure information corresponding to the database table, and obtain the database operation language based on the structure information;
[0033] The protocol data is input into the decoder using the database operation language to obtain the service data;
[0034] Determine the business information corresponding to the business data;
[0035] Based on the business information, determine the business items in the database table;
[0036] The business data is used to populate the business items to obtain the business data table corresponding to each business.
[0037] Optionally, in some possible implementations of this application, the step of performing parameter statistics based on the feature items in the business data table corresponding to each business to perform corresponding management operations on each business includes:
[0038] Determine the total number of fields for the feature items in the business data table corresponding to each business;
[0039] Detect the number of missing values for the feature items in the business data table;
[0040] The missing rate is determined based on the number of missing items and the total number of fields, so as to perform corresponding management operations on each business.
[0041] Optionally, in some possible implementations of this application, the step of determining the missing rate based on the number of missing items and the total number of fields to perform corresponding management operations on each business includes:
[0042] The missing rate is determined based on the number of missing items and the total number of fields.
[0043] Determine the threshold information corresponding to each business;
[0044] The threshold information is compared with the missing rate corresponding to each business to perform corresponding management operations on each business.
[0045] Optionally, in some possible implementations of this application, the step of extracting data from the protocol data based on preset rules to obtain the protocol fields corresponding to each service includes:
[0046] The protocol data is extracted based on preset rules to obtain the protocol fields corresponding to each service.
[0047] Configure field identifiers for the protocol fields;
[0048] The step of determining the database operation language corresponding to the database table, parsing the protocol data to obtain business data, and populating the database table based on the business data to obtain a business data table corresponding to each business includes:
[0049] Determine the database operation language corresponding to the database table in order to extract the field identifier from the protocol data;
[0050] Data is located based on the field identifier in order to parse and obtain the business data;
[0051] The database tables are populated with the business data to obtain the business data tables corresponding to each business.
[0052] Optionally, in some possible implementations of this application, the method further includes:
[0053] Obtain reference business data;
[0054] Extract the reference value corresponding to the reference business data based on the protocol fields;
[0055] The business data tables are traversed based on the reference values to identify risky businesses in the target database.
[0056] Optionally, in some possible implementations of this application, the step of performing parameter statistics based on the feature items in the business data table corresponding to each business to perform corresponding management operations on each business includes:
[0057] Determine the feature set in the business data table corresponding to each business;
[0058] Obtain the reference values corresponding to the feature items contained in the feature set;
[0059] The parameter comparison results are obtained by comparing the reference values with the feature items contained in the feature set.
[0060] Abnormal services are identified based on the parameter comparison results, and corresponding management operations are performed.
[0061] Optionally, in some possible implementations of this application, the method further includes:
[0062] Retrieve historical management data corresponding to each business;
[0063] Determine the probability of anomalies in the feature items in the historical management data;
[0064] The feature items contained in the feature set are weighted based on the anomaly probability to obtain a weighted feature value;
[0065] Based on the weighted feature values, corresponding management operations are performed on each business.
[0066] Optionally, in some possible implementations of this application, the method further includes:
[0067] Anomalies are identified during the process of extracting feature items from the business data table for parameter statistics.
[0068] The abnormal items are marked to determine the characteristic marker items;
[0069] Based on the feature markers, the protocol data is extracted to obtain the feature fields corresponding to each service;
[0070] Based on the aforementioned feature fields, generate feature data tables corresponding to each business;
[0071] Based on the feature items in the feature data table corresponding to each business, parameter statistics are performed to conduct corresponding management operations for each business.
[0072] Optionally, in some possible implementations of this application, the protocol data is Hypertext Transfer Protocol data, the target database stores the Hypertext Transfer Protocol data in a distributed manner, and the database definition language is obtained by combining Python and SQL statements.
[0073] A second aspect of this application provides a protocol data management device, comprising:
[0074] The acquisition unit is used to acquire protocol data associated with multiple services in the target database;
[0075] The extraction unit is used to extract data from the protocol data based on preset rules to obtain the protocol fields corresponding to each service. The preset rules are set based on the feature identifiers corresponding to different services.
[0076] The determining unit is used to concatenate the protocol fields to obtain the database definition language, and generate the database tables corresponding to each business based on the database definition language;
[0077] The determining unit is further configured to determine the database operation language corresponding to the database table, so as to parse the protocol data to obtain business data, and fill the database table based on the business data to obtain a business data table corresponding to each business.
[0078] The management unit is used to perform parameter statistics based on the feature items in the business data table corresponding to each business, so as to perform corresponding management operations on each business.
[0079] Optionally, in some possible implementations of this application, the acquisition unit is specifically used to acquire a summary data table obtained from the target database based on data transmission statistics;
[0080] The acquisition unit is specifically used to determine the indication business code in the summary data table;
[0081] The acquisition unit is specifically used to identify services based on the service code in order to determine the protocol data corresponding to each service.
[0082] Optionally, in some possible implementations of this application, the acquisition unit is specifically used to receive transmission data generated during the execution of the processing service;
[0083] The acquisition unit is specifically used to determine the processing code corresponding to the processing service.
[0084] The acquisition unit is specifically used to determine the corresponding statistical items in the summary data table based on the processing code, and to update the statistical items based on the transmitted data.
[0085] Optionally, in some possible implementations of this application, the extraction unit is specifically used to determine the feature identifier corresponding to each business based on the preset rules;
[0086] The extraction unit is specifically used to split the protocol data according to the feature identifier to obtain split data;
[0087] The extraction unit is specifically used to call regular expressions to extract data from the split data in order to obtain the protocol fields corresponding to each service.
[0088] Optionally, in some possible implementations of this application, the extraction unit is specifically used to determine the statistical method of the items corresponding to the database table;
[0089] The extraction unit is specifically used to update the arrangement of the protocol fields based on the project statistics method, so that the protocol fields match the database table.
[0090] Optionally, in some possible implementations of this application, the determining unit is specifically used to obtain a standardized input format and the configuration statement corresponding to the target database;
[0091] The determining unit is specifically used to concatenate the protocol fields extracted based on the configuration statement according to the input format to obtain the database definition language;
[0092] The determining unit is specifically used to generate database tables corresponding to each business based on the database definition language.
[0093] Optionally, in some possible implementations of this application, the determining unit is specifically used to determine the structural information corresponding to the database table, and to obtain the database operation language based on the structural information;
[0094] The determining unit is specifically used to input the protocol data into the decoder through the database operation language to obtain the service data;
[0095] The determining unit is specifically used to determine the business information corresponding to the business data;
[0096] The determining unit is specifically used to determine the business items in the database table based on the business information;
[0097] The determining unit is specifically used to fill in the business items according to the business data to obtain the business data table corresponding to each business.
[0098] Optionally, in some possible implementations of this application, the management unit is specifically used to determine the total number of fields of the feature items in the business data table corresponding to each business;
[0099] The management unit is specifically used to detect the number of missing values corresponding to feature items in the business data table.
[0100] The management unit is specifically used to determine the missing rate based on the number of missing items and the total number of fields, so as to perform corresponding management operations on each business.
[0101] Optionally, in some possible implementations of this application, the management unit is specifically used to determine the missing rate based on the number of missing items and the total number of fields;
[0102] The management unit is specifically used to determine the threshold information corresponding to each business.
[0103] The management unit is specifically used to compare the threshold information with the missing rate corresponding to each business, so as to perform corresponding management operations on each business.
[0104] Optionally, in some possible implementations of this application, the extraction unit is specifically used to extract data from the protocol data based on preset rules to obtain the protocol fields corresponding to each service.
[0105] The extraction unit is specifically used to configure field identifiers for the protocol fields;
[0106] The determining unit is specifically used to determine the database operation language corresponding to the database table in order to extract the field identifier from the protocol data;
[0107] The determining unit is specifically used to locate data based on the field identifier in order to parse and obtain the business data;
[0108] The determining unit is specifically used to populate the database table based on the business data to obtain the business data table corresponding to each business.
[0109] Optionally, in some possible implementations of this application, the management unit is specifically used to acquire reference business data;
[0110] The management unit is specifically used to extract the reference value corresponding to the reference business data based on the protocol field.
[0111] The management unit is specifically used to traverse the business data table based on the reference value to determine the risky business in the target database.
[0112] Optionally, in some possible implementations of this application, the management unit is specifically used to determine the feature set in the business data table corresponding to each business;
[0113] The management unit is specifically used to obtain the reference values corresponding to the feature items contained in the feature set;
[0114] The management unit is specifically used to compare the reference value with the feature items contained in the feature set to obtain the parameter comparison result;
[0115] The management unit is specifically used to determine abnormal services based on the parameter comparison results, so as to perform corresponding management operations.
[0116] Optionally, in some possible implementations of this application, the management unit is specifically used to call the historical management data corresponding to each business;
[0117] The management unit is specifically used to determine the probability of anomalies in the feature items in the historical management data;
[0118] The management unit is specifically used to perform weighted calculations on the feature items contained in the feature set based on the anomaly probability to obtain weighted feature values;
[0119] The management unit is specifically used to perform corresponding management operations on each business based on the weighted feature value.
[0120] Optionally, in some possible implementations of this application, the management unit is specifically used to extract abnormal items from the feature items in the business data table during the parameter statistics process;
[0121] The management unit is specifically used to mark the abnormal items in order to determine the feature marker items;
[0122] The management unit is specifically used to extract data from the protocol data based on the feature markers to obtain the feature fields corresponding to each service.
[0123] The management unit is specifically used to generate feature data tables corresponding to each business based on the feature fields;
[0124] The management unit is specifically used to perform parameter statistics based on the feature items in the feature data table corresponding to each business, so as to perform corresponding management operations on each business.
[0125] A third aspect of this application provides a computer device, comprising: a memory, a processor, and a bus system; the memory is used to store program code; the processor is used to execute the protocol data management method described in the first aspect or any one of the first aspects according to the instructions in the program code.
[0126] A fourth aspect of this application provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the protocol data management method described in the first aspect or any one of the first aspects.
[0127] According to one aspect of this application, a computer program product or computer program is provided, comprising 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 protocol data management method provided in the first aspect or various optional implementations thereof.
[0128] As can be seen from the above technical solutions, the embodiments of this application have the following advantages:
[0129] This process involves acquiring protocol data associated with multiple services from the target database; then extracting the protocol data based on preset rules (defined by characteristic identifiers corresponding to different services) to obtain the protocol fields for each service; concatenating these protocol fields to obtain a database definition language (DBM), and generating database tables for each service based on this DBM; further determining the database operation language for each database table to parse the protocol data into service data; and populating the database tables with this service data to obtain service data tables for each service; finally, performing parameter statistics based on the feature items in each service data table to perform corresponding management operations for each service. This achieves automatic parsing and management of network protocols. Because separate tables are created and stored for each service, data interference is reduced, and the entire process is script-based, enabling rapid response to and fulfillment of management needs for massive amounts of network protocols, thus improving the accuracy and effectiveness of network protocol management. Attached Figure Description
[0130] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0131] Figure 1 Network architecture diagram for the management system operating the protocol data;
[0132] Figure 2 A flowchart illustrating the management process of protocol data is provided for embodiments of this application.
[0133] Figure 3 A flowchart illustrating a method for managing protocol data provided in an embodiment of this application;
[0134] Figure 4A flowchart illustrating another method for managing protocol data provided in this application embodiment;
[0135] Figure 5 A schematic diagram illustrating a method for managing protocol data provided in an embodiment of this application;
[0136] Figure 6 A schematic diagram illustrating a scenario for another protocol data management method provided in an embodiment of this application;
[0137] Figure 7 A flowchart illustrating another method for managing protocol data provided in this application embodiment;
[0138] Figure 8 A schematic diagram illustrating a scenario for another protocol data management method provided in an embodiment of this application;
[0139] Figure 9 A schematic diagram of a protocol data management device provided in an embodiment of this application;
[0140] Figure 10 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application;
[0141] Figure 11 This is a schematic diagram of the structure of a server provided in an embodiment of this application. Detailed Implementation
[0142] This application provides a method and related apparatus for managing protocol data, which can be applied to systems or programs in terminal devices that include protocol data management functions. The method involves acquiring protocol data associated with multiple services from a target database; then extracting the protocol data based on preset rules to obtain protocol fields corresponding to each service. These preset rules are set based on feature identifiers corresponding to different services. The protocol fields are then concatenated to obtain a database definition language, and database tables corresponding to each service are generated based on this language. Furthermore, a database operation language corresponding to each database table is determined to parse the protocol data to obtain service data, and the database tables are populated based on this service data to obtain service data tables corresponding to each service. Finally, parameter statistics are performed based on the feature items in the service data tables corresponding to each service to perform corresponding management operations on each service. This achieves automatic parsing and management of network protocols. Because separate tables are created and stored for each service, interference between data is reduced. Furthermore, the entire process is script-based, enabling rapid response and meeting the management needs of massive network protocols, thus improving the accuracy and effectiveness of network protocol management.
[0143] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented, for example, in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “corresponding to,” 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.
[0144] First, some terms that may appear in the embodiments of this application will be explained.
[0145] Hypertext Transfer Protocol (http): A protocol used to transfer hypertext from a World Wide Web server to a local browser.
[0146] TDW: A type of distributed data warehouse.
[0147] Data Definition Language (DDL): Responsible for creating, modifying, and deleting objects such as tables, indexes, views, functions, stored procedures, and triggers.
[0148] Data Manipulation Language (DML): Responsible for operations such as inserting, modifying, and deleting data in the database.
[0149] Regular expressions describe a string matching pattern. They can be used to check if a string contains a certain substring, replace matched substrings, or extract substrings from a string that meet certain conditions.
[0150] It should be understood that the protocol data management method provided in this application can be applied to systems or programs in terminal devices that include protocol data management functions, such as network risk management applications. Specifically, the protocol data management system can run in systems such as... Figure 1 In the network architecture shown, such as Figure 1 The diagram shown illustrates the network architecture of the protocol data management system. As can be seen, the system can manage protocol data from multiple information sources. This involves the generation of corresponding protocol data through business operations on the terminal side, followed by the server collecting, analyzing, and managing this data. It can be understood that... Figure 1 The document illustrates various terminal devices, which can be computer devices. In real-world scenarios, more or fewer types of terminal devices may participate in the protocol data management process. The specific number and types depend on the actual scenario and are not limited here. Figure 1 The image shows one server, but in real-world scenarios, multiple servers can be involved, with the specific number depending on the actual situation.
[0151] In this embodiment, the server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, etc., but is not limited to these. The terminal and server can be directly or indirectly connected via wired or wireless communication, and the terminal and server can be connected to form a blockchain network; this application does not impose any restrictions.
[0152] It is understood that the aforementioned protocol data management system can run on personal mobile terminals, such as network risk management applications, or on servers, or on third-party devices to provide protocol data management and obtain the management and processing results of the protocol data from the information source. Specifically, the protocol data management system can run as a program on the aforementioned devices, or as a system component of the aforementioned devices, or as a cloud service program. The specific operating mode depends on the actual scenario and is not limited here.
[0153] Given the need for risk control analysis of massive amounts of business data, it is essential to transmit business data to the risk control system. Therefore, the Hypertext Transfer Protocol (HTTP) is used to transmit this massive amount of production data to the risk control system for storage. HTTP is the most widely used network protocol on the Internet. All Internet files must adhere to this standard.
[0154] Generally, technical personnel can understand the fields of different business agreement data and manually create tables in the database based on the agreement data fields, and then conduct quality management or monitoring based on the information created in the database tables.
[0155] However, due to the diversity of network protocol characteristics, the process of managing them manually is time-consuming and labor-intensive. Furthermore, in scenarios involving the management of massive amounts of network protocol input, it is impossible to process each protocol individually, resulting in the loss of protocol characteristics and affecting the accuracy and effectiveness of network protocol management.
[0156] To address the aforementioned problems, this application proposes a method for managing protocol data, which is applied to... Figure 2 In the process framework for managing protocol data shown, such as Figure 2 The diagram shown is a flowchart of a protocol data management process provided in this application embodiment. Protocol data is generated through business operations on the terminal side, and then the protocol data content is parsed on the server side by an automatic parsing script to generate corresponding DDL and DML. This enables the automatic parsing of data content after HTTP protocol data is input and its storage in a standard format database table. The quality monitoring and management of HTTP protocol data is achieved by statistically analyzing the missing field rate of the database table, providing a standardized system process and architecture.
[0157] It is understood that the method provided in this application can be a program written as processing logic in a hardware system, or a protocol data management device, implemented through integration or external connection. As one implementation, the protocol data management device acquires protocol data associated with multiple services from a target database; then extracts the protocol data based on preset rules to obtain protocol fields corresponding to each service. These preset rules are set based on the characteristic identifiers corresponding to different services. The protocol fields are then concatenated to obtain a database definition language, and database tables corresponding to each service are generated based on this language. The database operation language corresponding to each database table is further determined to parse the protocol data to obtain service data, and the database tables are populated based on this service data to obtain service data tables corresponding to each service. Finally, parameter statistics are performed based on the feature items in the service data tables corresponding to each service to perform corresponding management operations on each service. This achieves automatic parsing and management of network protocols. Because tables are created and stored separately for each service, interference between data is reduced. Furthermore, the entire process is script-based, enabling rapid response to and fulfillment of the management needs of massive network protocols, improving the accuracy and effectiveness of network protocol management.
[0158] Based on the above process architecture, the following section will describe the method for managing protocol data in this application. Please refer to [link / reference]. Figure 3 , Figure 3The flowchart illustrates a protocol data management method provided in this application embodiment. This management method can be executed by a terminal, a server, or jointly by a server and a terminal. This application embodiment includes at least the following steps:
[0159] 301. Obtain protocol data related to multiple services from the target database.
[0160] In this embodiment, the protocol data can be Hypertext Transfer Protocol data, i.e., HTTP. This protocol data contains multiple HTTP protocols involved in the execution of business processes. The target database distributes the Hypertext Transfer Protocol data, i.e., all massive amounts of business HTTP protocol data are uniformly stored in a data table of the backend database to facilitate unified management and backup of business data.
[0161] Specifically, the process of determining protocol data can be based on business code association. That is, firstly, a summary data table obtained from the target database based on data transmission statistics is obtained; then, the indicator business code in the summary data table is determined; and then, business identification is performed based on the business code to determine the protocol data corresponding to each business, thereby completing the division of different business affiliations in the protocol data, so as to facilitate the generation of subsequent data tables.
[0162] Optionally, the protocol data in this application can be real-time updated data, that is, new HTTP protocol data is constantly being transmitted to the target database. For the transmission process of new data, the data transmitted during the execution of the processing business can be received first; then the processing code corresponding to the processing business can be determined; then, based on the processing code, the corresponding statistical items can be determined in the summary data table, and the statistical items can be updated based on the transmission data, thereby facilitating the division of business.
[0163] 302. Extract protocol data based on preset rules to obtain the protocol fields corresponding to each business.
[0164] In this embodiment, the preset rules are set based on the feature identifiers corresponding to different services; wherein, the feature identifiers can be different characters, for example, different fields in the service are connected by the "&" symbol, so the "&" symbol can be used as the feature identifier, and the specific identifier type depends on the actual scenario, which is not limited here.
[0165] Specifically, the process of extracting protocol fields can begin by determining the feature identifiers corresponding to each business based on preset rules; then, the protocol data can be split according to the feature identifiers to obtain the split data; and finally, regular expressions can be used to extract the split data to obtain the protocol fields corresponding to each business.
[0166] Optionally, to facilitate the generation of the subsequent database definition language, the format of the protocol fields can be adjusted, that is, the project statistics method corresponding to the database table can be determined; then, the arrangement of the protocol fields can be updated based on the project statistics method so that the protocol fields match the database table.
[0167] In one possible scenario, different fields of the business logic are connected by the '&' symbol. In this case, the program automatically splits the HTTP protocol data using this symbol, extracts the fields of the business data using regular expressions, and converts the protocol fields from a row to a column for subsequent automatic generation of the database definition language.
[0168] 303. Concatenate the protocol fields to obtain the database definition language, and generate the database tables corresponding to each business based on the database definition language.
[0169] In this embodiment, the database definition language is obtained by concatenating protocol fields, which allows for editing of the table structure. That is, the feature items in the protocol data can be set to facilitate subsequent business data statistics, making it a structured editing process.
[0170] Specifically, for database table construction, the database definition language can be a procedural language. This involves first obtaining a standardized input format and the corresponding configuration statements for the target database; then concatenating the protocol fields extracted from the configuration statements based on the input format to obtain the database definition language (procedural language); and finally, generating the database tables corresponding to each business function based on the database definition language. This allows for convenient input settings through a standardized input format and simultaneous invocation of relevant statements within the database.
[0171] In one possible scenario, the database definition language is derived from a combination of Python and SQL statements.
[0172] In other words, the database definition language uses the TDW procedural language of TDW / PL. This language is implemented by combining Python and SQL statements. Users can write standard Python code and embed static or dynamic SQL statements into it. The fields extracted by SQL are then concatenated using Python syntax, thereby automatically generating the DDL database definition language and generating a database table for a specific business in TDW, which improves the convenience of database table generation.
[0173] 304. Determine the database operation language corresponding to the database table in order to parse the protocol data to obtain the business data, and populate the database table based on the business data to obtain the business data table corresponding to each business.
[0174] In this embodiment, the business data is the corresponding value or character of the indicated field contained in the protocol data.
[0175] In one possible scenario, the sample HTTP protocol data corresponding to the business logic is as follows: http: / / a.cn / q?attach_1=1000&attach_2=dabsobak&attach_3=5&attach_4=100937483929&attach_5=&attach6=3&attach_6=10909102938&attach_7=100303948729202&attach_8=ABC&attach_9=2&attach_10=4&attach_11=abc. The protocol data contains the fields of the business logic data and their corresponding values. The specific meaning of attach_1=1000 is that the value of the attach_1 field is 1000. The other fields attach_2 to attach_11 are different business logic fields and their corresponding values. Since different business data are transmitted to the risk control system in the form of HTTP protocol data for unified storage, and the content of HTTP protocol data for different businesses is different, it is necessary to parse the HTTP protocol data of different businesses and store it as the corresponding business database table for analysis by analysts.
[0176] Specifically, the process of populating the business data table involves first determining the structural information corresponding to the database table, and then constructing the database operation language based on the structural information. Next, the protocol data is input into the decoder through the database operation language to obtain the business data. The business information corresponding to the business data is then determined. Based on the business information, the business items in the database table are determined. Finally, the business items are populated according to the business data to obtain the business data table corresponding to each business, thus achieving automatic database table population and ensuring the accuracy of the business data table.
[0177] Optionally, during the parsing of business data, field identifiers can be used. These identifiers can be marked during the process of dividing the protocol fields. First, the protocol data is extracted based on preset rules to obtain the protocol fields corresponding to each business. Then, field identifiers are configured for the protocol fields. For example, if the protocol data contains `attach_1 = 1000`, and `attach_1` is a protocol field, then `attach_1` is marked, and the mark of `attach_1` is directly identified during data value extraction. This then determines the database operation language corresponding to the database table to extract the field identifiers from the protocol data. Next, data is located based on the field identifiers to parse the business data. Finally, the database tables are populated based on the business data to obtain the business data tables corresponding to each business. Parsing protocol data using field identifiers improves the efficiency and accuracy of data parsing and avoids redundant division of protocol data.
[0178] 305. Perform parameter statistics based on the feature items in the business data table corresponding to each business, so as to perform corresponding management operations on each business.
[0179] In this embodiment, the feature item is the written item of the numerical value or character corresponding to the protocol field. The specific parameter statistics can be a comparison of numerical values (whether it exceeds the threshold) or a comparison of characters (whether it hits the target character), etc.
[0180] Specifically, parameter statistics can be the missing rate statistics of the overall data dimension. That is, firstly, determine the total number of fields of feature items in the business data table corresponding to each business; then detect the number of missing values of the feature items in the business data table; and then determine the missing rate based on the number of missing values and the total number of fields, so as to perform corresponding management operations for each business.
[0181] In one possible scenario, data quality management is monitored for the database tables of this business, and the formula for the missing data field rate is defined as follows:
[0182]
[0183] Where b is the number of missing values for the field, and a is the total number of values for the field.
[0184] Understandably, a high missing rate indicates that relevant fields are missing more frequently in the HTTP protocol data. Finally, anomaly attribution is performed on these missing data to determine whether the missing data is a normal phenomenon or if relevant data was lost during data transmission, thereby enabling the management and monitoring of the quality of HTTP protocol data.
[0185] Optionally, different missing rate thresholds can be used for different businesses. That is, the missing rate is first determined based on the number of missing data and the total number of fields; then the threshold information corresponding to each business is determined; and then the threshold information is compared with the missing rate corresponding to each business to perform corresponding management operations for each business. This realizes the targeted monitoring and management process for different businesses and improves the effectiveness of protocol management.
[0186] Optionally, the identification of abnormal protocol data can also be achieved by comparing the values of feature items with those of reference business data. That is, firstly, reference business data is obtained, such as business data that is identified as having transaction or payment risks; then, reference values corresponding to the reference business data are extracted based on the protocol fields (including but not limited to the range of missing rates, the occurrence of specific characters, and the values of specific protocol fields); then, the business data table is traversed according to the reference values to compare and determine the risky business in the target database, thus ensuring the accuracy of risky business identification.
[0187] Optionally, since different businesses correspond to different feature parameters, that is, different businesses correspond to different feature sets, the process of performing parameter statistics based on feature items in the business data table can also be based on the feature items in the feature set for a targeted parameter statistics process. Specifically, the process begins by determining the feature set in the business data table corresponding to each business. For example, if the feature set for business A includes attach_3 and attach_4, the parameter statistics process focuses on the values corresponding to attach_3 and attach_4. Next, reference values are obtained for the feature items within the feature set. These reference values are then compared with the feature items in the feature set to obtain the parameter comparison results. Based on these results, abnormal business operations are identified for appropriate management. For instance, if the reference values for attach_3 and attach_4 are both 100, but the actual values are 80, the parameter comparison results indicate a business abnormality requiring review. Furthermore, the meaning of the features in attach_3 and attach_4 can be directly identified. For example, if attach_3 corresponds to a transfer amount, the abnormality can be quickly determined as a transfer amount, allowing for rapid management of transfer restrictions to ensure business security.
[0188] It is understandable that the feature sets corresponding to different businesses can be those recorded in historical records (statistical records of business feature items) or those set by relevant personnel, depending on the actual scenario.
[0189] Furthermore, regarding the statistical process of the feature set, since there may be numerical error ranges between different parameters, in order to make anomaly judgments from the perspective of the overall business, the various feature items in the feature set can be weighted. Specifically, firstly, historical management data corresponding to each business is called, such as the financial risk report of the most recent quarter; then, the anomaly probability of the feature items in the historical management data is determined. For example, if the anomaly probability of business A on attach_1 and attach_3 is 0.2 and 0.3 respectively, it means that attach_3 is more likely to have anomalies. For numerical anomalies, the weighting is adjusted accordingly. The range can be larger; therefore, the feature items contained in the feature set can be weighted based on the anomaly probability to obtain a weighted feature value. For example, the feature difference between attach_1 and attach_3 is 10 and 30, respectively, and the weighted feature value = 10*0.2 / (0.2+0.3) + 30*0.3 / (0.2+0.3) = 22. Then, corresponding management operations can be performed on each business according to the weighted feature value. For example, a business with a weighted feature value greater than 20 can be set as an abnormal business, so the business is marked for anomaly review, thereby ensuring the accuracy of anomaly detection.
[0190] It is understood that this application can be a real-time detection process. Therefore, the results of the above-mentioned anomaly management can be marked to indicate the subsequent detection process. That is, firstly, anomalies are extracted from the feature items in the business data table during parameter statistics, such as attach_2 being marked as an anomaly; then, the anomalies are marked to determine the feature markers, i.e., the marked attach_2; and based on the feature markers, the protocol data is extracted to obtain the feature fields corresponding to each service, i.e., attach_2 is directly searched to improve retrieval efficiency; further, feature data tables corresponding to each service are generated based on the feature fields; then, parameter statistics are performed based on the feature items in the feature data tables corresponding to each service to perform corresponding management operations on each service, thereby realizing a real-time detection and update process, which improves management efficiency while ensuring the accuracy of network protocol management.
[0191] As illustrated in the above embodiments, the process involves acquiring protocol data associated with multiple services from the target database; then extracting the protocol data based on preset rules to obtain the protocol fields corresponding to each service. These preset rules are set based on the feature identifiers corresponding to different services. The protocol fields are then concatenated to obtain a database definition language, and database tables corresponding to each service are generated based on this language. Furthermore, the database operation language corresponding to each database table is determined to parse the protocol data to obtain service data, and the database tables are populated based on this service data to obtain service data tables corresponding to each service. Finally, parameter statistics are performed based on the feature items in the service data tables corresponding to each service to perform corresponding management operations on each service. This achieves the automatic parsing and management of network protocols. Because separate tables are created and stored for each service, interference between data is reduced. Moreover, the entire process is script-based, enabling rapid response to and fulfillment of the management needs of massive network protocols, thus improving the accuracy and effectiveness of network protocol management.
[0192] The following explanation uses a scenario where the protocol data is from the HTTP protocol. Figure 4 As shown, Figure 4 A flowchart illustrating another method for managing protocol data provided in this application embodiment; the flowchart shows the following steps:
[0193] 401. Different business data are transmitted to the distributed database storage in the form of raw HTTP protocol data.
[0194] In this embodiment, different business data are transmitted to TDW in the form of raw HTTP protocol data for unified storage. TDW is Tencent's distributed storage system. Business data is uniformly summarized into a specific database table in this system. This approach is to perform unified backup management of the massive amount of HTTP protocol data transmitted from the business, and to distinguish which specific business the HTTP protocol data belongs to through the business code. In this step, all business data is stored together, and the protocol data has not yet been parsed, so analysts cannot use it directly.
[0195] In one possible scenario, such as Figure 5 As shown, Figure 5 This is a schematic diagram illustrating a method for managing protocol data provided in an embodiment of this application. The diagram shows that massive amounts of business HTTP protocol data are uniformly stored in a data table in the backend database to facilitate unified management of business data. The protocol data is distinguished by business code to determine which specific business it belongs to. Finally, this technology automatically detects the HTTP protocol data and automatically generates the corresponding database table for the business, and automatically stores the business data in the database table corresponding to the business.
[0196] The above scenario enables the automatic parsing, table creation, and data storage of HTTP protocol data. The original data is also split into different database tables to facilitate analysis and modeling by analysts.
[0197] 402. Parse the data content of different business protocols and extract the protocol fields of each business.
[0198] In this embodiment, the process of extracting the protocol fields of each service involves using an automated script to pass in the service code parameters of the service data to be parsed, which can automatically extract all the service data of this service.
[0199] In one possible scenario, because the format of business HTTP protocol data follows certain rules, such as http: / / a.cn / q?attach_1=1000&attach_2=dabsobak&attach_3=5&attach_4=100937483929&attach_5=&attach6=3&attach_6=10909102938&attach_7=100303948729202&attach_8=ABC&attach_9=2&attach_10=4&attach_11=abc, then according to the rules, different fields of the business are connected by the "&" symbol. At this time, the program automatically splits the HTTP protocol data using this symbol, extracts the fields of the business data using regular expressions, and converts the protocol fields from a row arrangement to a column arrangement, in preparation for the subsequent automatic generation of database definition language.
[0200] 403. Automatically generate database definition languages for different businesses based on protocol fields, and create business data tables.
[0201] In this embodiment, the extracted protocol fields are automatically concatenated to generate a database definition language. Specifically, the database definition language uses TDW / PL, or TDW process language, which is implemented using a combination of Python and SQL statements. Users can write standard Python code and embed static or dynamic SQL statements into it. The fields extracted by SQL are then concatenated using Python syntax, thereby automatically generating the DDL database definition language and generating a database table for a specific business in TDW.
[0202] 404. Automatically generate database operation language and store the parsed protocol data into the corresponding business data table.
[0203] In this embodiment, since the database table storing the corresponding business has already been generated, it is necessary to extract all the HTTP protocol data of the business from the original table, and use the table structure generated in step 403 to automatically construct and generate DML database operation language. The original HTTP protocol data is decoded, parsed, extracted, and stored in the database table through urldecode, so as to finally realize that different business data are parsed and stored separately in the database table of the corresponding business.
[0204] 405. Monitor the quality of HTTP protocol data based on the data quality of the business data table.
[0205] In this embodiment, data quality monitoring may include one or more of the following combinations: monitoring of specific field values, monitoring of specific field characters, or monitoring of field missing rates across the overall data dimension. No limitation is imposed here.
[0206] In one possible scenario, such as Figure 6 As shown, Figure 6 This is a schematic diagram illustrating another method for managing protocol data provided in this application embodiment. The diagram shows that for the target database stored at http: / / a.cn / q?attach_1=1000&attach_2=dabsobak&attach_3=5&attach_4=100937483929&attach_5=&attach6=3&attach_6=10909102938&attach_7=100303948729202&attach_8=ABC&attach_9=2&attach_10=4&attach_11=abc, the protocol fields "attach_1, attach_2...attach_11" can be extracted based on regular expressions. The protocol fields are then converted from a row to a column, and then concatenated using the TDW / PL procedural language to obtain DDL language. This allows for the collection of business data and the generation of a business data table. This also splits the original data into different database tables, facilitating analysis, modeling, and other management processes for analysts.
[0207] The above embodiments enable automatic detection and parsing of massive amounts of HTTP protocol data, and automatic generation of corresponding database tables to store the parsed business data. This system provides a solution for unified storage of massive amounts of HTTP protocol data, automatic splitting and parsing to create tables, separate storage of business data, and HTTP protocol data quality management and monitoring. Since the entire process is automated by scripts, it can quickly respond to the need to parse and split massive amounts of business data from the original HTTP protocol data tables, and systematically plans the data storage scheme and data quality management and monitoring.
[0208] The following explanation uses the payment page redirection process in a transaction scenario as an example. Please refer to [link / reference]. Figure 7 , Figure 7 A flowchart illustrating another method for managing protocol data provided in this application embodiment, which includes at least the following steps:
[0209] 701. In response to a transaction operation, determine the redirect page and obtain the corresponding protocol data for the redirect page.
[0210] In this embodiment, the protocol data can be generated when the user is redirected to the payment page during a transaction. By identifying the protocol data of the redirected page, the security of the transaction operation can be ensured.
[0211] 702. Conduct a risk assessment on the protocol data corresponding to the redirected page.
[0212] In this embodiment, the risk assessment process is first referred to as... Figure 3 or Figure 4 The embodiment describes the process of generating a business data table, and then performing a risk assessment based on the business data table. For details on the business data table generation process, please refer to [link / reference needed]. Figure 3 or Figure 4 Examples are not detailed here.
[0213] Optionally, risk assessment can also involve determining whether the protocol data of the redirected page has a risk marker. This risk marker can be created by processing massive amounts of protocol data in the target database. Specifically, reference business data is first obtained, and then reference values corresponding to the reference business data are extracted based on the protocol fields. Subsequently, the business data table is traversed based on the reference values to identify risky businesses in the target database, thereby marking the risky businesses. The protocol data passed in by the risky businesses is then reviewed to determine the validity of the risk marker, thus improving the efficiency of risk assessment.
[0214] 703. The trading operation is instructed based on the results of the risk assessment.
[0215] In this embodiment, the transaction operation is initiated based on the risk assessment result, i.e., it is determined whether to trigger the payment page. Figure 8 As shown, Figure 8 This is a schematic diagram illustrating another method for managing protocol data provided in this application embodiment. The diagram shows that when a payment page is redirected during a transaction, the backend server is triggered to evaluate the protocol data of the redirected page. If there are no abnormalities in the protocol data of the redirected page, the payment interface is displayed, and the user can click "OK" (A1) to perform the transaction. If there are abnormalities in the protocol data of the redirected page, an error message interface (A2) is displayed, and the transaction cannot be performed.
[0216] The above embodiments ensure the security of the payment redirection process during user transactions. The above risk management method can also be used in transaction scenarios with other design protocol data. The specific transaction operation depends on the actual scenario and is not limited here.
[0217] To better implement the above-described solutions of the embodiments of this application, related apparatus for implementing the above solutions is also provided below. Please refer to... Figure 9 , Figure 9 This application provides a schematic diagram of the structure of a protocol data management device 900, which includes:
[0218] Acquisition unit 901 is used to acquire protocol data associated with multiple services in the target database;
[0219] Extraction unit 902 is used to extract data from the protocol data based on preset rules to obtain the protocol fields corresponding to each service. The preset rules are set based on the feature identifiers corresponding to different services.
[0220] The determining unit 903 is used to concatenate the protocol fields to obtain the database definition language, and generate the database tables corresponding to each service based on the database definition language;
[0221] The determining unit 903 is further configured to determine the database operation language corresponding to the database table, so as to parse the protocol data to obtain business data, and fill the database table based on the business data to obtain the business data table corresponding to each business.
[0222] The management unit 904 is used to perform parameter statistics based on the feature items in the business data table corresponding to each business, so as to perform corresponding management operations on each business.
[0223] Optionally, in some possible implementations of this application, the acquisition unit 901 is specifically used to acquire a summary data table obtained from the target database based on data transmission statistics;
[0224] The acquisition unit 901 is specifically used to determine the indication business code in the summary data table;
[0225] The acquisition unit 901 is specifically used to perform business identification based on the business code in order to determine the protocol data corresponding to each business.
[0226] Optionally, in some possible implementations of this application, the acquisition unit 901 is specifically used to receive transmission data generated during the execution of the processing service;
[0227] The acquisition unit 901 is specifically used to determine the processing code corresponding to the processing service;
[0228] The acquisition unit 901 is specifically used to determine the corresponding statistical items in the summary data table based on the processing code, and to update the statistical items based on the transmitted data.
[0229] Optionally, in some possible implementations of this application, the extraction unit 902 is specifically used to determine the feature identifier corresponding to each business based on the preset rules;
[0230] The extraction unit 902 is specifically used to split the protocol data according to the feature identifier to obtain split data;
[0231] The extraction unit 902 is specifically used to call regular expressions to extract data from the split data in order to obtain the protocol fields corresponding to each service.
[0232] Optionally, in some possible implementations of this application, the extraction unit 902 is specifically used to determine the statistical method of the items corresponding to the database table;
[0233] The extraction unit 902 is specifically used to update the arrangement of the protocol fields based on the project statistics method, so that the protocol fields match the database table.
[0234] Optionally, in some possible implementations of this application, the determining unit 903 is specifically used to obtain a standardized input format and the configuration statement corresponding to the target database;
[0235] The determining unit 903 is specifically used to concatenate the protocol fields extracted based on the configuration statement based on the input format to obtain the database definition language;
[0236] The determining unit 903 is specifically used to generate database tables corresponding to each business based on the database definition language.
[0237] Optionally, in some possible implementations of this application, the determining unit 903 is specifically used to determine the structural information corresponding to the database table, and to obtain the database operation language based on the structural information;
[0238] The determining unit 903 is specifically used to input the protocol data into the decoder through the database operation language to obtain the service data;
[0239] The determining unit 903 is specifically used to determine the business information corresponding to the business data;
[0240] The determining unit 903 is specifically used to determine the business items in the database table based on the business information;
[0241] The determining unit 903 is specifically used to fill in the business items according to the business data to obtain the business data table corresponding to each business.
[0242] Optionally, in some possible implementations of this application, the management unit 904 is specifically used to determine the total number of fields of the feature items in the business data table corresponding to each business;
[0243] The management unit 904 is specifically used to detect the number of missing values corresponding to feature items in the business data table;
[0244] The management unit 904 is specifically used to determine the missing rate based on the number of missing items and the total number of fields, so as to perform corresponding management operations on each business.
[0245] Optionally, in some possible implementations of this application, the management unit 904 is specifically used to determine the missing rate based on the number of missing items and the total number of fields;
[0246] The management unit 904 is specifically used to determine the threshold information corresponding to each service.
[0247] The management unit 904 is specifically used to compare the threshold information with the missing rate corresponding to each business, so as to perform corresponding management operations on each business.
[0248] Optionally, in some possible implementations of this application, the extraction unit 902 is specifically used to extract data from the protocol data based on preset rules to obtain the protocol fields corresponding to each service;
[0249] The extraction unit 902 is specifically used to configure a field identifier for the protocol field;
[0250] The determining unit 903 is specifically used to determine the database operation language corresponding to the database table in order to extract the field identifier in the protocol data;
[0251] The determining unit 903 is specifically used to locate data based on the field identifier in order to parse and obtain the business data;
[0252] The determining unit 903 is specifically used to fill the database table based on the business data to obtain the business data table corresponding to each business.
[0253] Optionally, in some possible implementations of this application, the management unit 904 is specifically used to acquire reference business data;
[0254] The management unit 904 is specifically used to extract the reference value corresponding to the reference business data based on the protocol field;
[0255] The management unit 904 is specifically used to traverse the business data table according to the reference value in order to determine the risky business in the target database.
[0256] Optionally, in some possible implementations of this application, the management unit 904 is specifically used to determine the feature set in the business data table corresponding to each business;
[0257] The management unit 904 is specifically used to obtain the reference values corresponding to the feature items contained in the feature set;
[0258] The management unit 904 is specifically used to compare the reference value with the feature items contained in the feature set to obtain the parameter comparison result;
[0259] The management unit 904 is specifically used to determine abnormal services based on the parameter comparison results, so as to perform corresponding management operations.
[0260] Optionally, in some possible implementations of this application, the management unit 904 is specifically used to call the historical management data corresponding to each business;
[0261] The management unit 904 is specifically used to determine the anomaly probability of the feature item in the historical management data;
[0262] The management unit 904 is specifically used to perform weighted calculations on the feature items contained in the feature set based on the anomaly probability to obtain weighted feature values;
[0263] The management unit 904 is specifically used to perform corresponding management operations on each business based on the weighted feature value.
[0264] Optionally, in some possible implementations of this application, the management unit 904 is specifically used to extract abnormal items from the feature items in the business data table during the parameter statistics process;
[0265] The management unit 904 is specifically used to mark the abnormal items in order to determine the feature marker items;
[0266] The management unit 904 is specifically used to extract data from the protocol data based on the feature marker items, so as to obtain the feature fields corresponding to each service.
[0267] The management unit 904 is specifically used to generate feature data tables corresponding to each business based on the feature fields;
[0268] The management unit 904 is specifically used to perform parameter statistics based on the feature items in the feature data table corresponding to each business, so as to perform corresponding management operations on each business.
[0269] This process involves acquiring protocol data associated with multiple services from the target database; then extracting the protocol data based on preset rules (defined by characteristic identifiers corresponding to different services) to obtain the protocol fields for each service; concatenating these protocol fields to obtain a database definition language (DBM), and generating database tables for each service based on this DBM; further determining the database operation language for each database table to parse the protocol data into service data; and populating the database tables with this service data to obtain service data tables for each service; finally, performing parameter statistics based on the feature items in each service data table to perform corresponding management operations for each service. This achieves automatic parsing and management of network protocols. Because separate tables are created and stored for each service, data interference is reduced, and the entire process is script-based, enabling rapid response to and fulfillment of management needs for massive amounts of network protocols, thus improving the accuracy and effectiveness of network protocol management.
[0270] This application also provides a terminal device, such as... Figure 10 The diagram shown is a structural schematic of another terminal device provided in an embodiment of this application. For ease of explanation, only the parts related to the embodiment of this application are shown. For specific technical details not disclosed, please refer to the method section of the embodiment of this application. The terminal can be any terminal device including mobile phones, tablets, personal digital assistants (PDAs), point-of-sale (POS) terminals, in-vehicle computers, etc. Taking a mobile phone as an example:
[0271] Figure 10 This is a block diagram illustrating a portion of the structure of a mobile phone related to the terminal provided in the embodiments of this application. (Reference) Figure 10 The mobile phone includes components such as a radio frequency (RF) circuit 1010, a memory 1020, an input unit 1030, a display unit 1040, a sensor 1050, an audio circuit 1060, a wireless fidelity (WiFi) module 1070, a processor 1080, and a power supply 1090. Those skilled in the art will understand that... Figure 10The mobile phone structure shown does not constitute a limitation on the mobile phone and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0272] The following is combined with Figure 10 A detailed introduction to each component of a mobile phone:
[0273] The RF circuit 1010 can be used for receiving and transmitting signals during information transmission or calls. Specifically, it receives downlink information from the base station and processes it with the processor 1080; additionally, it transmits uplink data to the base station. Typically, the RF circuit 1010 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low-noise amplifier (LNA), and a duplexer. Furthermore, the RF circuit 1010 can also communicate wirelessly with networks and other devices. The aforementioned wireless communication can use any communication standard or protocol, including but not limited to Global System for Mobile Communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, and Short Message Service (SMS).
[0274] The memory 1020 can be used to store software programs and modules. The processor 1080 executes various mobile phone functions and data processing by running the software programs and modules stored in the memory 1020. The memory 1020 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, applications required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory 1020 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0275] The input unit 1030 can be used to receive input numerical or character information, and generate key signal inputs related to user settings and function control of the mobile phone. Specifically, the input unit 1030 may include a touch panel 1031 and other input devices 1032. The touch panel 1031, also known as a touch screen, can collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch panel 1031, as well as air touch operations within a certain range on the touch panel 1031), and drive the corresponding connection devices according to a pre-set program. Optionally, the touch panel 1031 may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch position and the signal generated by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, sends it to the processor 1080, and can receive and execute commands sent by the processor 1080. Furthermore, the touch panel 1031 can be implemented using various types of sensors, including resistive, capacitive, infrared, and surface acoustic wave sensors. In addition to the touch panel 1031, the input unit 1030 may also include other input devices 1032. Specifically, these other input devices 1032 may include, but are not limited to, one or more of the following: a physical keyboard, function keys (such as volume control buttons, power buttons, etc.), a trackball, a mouse, and a joystick.
[0276] The display unit 1040 can be used to display information input by the user or information provided to the user, as well as various menus of the mobile phone. The display unit 1040 may include a display panel 1041, which may optionally be configured as a liquid crystal display (LCD), organic light-emitting diode (OLED), or similar form. Further, a touch panel 1031 may cover the display panel 1041. When the touch panel 1031 detects a touch operation on or near it, it transmits the information to the processor 1080 to determine the type of touch event. Subsequently, the processor 1080 provides corresponding visual output on the display panel 1041 according to the type of touch event. Although in Figure 10 In this embodiment, the touch panel 1031 and the display panel 1041 are two separate components to realize the input and output functions of the mobile phone. However, in some embodiments, the touch panel 1031 and the display panel 1041 can be integrated to realize the input and output functions of the mobile phone.
[0277] The mobile phone may also include at least one sensor 1050, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor. The ambient light sensor can adjust the brightness of the display panel 1041 according to the ambient light level, and the proximity sensor can turn off the display panel 1041 and / or backlight when the phone is moved to the ear. As a type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes). When stationary, it can detect the magnitude and direction of gravity and can be used for applications that recognize the phone's posture (such as landscape / portrait switching, related games, magnetometer posture calibration), vibration recognition-related functions (such as pedometer, taps), etc. Other sensors that may be configured in the mobile phone, such as gyroscopes, barometers, hygrometers, thermometers, and infrared sensors, will not be described in detail here.
[0278] The audio circuit 1060, speaker 1061, and microphone 1062 provide an audio interface between the user and the mobile phone. The audio circuit 1060 converts the received audio data into electrical signals and transmits them to the speaker 1061, where the speaker 1061 converts them into sound signals for output. On the other hand, the microphone 1062 converts the collected sound signals into electrical signals, which are then received by the audio circuit 1060, converted into audio data, and then processed by the processor 1080 before being transmitted via the RF circuit 1010 to, for example, another mobile phone, or the audio data can be output to the memory 1020 for further processing.
[0279] WiFi is a short-range wireless transmission technology. Through the WiFi module 1070, mobile phones can help users send and receive emails, browse web pages, and access streaming media, providing users with wireless broadband internet access. Although Figure 10 The WiFi module 1070 is shown, but it is understood that it is not an essential component of a mobile phone and can be omitted as needed without changing the essence of the invention.
[0280] The processor 1080 is the control center of the mobile phone, connecting various parts of the phone through various interfaces and lines. It executes software programs and / or modules stored in the memory 1020, and calls data stored in the memory 1020 to perform various functions and process data, thereby providing overall monitoring of the phone. Optionally, the processor 1080 may include one or more processing units; optionally, the processor 1080 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the aforementioned modem processor may also not be integrated into the processor 1080.
[0281] The mobile phone also includes a power supply 1090 (such as a battery) that supplies power to various components. Optionally, the power supply can be logically connected to the processor 1080 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system.
[0282] Although not shown, mobile phones may also include a camera, Bluetooth module, etc., which will not be described in detail here.
[0283] In this embodiment of the application, the processor 1080 included in the terminal also has the function of performing the various steps of the page processing method described above.
[0284] This application also provides a server; please refer to [link / reference]. Figure 11 , Figure 11 This is a schematic diagram of a server structure provided in an embodiment of this application. The server 1100 can vary significantly due to different configurations or performance. It may include one or more central processing units (CPUs) 1122 (e.g., one or more processors) and memory 1132, and one or more storage media 1130 (e.g., one or more mass storage devices) for storing application programs 1142 or data 1144. The memory 1132 and storage media 1130 can be temporary or persistent storage. The program stored in the storage media 1130 may include one or more modules (not shown in the diagram), each module including a series of instruction operations on the server. Furthermore, the CPU 1122 may be configured to communicate with the storage media 1130 and execute the series of instruction operations in the storage media 1130 on the server 1100.
[0285] Server 1100 may also include one or more power supplies 1126, one or more wired or wireless network interfaces 1150, one or more input / output interfaces 1158, and / or one or more operating systems 1141, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.
[0286] The steps performed by the management device in the above embodiments can be based on this Figure 11 The server structure shown.
[0287] This application also provides a computer-readable storage medium storing management instructions for protocol data, which, when executed on a computer, cause the computer to perform the aforementioned actions. Figures 2 to 8 The steps performed by the protocol data management device in the method described in the illustrated embodiment.
[0288] This application also provides a computer program product that includes management instructions for protocol data, which, when run on a computer, causes the computer to perform the aforementioned actions. Figures 2 to 8 The steps performed by the protocol data management device in the method described in the illustrated embodiment.
[0289] This application also provides a protocol data management system, which may include... Figure 9 The protocol data management device in the described embodiments, or Figure 10 The terminal device in the described embodiments, or Figure 11 The server described.
[0290] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0291] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, 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 an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.
[0292] 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.
[0293] Furthermore, the functional units in the various embodiments of this application 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.
[0294] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, 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 a computer device (which may be a personal computer, a protocol data management device, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0295] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A method of managing protocol data, characterized by, include: Retrieve protocol data from the target database that is associated with multiple services; The protocol data is extracted based on preset rules to obtain the protocol fields corresponding to each service. The preset rules are set based on the feature identifiers corresponding to different services. The database definition language is obtained by concatenating the protocol fields, and the database tables corresponding to each business are generated based on the database definition language. The database operation language corresponding to the database table is determined so as to parse the protocol data to obtain business data, and the database table is populated based on the business data to obtain the business data table corresponding to each business. Parameter statistics are performed based on the feature items in the business data table corresponding to each business, so as to perform corresponding management operations on each business. The step of determining the database operation language corresponding to the database table, parsing the protocol data to obtain business data, and populating the database table based on the business data to obtain a business data table corresponding to each business includes: Determine the structure information corresponding to the database table, and obtain the database operation language based on the structure information; The protocol data is input into the decoder using the database operation language to obtain the service data; Determine the business information corresponding to the business data; Based on the business information, determine the business items in the database table; The business data is used to populate the business items to obtain the business data table corresponding to each business.
2. The method of claim 1, wherein, The acquisition of protocol data associated with multiple services in the target database includes: Obtain the summary data table obtained from the target database based on data transmission statistics; Determine the indicator business code in the summary data table; Based on the business code, business identification is performed to determine the protocol data corresponding to each business.
3. The method of claim 2, wherein, The method further includes: Receive and process the transmitted data generated during the execution of the service; Determine the processing code corresponding to the processing service; Based on the processing code, the corresponding statistical items are determined in the summary data table, and the statistical items are updated based on the transmitted data.
4. The method of claim 1, wherein, The step of extracting protocol data based on preset rules to obtain the protocol fields corresponding to each service includes: Based on the preset rules, the feature identifiers corresponding to each business are determined; The protocol data is split according to the feature identifier to obtain split data; Regular expressions are used to extract data from the split data to obtain the protocol fields corresponding to each business.
5. The method of claim 4, wherein, The method further includes: Determine the statistical method for the items corresponding to the database table; The arrangement of the protocol fields is updated based on the project statistics method to ensure that the protocol fields match the database table.
6. The method of claim 1, wherein, The process of concatenating the protocol fields to obtain the database definition language, and generating database tables corresponding to each business based on the database definition language, includes: Obtain the standardized input format and the configuration statement corresponding to the target database; The protocol fields extracted from the configuration statement are concatenated based on the input format to obtain the database definition language; Generate database tables corresponding to each business based on the database definition language.
7. The method according to claim 1, characterized in that, The parameter statistics are performed based on the feature items in the business data table corresponding to each business, so as to perform corresponding management operations on each business, including: Determine the total number of fields for the feature items in the business data table corresponding to each business; Detect the number of missing values for the feature items in the business data table; The missing rate is determined based on the number of missing items and the total number of fields, so as to perform corresponding management operations on each business.
8. The method of claim 7, wherein, The step of determining the missing rate based on the number of missing items and the total number of fields, in order to perform corresponding management operations on each business, includes: The missing rate is determined based on the number of missing items and the total number of fields. Determine the threshold information corresponding to each business; The threshold information is compared with the missing rate corresponding to each business to perform corresponding management operations on each business.
9. The method according to claim 1, characterized in that, The step of extracting protocol data based on preset rules to obtain the protocol fields corresponding to each service includes: The protocol data is extracted based on preset rules to obtain the protocol fields corresponding to each service. Configure field identifiers for the protocol fields; The step of determining the database operation language corresponding to the database table, parsing the protocol data to obtain business data, and populating the database table based on the business data to obtain a business data table corresponding to each business includes: Determine the database operation language corresponding to the database table in order to extract the field identifier from the protocol data; Data is located based on the field identifier in order to parse and obtain the business data; The database tables are populated with the business data to obtain the business data tables corresponding to each business.
10. The method according to any one of claims 1 to 9, characterized in that, The method further includes: Obtain reference business data; Extract the reference value corresponding to the reference business data based on the protocol fields; The business data tables are traversed based on the reference values to identify risky businesses in the target database.
11. The method of claim 1, wherein, The protocol data is Hypertext Transfer Protocol data, and the target database stores the Hypertext Transfer Protocol data in a distributed manner. The database definition language is a combination of Python and SQL statements.
12. A protocol data management apparatus characterized by comprising: include: The acquisition unit is used to acquire protocol data associated with multiple services in the target database; The extraction unit is used to extract data from the protocol data based on preset rules to obtain the protocol fields corresponding to each service. The preset rules are set based on the feature identifiers corresponding to different services. The determining unit is used to concatenate the protocol fields to obtain the database definition language, and generate the database tables corresponding to each business based on the database definition language; The determining unit is further configured to determine the database operation language corresponding to the database table, so as to parse the protocol data to obtain business data, and fill the database table based on the business data to obtain a business data table corresponding to each business. The management unit is used to perform parameter statistics based on the feature items in the business data table corresponding to each business, so as to perform corresponding management operations on each business. The determining unit is specifically used for: Determine the structure information corresponding to the database table, and obtain the database operation language based on the structure information; The protocol data is input into the decoder using the database operation language to obtain the service data; Determine the business information corresponding to the business data; Based on the business information, determine the business items in the database table; The business data is used to populate the business items to obtain the business data table corresponding to each business.
13. The apparatus according to claim 12, characterized in that, The acquisition unit is specifically used for: Obtain the summary data table obtained from the target database based on data transmission statistics; Determine the indicator business code in the summary data table; Based on the business code, business identification is performed to determine the protocol data corresponding to each business.
14. A computer device, comprising: The computer device includes a processor and memory: The memory is used to store program code; the processor is used to execute the protocol data management method according to any one of claims 1 to 11 according to the instructions in the program code.
15. A computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the protocol data management method according to any one of claims 1 to 11.
16. A computer program product, characterized in that, The computer program product includes computer instructions, and the processor of the computer device executes the computer instructions to cause the computer device to perform the protocol data management method according to any one of claims 1 to 11.