Monitoring method and device, electronic equipment and storage medium
By constructing a MAP mapping layer to monitor access requests from external applications, and employing a HASH hash algorithm and monitoring constraints, the problem of not being able to independently monitor external application access operations in existing technologies is solved, achieving higher data security and monitoring efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA MOBILE GROUP JIANGSU
- Filing Date
- 2021-03-31
- Publication Date
- 2026-08-04
AI Technical Summary
Existing technologies cannot achieve autonomous monitoring of access operations to external applications, resulting in insufficient information security.
By constructing a MAP mapping layer, access requests from external applications are received, and conditional monitoring is performed based on monitoring restrictions, including key-value monitoring, time limits, monitoring method restrictions, maximum access limit for each row, and extended monitoring switch restrictions. HASH hashing algorithm is used to obfuscate the names of parameters for identity authentication and monitoring of access operations.
It enables conditional autonomous monitoring of access operations to external applications, improving data security, reducing the risk of illegal information acquisition, and enhancing the accuracy and efficiency of monitoring.
Smart Images

Figure CN115146288B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of information security technology, and in particular to a monitoring method, device, electronic device, and storage medium. Background Technology
[0002] With the development of the internet, information security has become increasingly important. Currently, information security, especially the protection of personal privacy, faces significant challenges. Incidents of customer privacy breaches occur frequently, posing a major challenge to the information security protection of information systems.
[0003] Currently, most support systems store data in different tables in the backend database and develop applications based on the data dictionary in the database data model.
[0004] However, the existing methods can only rely on the external application itself to save operation logs for tracing and control, and cannot achieve autonomous monitoring. Summary of the Invention
[0005] This invention provides a monitoring method, device, electronic device, and storage medium to address the shortcomings of existing technologies that cannot autonomously monitor access operations of external applications. It enables conditional autonomous monitoring of access operations of external applications, thereby improving the security of data information.
[0006] In a first aspect, the present invention provides a monitoring method, comprising:
[0007] The MAP mapping layer receives access requests from external applications;
[0008] Based on the access request and the monitoring restrictions of the MAP mapping layer, monitor the access operations of the external application;
[0009] The monitoring restrictions of the MAP mapping layer are used to restrict the MAP mapping layer to monitor only when the access request meets the monitoring restrictions.
[0010] Optionally, according to the monitoring method provided by the present invention, monitoring the access of the external application based on the access request and the monitoring restrictions of the MAP mapping layer includes:
[0011] Based on the access request, perform an access operation to the database;
[0012] If the access operation meets the monitoring restrictions, the access operation is monitored.
[0013] Optionally, according to the monitoring method provided by the present invention, the monitoring constraints of the MAP mapping layer include at least one of the following:
[0014] Key value monitoring restrictions, monitoring time restrictions, monitoring method restrictions, maximum number of accesses per row restrictions, and extended monitoring switch restrictions;
[0015] The key-value monitoring restriction refers to the restriction on parameters in the access request.
[0016] Optionally, according to the monitoring method provided by the present invention, the step of performing an access operation to the database based on the access request includes:
[0017] Based on the access request sent by the external application, the parameters in the access request are hashed to obtain the hashed parameter information;
[0018] Based on the hashed parameter information, the corresponding parameter in the access request is replaced to obtain the replacement access code;
[0019] Parse and escape the substitution access code to obtain the database execution statement;
[0020] The database is accessed by executing statements based on the database.
[0021] Optionally, according to the monitoring method provided by the present invention, before the access request sent by the external application, the method further includes:
[0022] Based on the identity authentication information sent by the external application and the authentication configuration information pre-set by the MAP mapping layer, the MAP mapping layer authenticates the external application.
[0023] Optionally, according to the monitoring method provided by the present invention, the MAP mapping layer receives access requests from external applications, including:
[0024] The MAP mapping layer receives key-value expressions sent by external applications;
[0025] The key-value expression includes: external application interface number, database access method name, target operation data, query conditions, and table name.
[0026] Optionally, according to the monitoring method provided by the present invention, the database name, table name and field name in the database are consistent with the parameter information obtained by the HASH hash algorithm used in the MAP layer.
[0027] In a second aspect, the present invention provides a monitoring device, comprising:
[0028] The receiving module is used by the MAP mapping layer to receive access requests from external applications.
[0029] The monitoring module is used to monitor the access operations of the external application based on the access request and the monitoring restrictions of the MAP mapping layer.
[0030] The monitoring restrictions of the MAP mapping layer are used to restrict the MAP mapping layer to monitor only when the access request meets the monitoring restrictions.
[0031] Thirdly, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the monitoring method as described in the first aspect.
[0032] Fourthly, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the monitoring method as described in the first aspect.
[0033] This invention provides a monitoring method, apparatus, electronic device, and storage medium. The MAP mapping layer receives access requests from external applications and sets monitoring restrictions. When the monitoring restrictions are met, all access operations of the external application are monitored. This enables conditional autonomous monitoring of external application access operations, improving data security. Attached Figure Description
[0034] To more clearly illustrate the technical solutions in this invention 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 some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0035] Figure 1 This is a flowchart illustrating the monitoring method provided by the present invention;
[0036] Figure 2 A schematic diagram of the existing monitoring system;
[0037] Figure 3 This is a schematic diagram of the monitoring system provided by the present invention;
[0038] Figure 4 This is a diagram illustrating existing database naming conventions;
[0039] Figure 5 This is a schematic diagram of the monitoring device provided by the present invention;
[0040] Figure 6 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0041] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0042] Figure 1 This is a flowchart illustrating the monitoring method provided by the present invention, as shown below. Figure 1 As shown, the method includes the following steps:
[0043] Step 110: The MAP mapping layer receives access requests from external applications;
[0044] Optionally, Figure 2 A schematic diagram of the existing monitoring system, such as Figure 2 As shown, based on the data dictionary in the database data model, application development is carried out. According to different application scenarios, relevant logical statements are assembled and executed through Open Database Connectivity (ODBC) and other common database interfaces to access and manipulate data.
[0045] Figure 3 This is a schematic diagram of the monitoring system provided by the present invention, as shown below. Figure 3 As shown, a dedicated MAP mapping layer is built and deployed between the external application and the command line interface (CLI).
[0046] Optionally, the MAP mapping layer publishes the MAP mapping layer protocol suite to external applications. External applications submit access requests to the MAP mapping layer through the protocol suite according to their business scenarios, and the MAP mapping layer receives the access requests from external applications.
[0047] Step 120: Based on the access request and the monitoring restrictions of the MAP mapping layer, monitor the access operations of the external application;
[0048] The monitoring restrictions of the MAP mapping layer are used to restrict the MAP mapping layer to monitor only when the access request meets the monitoring restrictions.
[0049] Optionally, the MAP mapping layer accesses the database based on the received access request from the external application. If the access request meets the monitoring restrictions of the MAP mapping layer, the access operation of the external application is monitored.
[0050] Optionally, the monitoring restrictions of the MAP mapping layer are implemented by setting monitoring configurations.
[0051] Optionally, monitoring can be configured at the MAP layer to enable monitoring of operations under manually specified conditions.
[0052] For example, [ITEM-1]
[0053] KEY:=7866=6cdf:'Jiangxi Office'+4a5f:'Allen'&1667e3
[0054] TIME:=18-24 monitoring cycle
[0055] ACT:=RECORD_TO_DB_VISITLOG (Listening method)
[0056] FLLOW_NUM:=200 Maximum number of rows accessed.
[0057] EXTEND_TRACK:=1 Extended listening switch
[0058] In this configuration, [ITEM-1] represents the configuration header, KEY represents the monitoring key value, TIME represents the monitoring period (i.e., the monitoring time), ACT represents the monitoring method, FLLOW_NUM represents the maximum number of accesses per row, and EXTEND_TRACK represents the extended monitoring switch. The home address is hashed to 7866, the workplace to 6cdf, the employee name to 4a5f, and the employee table to 1667e3. This monitoring configuration allows for the monitoring and recording of up to 200 access operations to Allen's personal information at the Jiangxi office from 18:00 to 24:00 daily, with asynchronous access logs retained for future review.
[0059] For example, if the number of access operations to Allen's personal information as an employee of the Jiangxi office exceeds 200, the MAP layer will forcibly refuse to continue monitoring to avoid continuous monitoring and reduce resource consumption.
[0060] For example, if TIME:=8-18 in the monitoring configuration, it means that the MAP layer will monitor from 8:00 AM to 6:00 PM, and will refuse to monitor between 0:00 AM and 8:00 AM and between 6:00 PM and 12:00 AM.
[0061] The monitoring method provided by this invention allows the MAP mapping layer to receive access requests from external applications and, if the monitoring restrictions are met, monitor all access operations of the external applications. This enables conditional autonomous monitoring of external application access operations, improving data security.
[0062] Optionally, monitoring the access of the external application based on the access request and the monitoring restrictions of the MAP mapping layer includes:
[0063] Based on the access request, perform an access operation to the database;
[0064] If the access operation meets the monitoring restrictions, the access operation is monitored.
[0065] Optionally, based on access requests from external applications, the MAP layer performs database access operations via the CLI interface.
[0066] If the access operation meets all the monitoring restrictions set by the MAP layer, then the access operation is monitored.
[0067] If the access operation does not meet all the monitoring restrictions set by the MAP layer, the access operation will not be monitored.
[0068] For example, configure the monitoring settings in the MAP layer as follows:
[0069] [ITEM-1]
[0070] TIME:=18-24 monitoring cycle
[0071] If the access operation occurs between 18:00 and 24:00, it will be monitored. If the access does not occur between 18:00 and 24:00, it will not be monitored.
[0072] Optionally, the MAP mapping layer reads the monitoring configuration every few seconds and loads it into memory to match all access codes flowing through the MAP mapping layer.
[0073] For example, if the monitoring period limit is changed to 16-24, the MAP mapping layer reads the new monitoring configuration every 5 seconds and updates the monitoring limit conditions in real time.
[0074] This invention modifies the monitoring constraints of the MAP layer. Since the MAP mapping layer reads data every few seconds, the monitoring can be started and stopped immediately without external applications noticing, business operations are uninterrupted, and there is no loss.
[0075] Optionally, the monitoring constraints of the MAP mapping layer include at least one of the following:
[0076] Key value monitoring restrictions, monitoring time restrictions, monitoring method restrictions, maximum number of accesses per row restrictions, and extended monitoring switch restrictions;
[0077] The key-value monitoring restriction refers to the restriction on parameters in the access request.
[0078] Optionally, the monitoring restrictions of the MAP mapping layer are implemented through the monitoring configuration set in the MAP layer.
[0079] The restrictions in the monitoring configuration include at least one of the following: key-value monitoring restrictions, monitoring time restrictions, monitoring method restrictions, maximum number of accesses allowed per row restrictions, and extended monitoring switch restrictions.
[0080] Key-value monitoring restrictions are applied to parameters in the access requests. For example, KEY:=7866=6cdf:'Jiangxi Office'+4a5f:'Allen'&1667e3 indicates that access to the personal information of Allen, an employee of the Jiangxi Office, is being monitored.
[0081] Monitoring time limits, also known as monitoring cycle limits, such as TIME:=*18-24*** monitoring cycle, means that access operations between 18:00 and 24:00 will be monitored.
[0082] Monitoring method restrictions, also known as listening method restrictions, indicate that the access methods of access operations are monitored and restricted. For example, the ACT:=RECORD_TO_DB_VISITLOG listening method monitors the access operations performed on the database.
[0083] The maximum number of accesses per row is the maximum number of accesses that are allowed to be monitored. For example, if FLLOW_NUM:=200, it means that only the maximum of 200 access operations after monitoring begins will be monitored.
[0084] Extended monitoring switch limits indicate that extended monitoring is enabled. If extended monitoring is enabled, all access operations of all application IDs matching the configuration within this time period will be monitored and recorded. This is used to further track what other operations the application performed during this time period and to analyze the application's behavior. By configuring extended monitoring, additional operations performed by the same identity will also be monitored and recorded, generating more operation logs for easier backtracking and analysis.
[0085] By using the monitoring restrictions of this invention, only specified operations can be monitored and recorded asynchronously, which significantly improves both accuracy and efficiency compared to physical library access methods.
[0086] Optionally, the step of performing the database access operation based on the access request includes:
[0087] Based on the access request sent by the external application, the parameters in the access request are hashed to obtain the hashed parameter information;
[0088] Based on the hashed parameter information, the corresponding parameter in the access request is replaced to obtain the replacement access code;
[0089] Parse and escape the substitution access code to obtain the database execution statement;
[0090] The database is accessed by executing statements based on the database.
[0091] Optionally, based on the access request sent by the external application, the parameters in the access request are hashed using a HASH algorithm to obtain the hashed parameter information.
[0092] For example, to access the home address of Allen, an employee of the Jiangxi office, the access request is No143::getValue:@"Home Address"Keys:[@"Work Unit":'Jiangxi Office',@"Employee Name":'Allen']Loc:[@loc1:'Employee Table']. The home address is hashed to 7866, the work unit is hashed to 6cdf, the employee name is hashed to 4a5f, and the employee table is hashed to 1667e3.
[0093] The hashed parameter information is used to replace the corresponding parameters in the access request to obtain the replaced access code. The replaced access code is the access code obtained after replacing the parameters in the access request. For example: No143::7866=6cdf:'Jiangxi Office'+4a5f:'Allen'&1667e3
[0094] The replacement access code is parsed and escaped into a database execution statement.
[0095] For example, `Select 7866from 1667e3 where 6cdf = 'Jiangxi Office' and 4a5f = 'Allen'`
[0096] At this point, the specific database execution statement is obtained. Then, the specified database is accessed via the CLI interface to retrieve data.
[0097] This invention hashes the parameters in access requests, making the parameter information meaningless. When the log is saved and leaked to external personnel, they cannot infer or guess based on semantics, thus improving data security and reducing the risk of obtaining illegal information.
[0098] Optionally, before the access request sent by the external application, the method further includes:
[0099] Based on the identity authentication information sent by the external application and the authentication configuration information pre-set by the MAP mapping layer, the MAP mapping layer authenticates the external application.
[0100] Optionally, before sending the access request, the external application also needs to send authentication information. The authentication information is used to authenticate the external application with the authentication configuration information pre-set in the MAP mapping layer to determine whether the external application has access rights.
[0101] The authentication configuration information pre-set in the MAP mapping layer includes information on the registered application development organization and access IP, tokenID, account, password, and access port.
[0102] External applications also need to send authentication information, which may include tokenID, account, password, and access port.
[0103] Specifically, before sending an access request, the MAP mapping layer authenticates legitimate applications, registering their development organization information and access IP address, and assigning them a unique token ID, account, password, and access port. When the application accesses the MAP mapping layer, it sends authentication information: token ID, account, password, and access port. The MAP mapping layer then authenticates the application; if authentication is successful, access is granted, allowing the application to access the database.
[0104] To enable open applications, data dictionaries and access methods are typically disclosed to third-party applications. If these data dictionaries and access methods are leaked to unauthorized individuals, they can build independent, unauthorized applications and access the data using the disclosed methods. This invention, however, uses a MAP mapping layer to authenticate accessing applications, preventing unauthorized applications from gaining access and improving information security.
[0105] Optionally, the MAP mapping layer receives access requests from external applications, including:
[0106] The MAP mapping layer receives key-value expressions sent by external applications;
[0107] The key-value expression includes: external application interface number, database access method name, target operation data, query conditions, and table name.
[0108] Optionally, the MAP mapping layer adopts a key-value expression method: Idx::Method:[@val1:v..]Keys[@key1:v..]Loc[@loc1:v..]. Here, Idx can be the Idx-th predefined data acquisition method cluster number published by the MAP layer, which is also the number corresponding to the external application port number.
[0109] The `Method` parameter can be the name of a data access method. For example, `getvalue` for querying information can be accessed via the database statement `select`; `setvalue` for updating information can be accessed via the database statement `update`.
[0110] @val1 represents the target data to be operated on, which can be a collection.
[0111] Keys is a set of keyword identifiers, and @key1 is a set of keyword key-value pairs.
[0112] Loc can be a set of location information, i.e., accessing tables in the database, while @loc1 can be a set of location key-value pairs, i.e., accessing a set of table names in the database.
[0113] Con can be a collection of conditional information, and @con1 can be a collection of conditional key-value pairs.
[0114] For example, accessing the home address of Allen, an employee at the Jiangxi office. When calling the MAP layer, use a predefined method to retrieve the corresponding information, such as:
[0115] No143::getValue:@"Home Address"Keys:[@"Work Unit":'Jiangxi Office',@"Employee Name":'Allen']Loc:[@loc1:'Employee Table'].
[0116] Idx is No.143, indicating interface number 143. Method is getValue, indicating that data is selected from the database. @val1 is home address, indicating that home address is retrieved from the database table. @key1 is "Work Unit":'Jiangxi Office',"Employee Name":'Allen', indicating that data where the work unit is the Jiangxi Office and the employee name is Allen is retrieved. @loc1 is the employee table, indicating that data is retrieved from the employee table in the database.
[0117] Optionally, the key-value expression may also include conditional information. The key-value expression can be Idx::Method:[@val1:v..]Keys[@key1:v..]Loc[@loc1:v..]Con[@con1:v..].
[0118] For example, access the home addresses of any ten employees in the Jiangxi office. When calling the MAP layer, use a predefined method to retrieve the corresponding information, such as:
[0119] No143::getValue:“Home Address”Keys:[@“Work Unit”:'Jiangxi Office']Loc:[@loc1:'Employee Table']Con[@con1:“top 10”].
[0120] Where Con is a set of conditional information, and @con1: "top 10" represents the data of any ten employees.
[0121] Optionally, some key values can be modified according to different application scenarios to obtain data for the corresponding scenario.
[0122] For example, after accessing the home addresses of any ten employees in the Jiangxi office, to access the home addresses of any ten employees in the Hubei office, you only need to change the key value corresponding to the work unit from "Jiangxi office" to "Hubei office" to achieve the goal of accessing the home addresses of any ten employees in the Jiangxi office.
[0123] This invention encodes the calling method by constructing a MAP layer to form access key-value pairs, and distinguishes the acquisition operation by converting the information acquisition call into key-value encoding, thereby achieving differentiated treatment.
[0124] Optionally, the database name, table name, and field name in the database are consistent with the parameter information obtained by the HASH hash algorithm used in the MAP layer.
[0125] Figure 4 This is a diagram illustrating existing database naming conventions. In most current support systems, data is stored in different tables within a backend database. To facilitate operation, table names and fields often use meaningful phrases, such as... Figure 4 As shown, the employee backup table empbak contains various employee information, such as name (ENAME), job title (JOB), and start date (HIRDATE).
[0126] Optionally, the database name, table name, and field name in the background database are named using an obfuscated naming method consistent with the MAP mapping layer HASH hash algorithm.
[0127] For example, in the MAP mapping layer, parameters in the access request are hashed. For instance, home address is hashed as 7866, workplace as 6cdf, employee name as 4a5f, and the employee table as 1667e3. In the backend database, table name 1667e3 represents the employee table, where 7866 represents home address, 6cdf represents workplace, and 4a5f represents employee name. This obfuscated naming prevents unrelated personnel from pushing the cart based on semantics, thus protecting information security.
[0128] Optionally, deployment can be achieved using 1NF atomic information tables, with primary key associations used during application to avoid scenarios where multiple information fields are concentrated in a single table. For example, the employee table could contain name, address, and company. By storing data in silos with no practical application value, information relationships are eliminated, and primary keys are used to combine and apply relational information during specific applications.
[0129] The monitoring method provided by this invention allows the MAP mapping layer to receive access requests from external applications using key-value encoding and to access a database named using a hash algorithm, subject to monitoring restrictions set by the MAP mapping layer. If the monitoring restrictions are met, all access operations of the external application are monitored. This achieves conditional autonomous monitoring of external application access operations, improving data security.
[0130] The path confirmation device provided by the present invention is described below. The path confirmation device described below and the path confirmation method described above can be referred to in correspondence.
[0131] Figure 5 This is a schematic diagram of the monitoring device provided by the present invention, as shown below. Figure 5 The monitoring device includes a receiving module 510 and a monitoring module 520, wherein:
[0132] The receiving module 510 is used by the MAP mapping layer to receive access requests from external applications;
[0133] The monitoring module 520 is used to monitor the access operations of the external application based on the access request and the monitoring restrictions of the MAP mapping layer;
[0134] The monitoring restrictions of the MAP mapping layer are used to restrict the MAP mapping layer to monitor only when the access request meets the monitoring restrictions.
[0135] Optionally, the monitoring device receives access requests from external applications through the receiving module 510 MAP mapping layer, and then monitors the access operations of the external applications through the monitoring module 520 based on the access requests and the monitoring restrictions of the MAP mapping layer.
[0136] This invention monitors all access operations of external applications by receiving access requests from the external application through the MAP mapping layer and setting monitoring restrictions within the MAP mapping layer. This enables conditional, autonomous monitoring of external application access operations, thereby improving data security.
[0137] Optionally, monitoring the access of the external application based on the access request and the monitoring restrictions of the MAP mapping layer includes:
[0138] Based on the access request, perform an access operation to the database;
[0139] If the access operation meets the monitoring restrictions, the access operation is monitored.
[0140] Optionally, the monitoring constraints of the MAP mapping layer include at least one of the following:
[0141] Key value monitoring restrictions, monitoring time restrictions, monitoring method restrictions, maximum number of accesses per row restrictions, and extended monitoring switch restrictions;
[0142] The key-value monitoring restriction refers to the restriction on parameters in the access request.
[0143] Optionally, the step of performing the database access operation based on the access request includes:
[0144] Based on the access request sent by the external application, the parameters in the access request are hashed to obtain the hashed parameter information;
[0145] Based on the hashed parameter information, the corresponding parameter in the access request is replaced to obtain the replacement access code;
[0146] Parse and escape the substitution access code to obtain the database execution statement;
[0147] The database is accessed by executing statements based on the database.
[0148] Optionally, before the access request sent by the external application, the method further includes:
[0149] Based on the identity authentication information sent by the external application and the authentication configuration information pre-set by the MAP mapping layer, the MAP mapping layer authenticates the external application.
[0150] Optionally, the MAP mapping layer receives access requests from external applications, including:
[0151] The MAP mapping layer receives key-value expressions sent by external applications;
[0152] The key-value expression includes: external application interface number, database access method name, target operation data, query conditions, and table name.
[0153] Optionally, the database name, table name, and field name in the database are consistent with the parameter information obtained by the HASH hash algorithm used in the MAP layer.
[0154] Figure 6 A schematic diagram of the physical structure of an electronic device is shown, such as... Figure 6 As shown, the electronic device may include a processor 610, a communications interface 620, a memory 630, and a communication bus 640, wherein the processor 610, communications interface 620, and memory 630 communicate with each other via the communication bus 640. The processor 610 can call logical instructions from the memory 630 to execute a monitoring method, which includes:
[0155] The MAP mapping layer receives access requests from external applications;
[0156] Based on the access request and the monitoring restrictions of the MAP mapping layer, monitor the access operations of the external application;
[0157] The monitoring restrictions of the MAP mapping layer are used to restrict the MAP mapping layer to monitor only when the access request meets the monitoring restrictions.
[0158] Furthermore, the logical instructions in the aforementioned memory 630 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a 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, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. 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.
[0159] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the path confirmation methods provided above, the method comprising:
[0160] The MAP mapping layer receives access requests from external applications;
[0161] Based on the access request and the monitoring restrictions of the MAP mapping layer, monitor the access operations of the external application;
[0162] The monitoring restrictions of the MAP mapping layer are used to restrict the MAP mapping layer to monitor only when the access request meets the monitoring restrictions.
[0163] The device embodiments described above are merely illustrative. 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 modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0164] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0165] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A monitoring method characterized by, include: The MAP mapping layer receives access requests from external applications, and the MAP mapping layer is deployed between the external applications and the command-line interface; Based on the access request, the parameters in the access request are hashed to obtain the hashed parameter information; Based on the hashed parameter information, the corresponding parameter in the access request is replaced to obtain the replacement access code; According to the replacement access code, an access operation to the database is performed, and the database name, table name and field name in the database are consistent with the parameter information obtained by the HASH hash algorithm used by the MAP mapping layer; If the access operation meets the monitoring constraints of the MAP mapping layer, the access operation is monitored. The monitoring restrictions of the MAP mapping layer are used to restrict the MAP mapping layer to monitor only when the access request meets the monitoring restrictions.
2. The monitoring method according to claim 1, characterized in that, The monitoring restrictions of the MAP mapping layer include at least one of the following: Key value monitoring restrictions, monitoring time restrictions, monitoring method restrictions, maximum number of accesses per row restrictions, and extended monitoring switch restrictions; The key-value monitoring is limited to the parameters in the access request; The maximum number of accesses allowed per row indicates the maximum number of accesses that are permitted for monitoring. The extended monitoring switch limit indicates that if the extended monitoring switch is activated, all access operations of all application identifiers that meet the configuration within this time period will be monitored and recorded.
3. The monitoring method of claim 1, wherein, The step of performing the database access operation according to the replaced access code includes: Parse the escaped replacement access code to obtain the database execution statement; The database is accessed by executing statements based on the database.
4. The monitoring method of claim 1, wherein, Before the access request sent by the external application, the following are also included: Based on the identity authentication information sent by the external application and the authentication configuration information pre-set by the MAP mapping layer, the MAP mapping layer authenticates the external application.
5. The monitoring method of claim 1, wherein, The MAP mapping layer receives access requests from external applications, including: The MAP mapping layer receives key-value expressions sent by external applications; The key-value expression includes: external application interface number, database access method name, target operation data, query conditions, and table name.
6. A monitoring device, characterized by include: A receiving module is used for the MAP mapping layer to receive access requests from external applications. The MAP mapping layer is deployed between the external application and the command-line interface. The monitoring module is used to perform HASH hashing on the parameters in the access request based on the access request, and obtain the hashed parameter information; Based on the hashed parameter information, the corresponding parameter in the access request is replaced to obtain the replacement access code; According to the replacement access code, an access operation to the database is performed, wherein the database name, table name, and field name in the database are consistent with the parameter information obtained by the HASH hashing algorithm used by the MAP mapping layer; if the access operation meets the monitoring restriction conditions of the MAP mapping layer, the access operation is monitored. The monitoring restriction condition of the MAP mapping layer is used to restrict the MAP mapping layer to monitor only when the access request meets the monitoring restriction condition.
7. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor implements the steps of the monitoring method according to any one of claims 1 to 5 when executing the program.
8. A non-transitory computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program implements the steps of the monitoring method according to any one of claims 1 to 5 when executed by the processor.