CN111124425A - Monitoring plug-in modification method and system - Google Patents

Monitoring plug-in modification method and system Download PDF

Info

Publication number
CN111124425A
CN111124425A CN201911422924.XA CN201911422924A CN111124425A CN 111124425 A CN111124425 A CN 111124425A CN 201911422924 A CN201911422924 A CN 201911422924A CN 111124425 A CN111124425 A CN 111124425A
Authority
CN
China
Prior art keywords
monitoring plug
monitoring
plug
modification
modified
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911422924.XA
Other languages
Chinese (zh)
Other versions
CN111124425B (en
Inventor
不公告发明人
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chongqing Zhengda Huari Software Co ltd
Original Assignee
Individual
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Individual filed Critical Individual
Priority to CN201911422924.XA priority Critical patent/CN111124425B/en
Publication of CN111124425A publication Critical patent/CN111124425A/en
Application granted granted Critical
Publication of CN111124425B publication Critical patent/CN111124425B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • H04L63/101Access control lists [ACL]

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The disclosure relates to the field of software, in particular to a monitoring plug-in modification method and a system, wherein the method comprises the following steps: the server acquires the number of class names, the number of variable names and the number of interfaces of each monitoring plug-in, the throughput rate of each monitoring plug-in and the memory required by each monitoring plug-in; the server calculates the modification value of each monitoring plug-in according to a preset modification value generation model, the number of class names of each monitoring plug-in, the number of variable names, the number of interfaces, the throughput rate and the required memory; the server displays the first M monitoring plug-ins with the maximum modification value; the user equipment designates a monitoring plug-in the first M monitoring plug-ins through clicking operation; the server displays the source code of the appointed monitoring plug-in; and the first monitoring equipment receives the modified appointed monitoring plug-in returned by the server according to the monitoring plug-in updating request. The method and the device can acquire the monitoring plug-in with high modification value and can realize the controllability of the source code of the monitoring plug-in.

Description

Monitoring plug-in modification method and system
Technical Field
The disclosure relates to the field of software, and in particular, to a monitoring plug-in modification method and system.
Background
With the development of science and technology, the application of monitoring plug-ins is becoming more and more popular. In order to add functionality to the monitoring plug-in the server, the monitoring plug-in needs to be compiled. However, the monitoring plug-ins are numerous, and in the prior art, the monitoring plug-ins are manually checked, so that time and labor are wasted, and the modification efficiency cannot be improved. Therefore, how to obtain the monitoring plug-in with high modification value is an urgent problem to be solved. In addition, the existing server cannot open the source codes of all monitoring plug-ins outwards due to the need of confidentiality, and the user equipment needs to acquire the source codes of the monitoring plug-ins to modify the source codes, so that the problem that how to realize the controllability of the source codes of the monitoring plug-ins needs to be solved. In addition, when the existing server only pushes the monitoring plug-in to the monitoring device, all the monitoring plug-ins are generally pushed, network resources are wasted by pushing all the monitoring plug-ins, and an effect of accurate pushing cannot be achieved at the same time, so that the problem that how to accurately push the monitoring plug-ins to the monitoring device needs to be solved is also solved.
Disclosure of Invention
In view of this, the present disclosure provides a monitoring plug-in modification method and system, which are used to solve the problems of how to obtain a monitoring plug-in with high modification value and how to realize controllability of a source code of the monitoring plug-in the background art.
According to an aspect of the present disclosure, there is provided a monitoring plug-in modification method, applied to a server, a user equipment and a first monitoring device, the method including:
the server acquires the number of class names, the number of variable names and the number of interfaces of each monitoring plug-in a source code of each monitoring plug-in;
the server acquires the throughput rate of each monitoring plug-in according to the running information of each monitoring plug-in, wherein the throughput rate is used for representing the data volume processed by the monitoring plug-in a preset time period;
the server acquires the memory required by each monitoring plug-in according to the memory occupation information of each monitoring plug-in;
the server calculates the modification value of each monitoring plug-in according to a preset modification value generation model, the number of class names of each monitoring plug-in, the number of variable names, the number of interfaces, the throughput rate and the required memory;
the smaller the number of class names, the number of variable names and the number of interfaces of the monitoring plug-in, the higher the throughput rate and the smaller the required memory, the higher the modification value of the monitoring plug-in;
the server sequences the modification values of the monitoring plug-ins, and displays the first M monitoring plug-ins with the maximum modification value on a task page, wherein M is a preset numerical value;
the user equipment accesses the task page through an account and a password, and designates a monitoring plug-in the first M monitoring plug-ins through clicking operation;
the server acquires a monitoring plug-in appointed by the user equipment in the first M monitoring plug-ins according to the clicking operation, places the appointed monitoring plug-in a modification state, and displays a source code of the appointed monitoring plug-in;
the user equipment creates a modification declaration event, wherein the source MAC address of the modification declaration event is the MAC address of the user equipment;
the server receives a modification declaration event submitted by the user equipment, detects whether an MAC address of the user equipment is in a preset white list and detects whether a plug-in number carried by the modification declaration event is the plug-in number of the specified monitoring plug-in, if not, intercepts the modification declaration event, if so, confirms a code segment waiting for modification according to a modification position in a source code of the specified monitoring plug-in through the modification declaration event and through an interface provided by a kernel mode, replaces characters in the code segment waiting for modification by modification characters, and repackages the source code of the specified monitoring plug-in after the replacement is finished to generate the modified specified monitoring plug-in;
and the first monitoring equipment sends a monitoring plug-in updating request to the server and receives the modified appointed monitoring plug-in returned by the server according to the monitoring plug-in updating request.
According to another aspect of the present disclosure, a monitoring plug-in modification system is applied to a server, a user device and a first monitoring device, wherein the server comprises a first obtaining module, a second obtaining module, a third obtaining module, a modification value obtaining module, a fourth obtaining module and a generating module, the user device comprises a creating module, and the first monitoring device comprises a monitoring plug-in receiving module;
the first obtaining module is configured to obtain, by the server, the number of class names, the number of variable names, and the number of interfaces of each monitoring plug-in a source code of each monitoring plug-in;
the second obtaining module is configured to obtain, by the server, a throughput rate of each monitoring plugin according to the operation information of each monitoring plugin, where the throughput rate is used to indicate a data amount processed by the monitoring plugin in a preset time period;
the third obtaining module is configured to obtain, by the server, the memory required by each monitoring plug-in according to the memory occupation information of each monitoring plug-in;
the modification value acquisition module is used for calculating the modification value of each monitoring plug-in by the server according to a preset modification value generation model, the number of class names, the number of variable names, the number of interfaces, the throughput rate and the required memory of each monitoring plug-in;
the smaller the number of class names, the number of variable names and the number of interfaces of the monitoring plug-in, the higher the throughput rate and the smaller the required memory, the higher the modification value of the monitoring plug-in;
the display module is used for the server to sequence the modification values of the monitoring plug-ins and display the first M monitoring plug-ins with the maximum modification value on a task page, wherein M is a preset numerical value;
the specifying module is used for the user equipment to access the task page through an account and a password and to specify a monitoring plug-in the first M monitoring plug-ins through clicking operation;
the fourth obtaining module is configured to, by the server, obtain, according to the click operation, a monitoring plug-in specified by the user equipment among the first M monitoring plug-ins, place the specified monitoring plug-in a modified state, and display a source code of the specified monitoring plug-in;
the creating module is configured to create, by the user equipment, a modification declaration event, where a source MAC address of the modification declaration event is an MAC address of the user equipment;
the generation module is configured to receive a modification declaration event submitted by the user equipment, detect whether an MAC address of the user equipment is in a preset white list, detect whether a plug-in number carried by the modification declaration event is the plug-in number of the specified monitoring plug-in, intercept the modification declaration event if the MAC address of the user equipment is not in the preset white list, determine, through an interface provided in a kernel state, a code segment to be modified in a source code of the specified monitoring plug-in according to a modification position through the modification declaration event if the MAC address of the user equipment is not in the preset white list, replace a character in the code segment to be modified with a modification character, and repack the source code of the specified monitoring plug-in after the replacement is completed to generate the modified specified monitoring plug-in;
and the monitoring plug-in receiving module is used for sending a monitoring plug-in updating request to the server by the first monitoring equipment and receiving the modified appointed monitoring plug-in returned by the server according to the monitoring plug-in updating request.
According to the monitoring plug-in modification method and system disclosed by the embodiments of the disclosure, the server generates a model according to preset modification value, the number of class names, the number of variable names, the number of interfaces, the throughput rate and the required memory of each monitoring plug-in, and the modification value of each monitoring plug-in is calculated, so that the monitoring plug-in with high modification value can be obtained, and in addition, the source code of the monitoring plug-in can be controlled by displaying the source code of the specified monitoring plug-in.
Other features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments, which proceeds with reference to the accompanying drawings.
Drawings
Fig. 1 shows a flowchart of a monitoring plug-in modification method according to an embodiment of the present disclosure.
Fig. 2 shows a block diagram of a monitoring plug-in modification system according to an embodiment of the present disclosure.
Detailed Description
Fig. 1 shows a flowchart of a monitoring plug-in modification method according to an embodiment of the present disclosure. The monitoring plug-in modification method may be used for a server, a user device and a first monitoring device. As shown in fig. 1, the monitoring plug-in modification method may include:
s1, the server obtains the number of class names, the number of variable names and the number of interfaces of each monitoring plug-in the source code of each monitoring plug-in;
the server obtains the number of class names, the number of variable names and the number of interfaces of each monitoring plug-in a source code of each monitoring plug-in through a statistical tool.
For example, the variable names are composed of numbers, underlines, and letters, and according to the specification, semantic analysis is performed on the source code by using a semantic analysis tool, so that the variable names in the source code can be obtained, and then the number of the variable names is obtained by using a statistical tool.
Similarly, the number of the class names and the number of the interfaces are obtained by performing semantic analysis on the source code by using a semantic analysis tool, further obtaining the class names and the interfaces in the source code, and then obtaining the number of the class names and the number of the interfaces by using a statistical tool.
S2, the server acquires the throughput rate of each monitoring plug-in according to the running information of each monitoring plug-in, wherein the throughput rate is used for representing the data volume processed by the monitoring plug-in a preset time period;
the preset time period is preset by a user or default by a system, and is not limited herein.
S3, the server acquires the memory required by each monitoring plug-in according to the memory occupation information of each monitoring plug-in;
and the server acquires the memory occupation information of each monitoring plug-in the system process.
S4, the server calculates the modification value of each monitoring plug-in according to a preset modification value generation model, the number of class names, the number of variable names, the number of interfaces, the throughput rate and the required memory of each monitoring plug-in;
it should be noted that:
wherein the modification value generation model is as follows:
Vi=Fi*T(W1*Ai/A+W2*Bi/B+W3*Ci/C)/Ni
wherein, ViValue of the monitoring plug-in described for the ith, FiIs the ratio of the throughput rate of the ith monitoring card to a preset throughput rate, AiNumber of class names for the monitoring plug-ins described for the ith, BiNumber of variable names for the monitoring plug-in described for the ith, CiThe number of interfaces of the ith monitoring plug-in; n is a radical ofiThe ratio of the memory required by the ith monitoring plug-in to a preset memory is shown, T is preset reference time, and W1, W2 and W3 are preset weight values; a is a preset value of the number of class names, B is a preset value of the number of variable names, and C is a preset value of the number of interfaces.
And T is preset reference time and is used for indicating the time required for modifying the source code of the monitoring plug-in when the preset value of the number of the class names of the source code of the monitoring plug-in is A, the preset value of the variable name is B and the preset value of the number of the interfaces is C.
Wherein, T is preset by the user or is not limited by the default of the system.
The larger the number of the class names, the number of the variable names and the number of the interfaces of the monitoring plug-in are, the smaller the throughput rate is, and the larger the required memory is, the smaller the modification value of the monitoring plug-in is;
the smaller the number of class names, the number of variable names and the number of interfaces of the monitoring plug-in, the higher the throughput rate and the smaller the required memory, the greater the modification value of the monitoring plug-in.
The preset throughput rate and the preset memory are preset by a user or default by a system, and are not limited herein.
Preferably, the preset throughput rate is an average throughput rate of the monitoring plug-ins of the server. The preset memory is the average memory of the monitoring plug-in of the server.
S5, the server sequences the modification values of the monitoring plug-ins, and displays the first M monitoring plug-ins with the maximum modification value on a task page, wherein M is a preset value;
wherein the task page is used for issuing modification tasks. And displaying the first M monitoring plug-ins with the maximum modification value on the task page.
S6, the user equipment accesses the task page through an account and a password, and appoints a monitoring plug-in the first M monitoring plug-ins through clicking operation;
therefore, after the developer uses the user equipment to see the task page, the developer designates the monitoring plug-in the first M monitoring plug-ins through clicking operation, and the designated monitoring plug-in is the monitoring plug-in needing to be modified.
S7, the server acquires the monitoring plug-in appointed by the user equipment in the first M monitoring plug-ins according to the clicking operation, places the appointed monitoring plug-in a modification state, and displays the source code of the appointed monitoring plug-in;
s8, the user equipment creates a modification declaration event, and the source MAC address of the modification declaration event is the MAC address of the user equipment;
s9, the server receives a modification declaration event submitted by the user equipment, detects whether the MAC address of the user equipment is in a preset white list and detects whether a plug-in number carried by the modification declaration event is the plug-in number of the specified monitoring plug-in, if not, intercepts the modification declaration event, if so, confirms a code segment waiting for modification according to a modification position in a source code of the specified monitoring plug-in through the modification declaration event and through an interface provided by a kernel state, replaces characters in the code segment waiting for modification by modification characters, and repackages the source code of the specified monitoring plug-in after the replacement is finished to generate the modified specified monitoring plug-in;
the server can complete the access to the source code of any monitoring plug-in the system through the interface provided by the kernel mode.
The server detects whether the plug-in number carried by the modification declaration event is the plug-in number of the specified monitoring plug-in, and if not, the modification declaration event is intercepted.
And S10, the first monitoring device sends a monitoring plug-in updating request to the server and receives the modified appointed monitoring plug-in returned by the server according to the monitoring plug-in updating request.
It should be noted that: s10, specifically:
the first monitoring equipment sends a monitoring plug-in updating request to the server, wherein the monitoring plug-in updating request carries an updating identifier and a plug-in number;
and the server judges whether the plug-in number carried by the monitoring plug-in updating request is the plug-in number of the appointed monitoring plug-in, and when the plug-in number carried by the monitoring plug-in updating request is the plug-in number of the appointed monitoring plug-in, the server modifies the appointed monitoring plug-in returned according to the monitoring plug-in updating request.
The problem of how to accurately push the monitoring plug-in to the monitoring equipment is solved according to the modified specified monitoring plug-in returned by the monitoring plug-in updating request, and the pushing efficiency of the monitoring plug-in is improved.
Wherein, the update identifier is user-defined or default, and preferentially, the update identifier is update.
In an embodiment of the present disclosure, the server calculates the modification value of each monitoring plug-in according to a preset modification value generation model, the number of class names, the number of variable names, the number of interfaces, the throughput rate, and a required memory of each monitoring plug-in, so that a monitoring plug-in with a high modification value can be obtained, and in addition, the source code of the monitoring plug-in can be controlled by displaying the source code of the designated monitoring plug-in.
In a possible implementation manner, the modification declaration event carries a plug-in number, a modification position, and a modification character, where the modification character includes: modification code of class name, modification code of variable name, modification code of interface, read image path, number of image frames read at a time, character string to be read.
In one possible implementation, the method further includes:
the first monitoring equipment acquires the current time and the memory required by the appointed monitoring plug-in, and installs the modified appointed monitoring plug-in through an installation program when the current time is in an idle time period and the memory required by the appointed monitoring plug-in is less than the fully idle memory of the system.
In one possible implementation, the method further includes:
the first monitoring equipment runs various functions of the appointed monitoring plug-in the system, and obtains the modified compatible information of the appointed monitoring plug-in the system, wherein the compatible information comprises the modified compatible identification of the appointed monitoring plug-in;
and when the modified compatible identifier corresponding to the appointed monitoring plug-in is a second numerical value, the first monitoring device determines that the modified appointed monitoring plug-in passes through, identifies that the modified appointed monitoring plug-in is successfully compatible, and sends the modified appointed monitoring plug-in to the second monitoring device so as to enable the first monitoring device and the second monitoring device to complete sharing of the appointed monitoring plug-in.
In one possible implementation, the method further includes:
when the modified compatible identifier corresponding to the specified monitoring plug-in is a first numerical value, the first monitoring device determines that the modified specified monitoring plug-in fails to test, identifies the modified specified monitoring plug-in compatibility failure, and reports a compatibility failure message to the server, wherein the compatibility failure message carries the failure identifier and the plug-in number of the specified monitoring plug-in.
Wherein the first value and the second value are different values. The failure is identified as failed.
Fig. 2 shows a block diagram of a monitoring plug-in modification system according to an embodiment of the present disclosure. The system is applied to a server, user equipment and first monitoring equipment, as shown in fig. 2, the server comprises a first obtaining module, a second obtaining module, a third obtaining module, a modification value obtaining module, a fourth obtaining module and a generating module, the user equipment comprises a creating module, and the first monitoring equipment comprises a monitoring plug-in receiving module;
the first obtaining module is configured to obtain, by the server, the number of class names, the number of variable names, and the number of interfaces of each monitoring plug-in a source code of each monitoring plug-in;
the second obtaining module is configured to obtain, by the server, a throughput rate of each monitoring plugin according to the operation information of each monitoring plugin, where the throughput rate is used to indicate a data amount processed by the monitoring plugin in a preset time period;
the third obtaining module is configured to obtain, by the server, the memory required by each monitoring plug-in according to the memory occupation information of each monitoring plug-in;
the modification value acquisition module is used for calculating the modification value of each monitoring plug-in by the server according to a preset modification value generation model, the number of class names, the number of variable names, the number of interfaces, the throughput rate and the required memory of each monitoring plug-in;
the smaller the number of class names, the number of variable names and the number of interfaces of the monitoring plug-in, the higher the throughput rate and the smaller the required memory, the higher the modification value of the monitoring plug-in;
the display module is used for the server to sequence the modification values of the monitoring plug-ins and display the first M monitoring plug-ins with the maximum modification value on a task page, wherein M is a preset numerical value;
the specifying module is used for the user equipment to access the task page through an account and a password and to specify a monitoring plug-in the first M monitoring plug-ins through clicking operation;
the fourth obtaining module is configured to, by the server, obtain, according to the click operation, a monitoring plug-in specified by the user equipment among the first M monitoring plug-ins, place the specified monitoring plug-in a modified state, and display a source code of the specified monitoring plug-in;
the creating module is configured to create, by the user equipment, a modification declaration event, where a source MAC address of the modification declaration event is an MAC address of the user equipment;
the generation module is configured to receive a modification declaration event submitted by the user equipment, detect whether an MAC address of the user equipment is in a preset white list, detect whether a plug-in number carried by the modification declaration event is the plug-in number of the specified monitoring plug-in, intercept the modification declaration event if the MAC address of the user equipment is not in the preset white list, determine, through an interface provided in a kernel state, a code segment to be modified in a source code of the specified monitoring plug-in according to a modification position through the modification declaration event if the MAC address of the user equipment is not in the preset white list, replace a character in the code segment to be modified with a modification character, and repack the source code of the specified monitoring plug-in after the replacement is completed to generate the modified specified monitoring plug-in;
and the monitoring plug-in receiving module is used for sending a monitoring plug-in updating request to the server by the first monitoring equipment and receiving the modified appointed monitoring plug-in returned by the server according to the monitoring plug-in updating request.
In a possible implementation manner, the modification declaration event carries a plug-in number, a modification position, and a modification character, where the modification character includes: modification code of class name, modification code of variable name, modification code of interface, read image path, number of image frames read at a time, character string to be read.
In one possible implementation manner, the first monitoring device further includes:
and the installation module is used for acquiring the current time and the memory required by the appointed monitoring plug-in by the first monitoring equipment, and installing the modified appointed monitoring plug-in through an installation program when the current time is in an idle time period and the memory required by the appointed monitoring plug-in is less than the fully idle memory of the system.
In one possible implementation manner, the first monitoring device further includes:
a compatible information obtaining module, configured to run each function of the specified monitoring plug-in a system by the first monitoring device, and obtain modified compatible information of the specified monitoring plug-in the system, where the compatible information includes a modified compatible identifier of the specified monitoring plug-in;
and the sharing module is used for determining that the modified specified monitoring plug-in passes when the modified compatible identifier corresponding to the specified monitoring plug-in is a second numerical value, identifying that the modified specified monitoring plug-in is successfully compatible, and sending the modified specified monitoring plug-in to the second monitoring equipment by the first monitoring equipment so as to enable the first monitoring equipment and the second monitoring equipment to share the specified monitoring plug-in.
In one possible implementation manner, the first monitoring device further includes:
a reporting module, configured to, when the modified compatible identifier corresponding to the specified monitoring plug-in is a first numerical value, the first monitoring device determines that the modified specified monitoring plug-in fails to test, identifies a compatibility failure of the modified specified monitoring plug-in, and reports a compatibility failure message to the server, where the compatibility failure message carries a failure identifier and a plug-in number of the specified monitoring plug-in.
In the embodiment of the invention, the server calculates the modification value of each monitoring plug-in according to a preset modification value generation model, the number of class names, the number of variable names, the number of interfaces, the throughput rate and the required memory of each monitoring plug-in, so that the monitoring plug-in with high modification value can be obtained, and in addition, the source code of the monitoring plug-in can be controlled by displaying the source code of the appointed monitoring plug-in.
The above description of the embodiments is only intended to facilitate the understanding of the method of the invention and its core ideas; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A monitoring plug-in modification method is applied to a server, user equipment and first monitoring equipment, and is characterized by comprising the following steps:
the server acquires the number of class names, the number of variable names and the number of interfaces of each monitoring plug-in a source code of each monitoring plug-in;
the server acquires the throughput rate of each monitoring plug-in according to the running information of each monitoring plug-in, wherein the throughput rate is used for representing the data volume processed by the monitoring plug-in a preset time period;
the server acquires the memory required by each monitoring plug-in according to the memory occupation information of each monitoring plug-in;
the server calculates the modification value of each monitoring plug-in according to a preset modification value generation model, the number of class names of each monitoring plug-in, the number of variable names, the number of interfaces, the throughput rate and the required memory;
the smaller the number of class names, the number of variable names and the number of interfaces of the monitoring plug-in, the higher the throughput rate and the smaller the required memory, the higher the modification value of the monitoring plug-in;
the server sequences the modification values of the monitoring plug-ins, and displays the first M monitoring plug-ins with the maximum modification value on a task page, wherein M is a preset numerical value;
the user equipment accesses the task page through an account and a password, and designates a monitoring plug-in the first M monitoring plug-ins through clicking operation;
the server acquires a monitoring plug-in appointed by the user equipment in the first M monitoring plug-ins according to the clicking operation, places the appointed monitoring plug-in a modification state, and displays a source code of the appointed monitoring plug-in;
the user equipment creates a modification declaration event, wherein the source MAC address of the modification declaration event is the MAC address of the user equipment;
the server receives a modification declaration event submitted by the user equipment, detects whether an MAC address of the user equipment is in a preset white list and detects whether a plug-in number carried by the modification declaration event is the plug-in number of the specified monitoring plug-in, if not, intercepts the modification declaration event, if so, confirms a code segment waiting for modification according to a modification position in a source code of the specified monitoring plug-in through the modification declaration event and through an interface provided by a kernel mode, replaces characters in the code segment waiting for modification by modification characters, and repackages the source code of the specified monitoring plug-in after the replacement is finished to generate the modified specified monitoring plug-in;
and the first monitoring equipment sends a monitoring plug-in updating request to the server and receives the modified appointed monitoring plug-in returned by the server according to the monitoring plug-in updating request.
2. The method of claim 1, wherein the modification declaration event carries a plug-in number, a modification location, and a modification character, the modification character including: modification code of class name, modification code of variable name, modification code of interface, read image path, number of image frames read at a time, character string to be read.
3. The method of claim 1, wherein the method further comprises:
the first monitoring equipment acquires the current time and the memory required by the appointed monitoring plug-in, and installs the modified appointed monitoring plug-in through an installation program when the current time is in an idle time period and the memory required by the appointed monitoring plug-in is less than the fully idle memory of the system.
4. The method of claim 1, wherein the method further comprises:
the first monitoring equipment runs various functions of the appointed monitoring plug-in the system, and obtains the modified compatible information of the appointed monitoring plug-in the system, wherein the compatible information comprises the modified compatible identification of the appointed monitoring plug-in;
and when the modified compatible identifier corresponding to the appointed monitoring plug-in is a second numerical value, the first monitoring device determines that the modified appointed monitoring plug-in passes through, identifies that the modified appointed monitoring plug-in is successfully compatible, and sends the modified appointed monitoring plug-in to the second monitoring device so as to enable the first monitoring device and the second monitoring device to complete sharing of the appointed monitoring plug-in.
5. The method of claim 4, wherein the method further comprises:
when the modified compatible identifier corresponding to the specified monitoring plug-in is a first numerical value, the first monitoring device determines that the modified specified monitoring plug-in fails to test, identifies the modified specified monitoring plug-in compatibility failure, and reports a compatibility failure message to the server, wherein the compatibility failure message carries the failure identifier and the plug-in number of the specified monitoring plug-in.
6. A monitoring plug-in modification system is applied to a server, user equipment and first monitoring equipment, and is characterized in that the server comprises a first acquisition module, a second acquisition module, a third acquisition module, a modification value acquisition module, a fourth acquisition module and a generation module, the user equipment comprises a creation module, and the first monitoring equipment comprises a monitoring plug-in receiving module;
the first obtaining module is configured to obtain, by the server, the number of class names, the number of variable names, and the number of interfaces of each monitoring plug-in a source code of each monitoring plug-in;
the second obtaining module is configured to obtain, by the server, a throughput rate of each monitoring plugin according to the operation information of each monitoring plugin, where the throughput rate is used to indicate a data amount processed by the monitoring plugin in a preset time period;
the third obtaining module is configured to obtain, by the server, the memory required by each monitoring plug-in according to the memory occupation information of each monitoring plug-in;
the modification value acquisition module is used for calculating the modification value of each monitoring plug-in by the server according to a preset modification value generation model, the number of class names, the number of variable names, the number of interfaces, the throughput rate and the required memory of each monitoring plug-in;
the smaller the number of class names, the number of variable names and the number of interfaces of the monitoring plug-in, the higher the throughput rate and the smaller the required memory, the higher the modification value of the monitoring plug-in;
the display module is used for the server to sequence the modification values of the monitoring plug-ins and display the first M monitoring plug-ins with the maximum modification value on a task page, wherein M is a preset numerical value;
the specifying module is used for the user equipment to access the task page through an account and a password and to specify a monitoring plug-in the first M monitoring plug-ins through clicking operation;
the fourth obtaining module is configured to, by the server, obtain, according to the click operation, a monitoring plug-in specified by the user equipment among the first M monitoring plug-ins, place the specified monitoring plug-in a modified state, and display a source code of the specified monitoring plug-in;
the creating module is configured to create, by the user equipment, a modification declaration event, where a source MAC address of the modification declaration event is an MAC address of the user equipment;
the generation module is configured to receive a modification declaration event submitted by the user equipment, detect whether an MAC address of the user equipment is in a preset white list, detect whether a plug-in number carried by the modification declaration event is the plug-in number of the specified monitoring plug-in, intercept the modification declaration event if the MAC address of the user equipment is not in the preset white list, determine, through an interface provided in a kernel state, a code segment to be modified in a source code of the specified monitoring plug-in according to a modification position through the modification declaration event if the MAC address of the user equipment is not in the preset white list, replace a character in the code segment to be modified with a modification character, and repack the source code of the specified monitoring plug-in after the replacement is completed to generate the modified specified monitoring plug-in;
and the monitoring plug-in receiving module is used for sending a monitoring plug-in updating request to the server by the first monitoring equipment and receiving the modified appointed monitoring plug-in returned by the server according to the monitoring plug-in updating request.
7. The system of claim 6, wherein the modification declaration event carries a plug-in number, a modification location, and a modification character, the modification character including: modification code of class name, modification code of variable name, modification code of interface, read image path, number of image frames read at a time, character string to be read.
8. The system of claim 6, wherein the first monitoring device further comprises:
and the installation module is used for acquiring the current time and the memory required by the appointed monitoring plug-in by the first monitoring equipment, and installing the modified appointed monitoring plug-in through an installation program when the current time is in an idle time period and the memory required by the appointed monitoring plug-in is less than the fully idle memory of the system.
9. The system of claim 6, wherein the first monitoring device further comprises:
a compatible information obtaining module, configured to run each function of the specified monitoring plug-in a system by the first monitoring device, and obtain modified compatible information of the specified monitoring plug-in the system, where the compatible information includes a modified compatible identifier of the specified monitoring plug-in;
and the sharing module is used for determining that the modified specified monitoring plug-in passes when the modified compatible identifier corresponding to the specified monitoring plug-in is a second numerical value, identifying that the modified specified monitoring plug-in is successfully compatible, and sending the modified specified monitoring plug-in to the second monitoring equipment by the first monitoring equipment so as to enable the first monitoring equipment and the second monitoring equipment to share the specified monitoring plug-in.
10. The system of claim 9, wherein the first monitoring device further comprises:
a reporting module, configured to, when the modified compatible identifier corresponding to the specified monitoring plug-in is a first numerical value, the first monitoring device determines that the modified specified monitoring plug-in fails to test, identifies a compatibility failure of the modified specified monitoring plug-in, and reports a compatibility failure message to the server, where the compatibility failure message carries a failure identifier and a plug-in number of the specified monitoring plug-in.
CN201911422924.XA 2019-12-31 2019-12-31 Monitoring plug-in modification method and system Active CN111124425B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911422924.XA CN111124425B (en) 2019-12-31 2019-12-31 Monitoring plug-in modification method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911422924.XA CN111124425B (en) 2019-12-31 2019-12-31 Monitoring plug-in modification method and system

Publications (2)

Publication Number Publication Date
CN111124425A true CN111124425A (en) 2020-05-08
CN111124425B CN111124425B (en) 2022-04-26

Family

ID=70507852

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911422924.XA Active CN111124425B (en) 2019-12-31 2019-12-31 Monitoring plug-in modification method and system

Country Status (1)

Country Link
CN (1) CN111124425B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140047413A1 (en) * 2012-08-09 2014-02-13 Modit, Inc. Developing, Modifying, and Using Applications
US20160062745A1 (en) * 2014-08-27 2016-03-03 Akhila Rao Adaptive, context-aware, model-based suggestions
CN106293667A (en) * 2015-05-27 2017-01-04 阿里巴巴集团控股有限公司 A kind of application modification detection method and device
US20180088915A1 (en) * 2016-09-29 2018-03-29 Ca, Inc. Application-type independent dynamic plug-in evaluation tool
EP3362891A1 (en) * 2015-10-16 2018-08-22 Microsoft Technology Licensing, LLC Customizing program features on a per-user basis
CN109241684A (en) * 2018-11-02 2019-01-18 中国航天标准化研究所 A kind of reusability evaluation method towards modeling and simulation
CN109670913A (en) * 2018-12-14 2019-04-23 泰康保险集团股份有限公司 Method, apparatus, medium and the electronic equipment of service are provided for the tenant of platform
US20190173732A1 (en) * 2007-06-09 2019-06-06 Open Text Sa Ulc Supplying applications to mobile devices
CN110233832A (en) * 2019-05-22 2019-09-13 中国电子科技集团公司第二十八研究所 Toughness information service cloud environment test assessment system and its application method
CN110554861A (en) * 2018-06-03 2019-12-10 苹果公司 Software development environment with compile and read-evaluate-print-loop operations

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190173732A1 (en) * 2007-06-09 2019-06-06 Open Text Sa Ulc Supplying applications to mobile devices
US20140047413A1 (en) * 2012-08-09 2014-02-13 Modit, Inc. Developing, Modifying, and Using Applications
US20160062745A1 (en) * 2014-08-27 2016-03-03 Akhila Rao Adaptive, context-aware, model-based suggestions
CN106293667A (en) * 2015-05-27 2017-01-04 阿里巴巴集团控股有限公司 A kind of application modification detection method and device
EP3362891A1 (en) * 2015-10-16 2018-08-22 Microsoft Technology Licensing, LLC Customizing program features on a per-user basis
US20180088915A1 (en) * 2016-09-29 2018-03-29 Ca, Inc. Application-type independent dynamic plug-in evaluation tool
CN110554861A (en) * 2018-06-03 2019-12-10 苹果公司 Software development environment with compile and read-evaluate-print-loop operations
CN109241684A (en) * 2018-11-02 2019-01-18 中国航天标准化研究所 A kind of reusability evaluation method towards modeling and simulation
CN109670913A (en) * 2018-12-14 2019-04-23 泰康保险集团股份有限公司 Method, apparatus, medium and the electronic equipment of service are provided for the tenant of platform
CN110233832A (en) * 2019-05-22 2019-09-13 中国电子科技集团公司第二十八研究所 Toughness information service cloud environment test assessment system and its application method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
HENRY.ZHU: "修改Zabbix Percona监控插件模板&自定义监控项目", 《HTTPS://BLOG.CSDN.NET/DUSTZHU/ARTICLE/DETAILS/103688190》 *
黎健松: "属性数值设定过程(二)——属性价值模型", 《HTTPS://ZHUANLAN.ZHIHU.COM/P/34152033》 *

Also Published As

Publication number Publication date
CN111124425B (en) 2022-04-26

Similar Documents

Publication Publication Date Title
CN106933709B (en) Test method and device
CN108255707B (en) Development role creating method, device, equipment and storage medium of test case
US8495592B2 (en) Presenting completion progress status of an installer via join points
US20200057550A1 (en) Method and apparatus for generating customized visualization component
CN113467980B (en) Log output method, device and system and embedded equipment
CN106339177A (en) Method and device for creating virtual machines
CN109726108B (en) Front-end code testing method, device, system and medium based on analog data
CN106612204B (en) Service checking method and device
CN112954040A (en) Method, system, device and storage medium for embedding application release server
CN107357721B (en) Method and device for testing system
CN113360379B (en) Program test environment creation method and program test environment creation apparatus
CN108595178B (en) Hook-based data acquisition method, device and equipment
CN111124425B (en) Monitoring plug-in modification method and system
CN112579452A (en) Software automation test method, device, equipment and storage medium
CN112199273A (en) Virtual machine pressure/performance testing method and system
CN111131440A (en) Resource scheduling method and device and server
CN113254158B (en) Deployment method and device of deep learning system
CN114546410A (en) Code optimization method based on design mode and related equipment
CN112073462B (en) Positioning method and device
CN112307379B (en) Page generation method, device and equipment
CN113495723A (en) Method and device for calling functional component and storage medium
CN114527993A (en) Application deployment method, device, equipment and medium
CN112527668A (en) Applet safety debugging method and device, mobile terminal and storage medium
CN111158654A (en) Algorithm calling method, device, server and storage medium
CN112612514B (en) Program development method and device, storage medium and electronic device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20220406

Address after: 401120 floor 17, Pisces block B, No. 55, middle section of Huangshan Avenue, Yubei District, Chongqing

Applicant after: Chongqing Zhengda Huari Software Co.,Ltd.

Address before: 518000 room 1705, Xinghe century building, 3069 CaiTian Road, Futian District, Shenzhen, Guangdong Province

Applicant before: Li Jianmeng

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant