CN117539540A - Binding method and device for monitor, storage medium and computer equipment - Google Patents

Binding method and device for monitor, storage medium and computer equipment Download PDF

Info

Publication number
CN117539540A
CN117539540A CN202311255398.9A CN202311255398A CN117539540A CN 117539540 A CN117539540 A CN 117539540A CN 202311255398 A CN202311255398 A CN 202311255398A CN 117539540 A CN117539540 A CN 117539540A
Authority
CN
China
Prior art keywords
target
monitor
node
attribute information
different
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311255398.9A
Other languages
Chinese (zh)
Inventor
樊新新
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Qianhai Huanrong Lianyi Information Technology Service Co Ltd
Original Assignee
Shenzhen Qianhai Huanrong Lianyi Information Technology Service Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Qianhai Huanrong Lianyi Information Technology Service Co Ltd filed Critical Shenzhen Qianhai Huanrong Lianyi Information Technology Service Co Ltd
Priority to CN202311255398.9A priority Critical patent/CN117539540A/en
Publication of CN117539540A publication Critical patent/CN117539540A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/75Structural analysis for program understanding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4488Object-oriented

Abstract

The invention discloses a binding method and device for a monitor, a storage medium and computer equipment, relates to the technical field of information, and mainly aims to improve binding efficiency and binding accuracy of the monitor. The method comprises the following steps: responding to a monitor binding signal corresponding to a target flow node, and acquiring node attribute information of the target flow node and flow attribute information of a target flow chart to which the target flow node belongs; determining a target service type to which the target flow node belongs based on the node attribute information and the flow attribute information; and determining a target monitor corresponding to the target flow node in each monitor under the target service type, and binding the target monitor with the target flow node. The method and the device are suitable for binding the monitor.

Description

Binding method and device for monitor, storage medium and computer equipment
Technical Field
The present invention relates to the field of information technologies, and in particular, to a method and apparatus for binding a listener, a storage medium, and a computer device.
Background
The monitor is a common java program for realizing a specific interface, and the program is specially used for monitoring the method call or attribute change of another java object, and when the monitored object has the event, a certain method of the monitor is immediately executed, wherein the monitored object can be a certain node in a certain flow, and in order to monitor the certain node, the certain node and the monitor are required to be bound in advance.
Currently, listeners are typically bound by manually entering a specific jvm class in the flow chart. However, in this manner, when a large number of listeners exist, the management is difficult, a total number of listeners need to be listed every time the listeners are bound, and a user is required to select a required listener among the massive listeners, so that binding efficiency of the listeners is low, and meanwhile, in front of the massive listeners, a situation of wrong selection exists for the user, so that binding efficiency of the listeners is low.
Disclosure of Invention
The invention provides a binding method and device for a monitor, a storage medium and computer equipment, which mainly aim to improve binding efficiency and binding accuracy of the monitor.
According to a first aspect of the present invention, there is provided a listener binding method comprising:
responding to a monitor binding signal corresponding to a target flow node, and acquiring node attribute information of the target flow node and flow attribute information of a target flow chart to which the target flow node belongs;
determining a target service type to which the target flow node belongs based on the node attribute information and the flow attribute information;
and determining a target monitor corresponding to the target flow node in each monitor under the target service type, and binding the target monitor with the target flow node.
Optionally, before determining the target service type to which the target flow node belongs based on the node attribute information and the flow attribute information, the method further includes:
registering each monitor corresponding to the different service types to different process nodes;
and establishing mapping relations between different service types and different listener databases, and storing the registration relations between each listener and different process nodes into the different listener databases corresponding to the different service types.
Optionally, the determining, in each listener in the target service type, a target listener corresponding to the target flow node includes:
determining a listener database corresponding to the target service type based on mapping relations between different service types and different listener databases;
determining at least one listener registered on the target flow node in the listener database;
and acquiring a target monitor selected by a user from the at least one monitor.
Optionally, before the determining, based on the node attribute information and the flow attribute information, a target service type to which the target flow node belongs, the method further includes:
acquiring monitoring attribute information of different monitors;
determining semantic information vectors corresponding to the monitoring attribute information;
and clustering the different listeners based on the semantic information vector to obtain the listeners under different service types.
Optionally, the clustering the different listeners based on the semantic information vector to obtain listeners under different service types includes:
initializing centroid vectors corresponding to different clusters;
calculating the distance between the semantic information vector and the centroid vector corresponding to the different clusters, and dividing the different monitors into the different clusters based on the distance;
determining updated centroid vectors corresponding to the different clusters based on semantic information vectors corresponding to listeners in the different clusters;
and dividing the different listeners into the different clusters again based on the updated centroid vector until the updated centroid vector is unchanged, and finally dividing the listeners into the different clusters to determine the listeners under different service types.
Optionally, the binding the target listener with the target flow node includes:
determining an extension field corresponding to the target monitor;
responding to the release signal of the target flow chart, and determining a configuration field corresponding to the extension field in a background engine;
and acquiring an operation state target monitor according to the configuration field, and binding the operation state target monitor with the target flow node.
Optionally, after the binding the target listener with the target flow node, the method further includes:
determining a service instance registered with a registry in response to the call signal of the target listener;
and based on the service instance, the target monitor is distributed and called by using a preset calling algorithm.
According to a second aspect of the present invention, there is provided a listener binding apparatus comprising:
the acquisition unit is used for responding to the listener binding signal corresponding to the target flow node and acquiring node attribute information of the target flow node and flow attribute information of a target flow chart to which the target flow node belongs;
a determining unit, configured to determine, based on the node attribute information and the flow attribute information, a target service type to which the target flow node belongs;
and the binding unit is used for determining a target monitor corresponding to the target flow node in each monitor under the target service type and binding the target monitor with the target flow node.
According to a third aspect of the present invention, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the above binding method of a listener.
According to a fourth aspect of the present invention there is provided a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the binding method of the listener above when executing the program.
According to the method, the device, the storage medium and the computer equipment for binding the monitor, compared with the current method for binding the monitor by manually inputting a specific jvm class in a flow chart, the method for binding the monitor acquires node attribute information of a target flow chart node and flow attribute information of the target flow chart to which the target flow chart node belongs by responding to a monitor binding signal corresponding to the target flow chart node; determining a target service type to which the target flow node belongs based on the node attribute information and the flow attribute information; and finally, determining a target monitor corresponding to the target flow node in each monitor under the target service type, and binding the target monitor with the target flow node. The method comprises the steps of determining a target service type to which a target flow node belongs through node attribute information and flow attribute information, selecting a monitor corresponding to the target flow node from all monitors under the target service type, determining the target service type through the flow attribute information and the node attribute information, selecting monitors to which the target flow node needs to be bound from among monitors under the target service type, reducing the selection range of the monitors, improving the selection efficiency of the monitors, and simultaneously selecting the target monitor from a small number of monitors, and improving the selection accuracy of the monitors, thereby improving the binding accuracy of the monitors.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiments of the invention and together with the description serve to explain the invention and do not constitute a limitation on the invention. In the drawings:
FIG. 1 is a flowchart of a method for binding a listener according to an embodiment of the present invention;
FIG. 2 illustrates a flowchart of another listener binding method provided by an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a binding device for a listener according to an embodiment of the present invention;
FIG. 4 is a schematic diagram illustrating another embodiment of a binding apparatus for a listener;
fig. 5 shows a schematic physical structure of a computer device according to an embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the drawings in conjunction with embodiments. It should be noted that, in the case of no conflict, the embodiments and features in the embodiments may be combined with each other.
At present, a specific jvm class is manually input in a flow chart to bind the listeners, and a certain listener is required to be selected for binding in the mass listeners, so that the binding efficiency of the listeners is low, and meanwhile, in front of the mass listeners, a user can have a situation of wrong selection, so that the binding efficiency of the listeners is low.
In order to solve the above problem, an embodiment of the present invention provides a binding method for a listener, as shown in fig. 1, where the method includes:
101. and responding to the listener binding signal corresponding to the target flow node, and acquiring node attribute information of the target flow node and flow attribute information of a target flow chart to which the target flow node belongs.
The target flow chart can be any flow chart, such as a leave-leave flow chart, a purchasing flow chart and the like; target flow nodes on the target flow chart, such as a primary approval node, a secondary approval node and the like; the flow attribute information may be a flow chart name, flow chart description information, flow chart id, etc., and the node attribute information may be a node name, approver information corresponding to the node, node name information, node description information, node id, etc.
Specifically, a monitor binding button is clicked for a certain target flow node in the monitor binding system, at this time, a monitor binding signal is received, after the monitor binding signal is received, node attribute information corresponding to the target flow node and flow attribute information corresponding to the target flow chart carried in the monitor binding signal are obtained, then a target service type corresponding to the target flow node is determined according to the node attribute information and the flow attribute information, and then a target monitor corresponding to the target flow node is selected from all monitors corresponding to the target service type to bind, so that the binding efficiency of the monitors can be improved by selecting monitors needing to be bound in a small range corresponding to the target service type, and meanwhile, the situation that wrong monitors are selected in a large number of monitors due to negligence of users can be avoided, and therefore the binding accuracy of the monitors can be improved.
102. And determining the target service type of the target flow node based on the node attribute information and the flow attribute information.
For the embodiment of the invention, after the node attribute information and the flow attribute information are acquired, the target service type corresponding to the target flow node can be determined according to the corresponding relation between the flow node and the service type stored in the configuration table, for example, the configuration table stores different flow ids and service types corresponding to the node ids, the target service type corresponding to the target flow node can be found in the configuration table according to the node id in the node attribute information corresponding to the target flow node and the flow id in the flow attribute information, and meanwhile, the target service type corresponding to the target flow node can be determined according to the node name or the node description information in the node attribute information, the flow name and the flow description information in the flow attribute information, and then the target service type to which the target flow node needs to be bound is determined in each monitor under the target service type.
103. And determining a target monitor corresponding to the target flow node in each monitor under the target service type, and binding the target monitor with the target flow node.
For the embodiment of the invention, after the target service type corresponding to the target flow node is determined, a plurality of listeners corresponding to the target flow node are determined in all listeners under the target service type, then the target listener is selected from the plurality of listeners, and finally the target listener is bound with the target flow node. The method comprises the steps of determining a target service type to which a target flow node belongs through node attribute information and flow attribute information, selecting a monitor corresponding to the target flow node from all monitors under the target service type, determining the target service type through the flow attribute information and the node attribute information, selecting monitors to which the target flow node needs to be bound from among monitors under the target service type, reducing the selection range of the monitors, improving the selection efficiency of the monitors, and simultaneously selecting the target monitor from a small number of monitors, and improving the selection accuracy of the monitors, thereby improving the binding accuracy of the monitors.
According to the method for binding the monitor, compared with the current mode of binding the monitor by manually inputting a specific jvm class in a flow chart, the node attribute information of the target flow chart node and the flow attribute information of the target flow chart to which the target flow chart node belongs are obtained by responding to the monitor binding signal corresponding to the target flow chart node; determining a target service type to which the target flow node belongs based on the node attribute information and the flow attribute information; and finally, determining a target monitor corresponding to the target flow node in each monitor under the target service type, and binding the target monitor with the target flow node. The method comprises the steps of determining a target service type to which a target flow node belongs through node attribute information and flow attribute information, selecting a monitor corresponding to the target flow node from all monitors under the target service type, determining the target service type through the flow attribute information and the node attribute information, selecting monitors to which the target flow node needs to be bound from among monitors under the target service type, reducing the selection range of the monitors, improving the selection efficiency of the monitors, and simultaneously selecting the target monitor from a small number of monitors, and improving the selection accuracy of the monitors, thereby improving the binding accuracy of the monitors.
Further, in order to better illustrate the above binding procedure for the listener, as a refinement and extension to the above embodiment, an embodiment of the present invention provides another method for binding a listener, as shown in fig. 2, where the method includes:
201. and responding to the listener binding signal corresponding to the target flow node, and acquiring node attribute information of the target flow node and flow attribute information of a target flow chart to which the target flow node belongs.
Specifically, a binding button is clicked on a target flow node on a target flow chart interface in the monitor binding system, a monitor binding signal is triggered at this time, after the monitor binding signal is received, flow attribute information of the target flow chart is obtained, node attribute information of the target flow node is obtained, and then a target monitor to be bound is selected according to the node attribute information and the flow attribute information.
202. And acquiring monitoring attribute information of different monitors.
The attribute information of the monitor is description information of the monitor, such as type information, monitoring function information and the like.
203. And determining semantic information vectors corresponding to the monitoring attribute information.
For the embodiment of the present invention, in order to cluster different listeners according to service types, first, a semantic information vector corresponding to attribute information of a listener needs to be determined, based on which, step 203 specifically includes: determining each character contained in the attribute information of the monitor and an embedded vector corresponding to each character; and inputting the embedded vector into the preset semantic extraction model to extract semantic information, so as to obtain a semantic information vector corresponding to the attribute information of the monitor. The preset semantic extraction model may specifically be a bert model, where the bert model includes an attention layer and a feedforward neural network layer, and the process of specifically inputting the embedded vector into the preset semantic extraction model to extract semantic information includes: inputting the embedded vector into the attention layer for feature extraction to obtain a first feature vector corresponding to each character; adding the first feature vector and the embedded vector to obtain a second feature vector corresponding to each character; and inputting the second feature vector to the feedforward neural network layer for feature extraction to obtain a semantic information vector corresponding to the attribute information of the monitor.
Specifically, firstly, each character contained in the attribute information of the monitor is determined, then each character in the attribute information of the monitor is converted into an embedded vector by Word2Vec and other Word embedding methods, the embedded vector corresponding to each character is input into a preset semantic extraction model, the semantic information vector corresponding to the attribute information of the monitor is extracted, and the specific extraction process is as follows: firstly, the embedded vectors corresponding to all the characters are input into an attention layer of a bert model for feature extraction, so that an output vector of the attention layer, namely a first feature vector corresponding to all the characters, is obtained, then the first feature vector is added with the embedded vectors corresponding to all the characters, so that a second feature vector corresponding to all the characters is obtained, and the second feature vector is input into a feedforward neural network layer for feature extraction, so that a semantic information vector corresponding to the attribute information of the monitor is obtained.
204. Based on the semantic information vector, different listeners are clustered to obtain listeners under different service types.
The different service types comprise leave service type, purchase service type, reimbursement service type and the like.
For the embodiment of the present invention, after determining the semantic information vector corresponding to the attribute information of the listener, different listeners need to be clustered according to the semantic information vector, based on which, step 204 specifically includes: initializing centroid vectors corresponding to different clusters; calculating the distance between the semantic information vector and the centroid vector corresponding to the different clusters, and dividing the different monitors into the different clusters based on the distance; determining updated centroid vectors corresponding to the different clusters based on semantic information vectors corresponding to listeners in the different clusters; and dividing the different listeners into the different clusters again based on the updated centroid vector until the updated centroid vector is unchanged, and finally dividing the listeners into the different clusters to determine the listeners under different service types.
Specifically, selecting centroid vectors corresponding to initial centroids corresponding to K clusters respectively, calculating distances from each semantic information vector to the K centroid vectors according to semantic information vectors corresponding to attribute information of different listeners, distributing each listener to the cluster corresponding to the centroid vector closest to the semantic information vector, then recalculating the centroid of each cluster and the centroid vector corresponding to each cluster according to each cluster, and dividing different listeners into different clusters again, so that different listeners are continuously divided until the positions of the centroids are unchanged, namely the centroid vectors are unchanged, and finally dividing the listeners into the different clusters to be determined as listeners under different service types.
Further, after determining the listeners under different service types, the listeners need to be registered on the flow node and stored, based on which the method comprises: registering each monitor corresponding to the different service types to different process nodes; and establishing mapping relations between different service types and different listener databases, and storing the registration relations between each listener and different process nodes into the different listener databases corresponding to the different service types.
Specifically, firstly, mapping relations between different service types and different listener databases are established, then, listener interfaces provided by an active (workflow) bottom layer are packaged and hidden, a series of custom SPI interfaces (Serial Peripheral Interface, serial peripheral interfaces) are provided according to different service scenes to which the listeners belong, and a service side only needs to select different interfaces according to own service scenes. In addition, an @ Handler (a mechanism for asynchronously handling messaging problems between threads) interface is provided, comprising flow attributes, node attributes, and this annotation is added to the implementation class of the SPI interface, i.e. the registration of individual listeners to different flow nodes is completed, indicating that this business operation needs to act on a certain node of a certain flow. In addition, a @ HandlerScan annotation (primarily for handling child and main thread communications) is provided, containing an attribute field of the scan path for scanning the class to which the @ Handler annotation is applied. Finally, by utilizing an expansion mechanism of Spring (an open-source lightweight framework), scanning @ Handler annotation when a flow is started, analyzing and packaging the listeners, storing each listener to different listener databases according to the dimension of a flow node and the dimension of a service type, and performing persistent storage, thereby completing service registration and data isolation of each listener.
205. And determining the target service type of the target flow node based on the node attribute information and the flow attribute information.
206. And determining a target monitor corresponding to the target flow node in each monitor under the target service type, and binding the target monitor with the target flow node.
For the embodiment of the present invention, after different listener registration is stored in different listener databases according to the flow node and the service type dimension, the target service type to which the target flow node belongs needs to be determined according to the node attribute information and the flow attribute information corresponding to the target flow node, and then the target listener corresponding to the target flow node is determined in each listener under the target service type, based on this, step 206 specifically includes: determining a listener database corresponding to the target service type based on mapping relations between different service types and different listener databases; determining at least one listener registered on the target flow node in the listener database; and acquiring a target monitor selected by a user from the at least one monitor.
Specifically, when a monitor is configured on a target flow chart, a target service type is determined according to a flow attribute and a node attribute, then a monitor database corresponding to the target service type is determined according to a mapping relation between different service types and different monitor databases, a plurality of monitors in the monitor database are determined, monitors registered by the target flow node are acquired from the plurality of monitors, a visual interface list display is provided, a user dynamically selects a target monitor to be bound in the list, and the interface is checked. Further, after the target monitor is not selected, the target monitor needs to be bound with the target flow node, and based on this, the method includes: determining an extension field corresponding to the target monitor; responding to the release signal of the target flow chart, and determining a configuration field corresponding to the extension field in a background engine; and acquiring an operation state target monitor according to the configuration field, and binding the operation state target monitor with the target flow node.
Specifically, after determining that the target flow node needs to be bound to the target listener, the target listener at this time is not an xml (Extensible Markup Language, extensible markup language, which is a markup language for describing data) valid location on the workflow, but is present in an extension field, and is only one type of design-state listener binding at this time.
Further, after binding the target listener with the target flow node, a distributed call needs to be made to the target listener, based on which the method includes: determining a service instance registered with a registry in response to the call signal of the target listener; and based on the service instance, the target monitor is distributed and called by using a preset calling algorithm.
The preset calling algorithm can be a dubbo generalized calling mode.
Specifically, when receiving a call signal of a target monitor, the client registers a service instance to the registry through @ DubboService, and the server pulls a running monitor configured by a flow/node at each expansion point opportunity in the process of flow circulation, then judges whether the registered monitor exists, and finally realizes distributed call of the target monitor in a dubbo (a distributed service framework) generalized call mode.
According to the other monitor binding method provided by the invention, compared with the current mode of binding monitors by manually inputting a specific jvm class in a flow chart, the method acquires node attribute information of a target flow chart node and flow attribute information of a target flow chart to which the target flow chart node belongs by responding to a monitor binding signal corresponding to the target flow chart node; acquiring monitoring attribute information of different monitors; meanwhile, determining semantic information vectors corresponding to the monitoring attribute information; clustering different listeners based on semantic information vectors to obtain listeners under different service types; then, determining a target service type to which the target flow node belongs based on the node attribute information and the flow attribute information; and finally, determining a target monitor corresponding to the target flow node in each monitor under the target service type, and binding the target monitor with the target flow node. Therefore, the monitors under different service types are obtained by clustering different monitors, node attribute information and flow attribute information are obtained, the target service type to which the target flow node belongs is determined, the monitor corresponding to the target flow node is selected from the monitors under the target service type, the target service type is determined by the flow attribute information and the node attribute information, the monitor to which the target flow node needs to be bound is selected from the monitors under the target service type, the selection range of the monitor can be reduced, the selection efficiency of the monitor is improved, meanwhile, the selection accuracy of the monitor can be improved by selecting the target monitor from a small number of monitors, and the binding accuracy of the monitor can be improved.
Further, as a specific implementation of fig. 1, an embodiment of the present invention provides a listener binding apparatus, as shown in fig. 3, where the apparatus includes: an acquisition unit 31, a determination unit 32, and a binding unit 33.
The obtaining unit 31 may be configured to obtain node attribute information of a target flow node and flow attribute information of a target flow chart to which the target flow node belongs, in response to a listener binding signal corresponding to the target flow node.
The determining unit 32 may be configured to determine, based on the node attribute information and the flow attribute information, a target service type to which the target flow node belongs.
And a binding unit 33, configured to determine a target listener corresponding to the target flow node from among the listeners in the target service type, and bind the target listener with the target flow node.
In a specific application scenario, in order to store listeners corresponding to different service types and registration nodes in different databases, as shown in fig. 4, the apparatus further includes: registration unit 34, storage unit 35.
The registration unit 34 may be configured to register each listener corresponding to the different service types to different process nodes.
The storage unit 35 may be configured to establish a mapping relationship between different service types and different listener databases, and store the registration relationship between each listener and different process nodes in the different listener databases corresponding to the different service types.
In a specific application scenario, in order to determine, among the listeners under the target service type, a target listener corresponding to the target flow node, the binding unit 33 includes a first determining module 331 and an obtaining module 332.
The first determining module 331 may be configured to determine a listener database corresponding to the target service type based on a mapping relationship between different service types and different listener databases.
The first determining module 331 may be specifically configured to determine, in the listener database, at least one listener registered on the target flow node.
The obtaining module 332 may be configured to obtain a target listener selected by a user from the at least one listener.
In a specific application scenario, in order to divide different listeners according to service types, the apparatus further includes: a clustering unit 36.
The obtaining unit 31 may be further configured to obtain listening attribute information of different listeners.
The determining unit 32 may be further configured to determine a semantic information vector corresponding to the listening attribute information.
The clustering unit 36 may be configured to cluster the different listeners based on the semantic information vector, to obtain listeners under different service types.
In a specific application scenario, in order to cluster different listeners, the clustering unit 36 includes an initialization module 361, a calculation module 362, and a second determination module 363.
The initialization module 361 may be configured to initialize centroid vectors corresponding to different clusters.
The calculating module 362 may be configured to calculate a distance between the semantic information vector and a centroid vector corresponding to the different cluster, and divide the different listeners into the different clusters based on the distance.
The second determining module 363 may be configured to determine, based on semantic information vectors corresponding to listeners in the different clusters, updated centroid vectors corresponding to the different clusters.
The initialization module 361 may be specifically configured to re-divide the different listeners into the different clusters based on the updated centroid vector until the updated centroid vector does not change, and determine the listeners that are finally divided into the different clusters as the listeners under different service types.
In a specific application scenario, in order to bind the target listener to the target flow node, the binding unit 33 includes a binding module 333.
The first determining module 331 may be further configured to determine an extension field corresponding to the target listener.
The first determining module 331 may be further configured to determine, in a background engine, a configuration field corresponding to the extension field in response to the release signal of the target flowchart.
The binding module 333 may be configured to obtain an running state target monitor according to the configuration field, and bind the running state target monitor with the target flow node.
In a specific application scenario, in order to invoke the listener, the apparatus further includes: call unit 37.
The determining unit 32 may be further configured to determine a service instance registered with the registry in response to the call signal of the target listener.
The calling unit 37 may be further configured to distributively call the target listener by using a preset calling algorithm based on the service instance.
It should be noted that, for other corresponding descriptions of each functional module related to the binding device for a monitor provided by the embodiment of the present invention, reference may be made to corresponding descriptions of the method shown in fig. 1, which are not repeated herein.
Based on the above method as shown in fig. 1, correspondingly, the embodiment of the present invention further provides a computer readable storage medium, on which a computer program is stored, which when being executed by a processor, implements the following steps: responding to a monitor binding signal corresponding to a target flow node, and acquiring node attribute information of the target flow node and flow attribute information of a target flow chart to which the target flow node belongs; determining a target service type to which the target flow node belongs based on the node attribute information and the flow attribute information; and determining a target monitor corresponding to the target flow node in each monitor under the target service type, and binding the target monitor with the target flow node.
Based on the embodiment of the method shown in fig. 1 and the device shown in fig. 3, the embodiment of the invention further provides a physical structure diagram of a computer device, as shown in fig. 5, where the computer device includes: a processor 41, a memory 42, and a computer program stored on the memory 42 and executable on the processor, wherein the memory 42 and the processor 41 are both arranged on a bus 43, the processor 41 performing the following steps when said program is executed: responding to a monitor binding signal corresponding to a target flow node, and acquiring node attribute information of the target flow node and flow attribute information of a target flow chart to which the target flow node belongs; determining a target service type to which the target flow node belongs based on the node attribute information and the flow attribute information; and determining a target monitor corresponding to the target flow node in each monitor under the target service type, and binding the target monitor with the target flow node.
According to the technical scheme, node attribute information of the target flow node and flow attribute information of a target flow chart to which the target flow node belongs are obtained by responding to a listener binding signal corresponding to the target flow node; determining a target service type to which the target flow node belongs based on the node attribute information and the flow attribute information; and finally, determining a target monitor corresponding to the target flow node in each monitor under the target service type, and binding the target monitor with the target flow node. The method comprises the steps of determining a target service type to which a target flow node belongs through node attribute information and flow attribute information, selecting a monitor corresponding to the target flow node from all monitors under the target service type, determining the target service type through the flow attribute information and the node attribute information, selecting monitors to which the target flow node needs to be bound from among monitors under the target service type, reducing the selection range of the monitors, improving the selection efficiency of the monitors, and simultaneously selecting the target monitor from a small number of monitors, and improving the selection accuracy of the monitors, thereby improving the binding accuracy of the monitors.
It will be appreciated by those skilled in the art that the modules or steps of the invention described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may alternatively be implemented in program code executable by computing devices, so that they may be stored in a memory device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than that shown or described, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps within them may be fabricated into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method of binding listeners, comprising:
responding to a monitor binding signal corresponding to a target flow node, and acquiring node attribute information of the target flow node and flow attribute information of a target flow chart to which the target flow node belongs;
determining a target service type to which the target flow node belongs based on the node attribute information and the flow attribute information;
and determining a target monitor corresponding to the target flow node in each monitor under the target service type, and binding the target monitor with the target flow node.
2. The method of claim 1, wherein prior to determining the target traffic type to which the target flow node belongs based on the node attribute information and the flow attribute information, the method further comprises:
registering each monitor corresponding to the different service types to different process nodes;
and establishing mapping relations between different service types and different listener databases, and storing the registration relations between each listener and different process nodes into the different listener databases corresponding to the different service types.
3. The method according to claim 2, wherein determining, among the listeners in the target traffic type, a target listener corresponding to the target flow node includes:
determining a listener database corresponding to the target service type based on mapping relations between different service types and different listener databases;
determining at least one listener registered on the target flow node in the listener database;
and acquiring a target monitor selected by a user from the at least one monitor.
4. The method of claim 1, wherein prior to said determining a target traffic type to which said target flow node belongs based on said node attribute information and said flow attribute information, said method further comprises:
acquiring monitoring attribute information of different monitors;
determining semantic information vectors corresponding to the monitoring attribute information;
and clustering the different listeners based on the semantic information vector to obtain the listeners under different service types.
5. The method of claim 4, wherein clustering the different listeners based on the semantic information vector results in listeners with different traffic types, comprising:
initializing centroid vectors corresponding to different clusters;
calculating the distance between the semantic information vector and the centroid vector corresponding to the different clusters, and dividing the different monitors into the different clusters based on the distance;
determining updated centroid vectors corresponding to the different clusters based on semantic information vectors corresponding to listeners in the different clusters;
and dividing the different listeners into the different clusters again based on the updated centroid vector until the updated centroid vector is unchanged, and finally dividing the listeners into the different clusters to determine the listeners under different service types.
6. The method of claim 1, wherein said binding the target listener with the target flow node comprises:
determining an extension field corresponding to the target monitor;
responding to the release signal of the target flow chart, and determining a configuration field corresponding to the extension field in a background engine;
and acquiring an operation state target monitor according to the configuration field, and binding the operation state target monitor with the target flow node.
7. The method of claim 1, wherein after said binding said target listener with said target flow node, said method further comprises:
determining a service instance registered with a registry in response to the call signal of the target listener;
and based on the service instance, the target monitor is distributed and called by using a preset calling algorithm.
8. A listener binding apparatus, comprising:
the acquisition unit is used for responding to the listener binding signal corresponding to the target flow node and acquiring node attribute information of the target flow node and flow attribute information of a target flow chart to which the target flow node belongs;
a determining unit, configured to determine, based on the node attribute information and the flow attribute information, a target service type to which the target flow node belongs;
and the binding unit is used for determining a target monitor corresponding to the target flow node in each monitor under the target service type and binding the target monitor with the target flow node.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 7.
10. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the computer program when executed by the processor implements the steps of the method according to any one of claims 1 to 7.
CN202311255398.9A 2023-09-25 2023-09-25 Binding method and device for monitor, storage medium and computer equipment Pending CN117539540A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311255398.9A CN117539540A (en) 2023-09-25 2023-09-25 Binding method and device for monitor, storage medium and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311255398.9A CN117539540A (en) 2023-09-25 2023-09-25 Binding method and device for monitor, storage medium and computer equipment

Publications (1)

Publication Number Publication Date
CN117539540A true CN117539540A (en) 2024-02-09

Family

ID=89792577

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311255398.9A Pending CN117539540A (en) 2023-09-25 2023-09-25 Binding method and device for monitor, storage medium and computer equipment

Country Status (1)

Country Link
CN (1) CN117539540A (en)

Similar Documents

Publication Publication Date Title
CN110502546B (en) Data processing method and device
CN112527848B (en) Report data query method, device and system based on multiple data sources and storage medium
JP6975153B2 (en) Data storage service processing method and equipment
CN110781183A (en) Method and device for processing incremental data in Hive database and computer equipment
CN113360519B (en) Data processing method, device, equipment and storage medium
CN111858083A (en) Remote service calling method and device, electronic equipment and storage medium
CN112306833A (en) Application program crash statistical method and device, computer equipment and storage medium
CN114401187B (en) Gray scale issuing method, device, computer equipment and storage medium
CN113111669A (en) Increment-based front-end multi-language internationalized translation method and device
CN111858617A (en) User searching method and device, computer readable storage medium and electronic equipment
CN117539540A (en) Binding method and device for monitor, storage medium and computer equipment
CN115481026A (en) Test case generation method and device, computer equipment and storage medium
CN114996246A (en) Data cleaning method for checking multiple fields of table based on NiFi assembly
CN114036218A (en) Data model switching method and device, server and storage medium
CN113448985A (en) API (application program interface) interface generation method, calling method and device and electronic equipment
CN111221847B (en) Monitoring data storage method, device and computer readable storage medium
CN112910995A (en) Resource allocation method and device based on multi-cloud environment, electronic equipment and medium
CN112860398A (en) Data processing method, device, equipment and medium based on rule engine
CN113094415A (en) Data extraction method and device, computer readable medium and electronic equipment
CN112433821B (en) Method and device for building business model, electronic equipment and medium
CN109086145B (en) Data generation method and device and computer storage medium
US20240028346A1 (en) Linking kubernetes resources with underlying cloud infrastructure
CN112948219A (en) Link tracking method and device
CN117609275A (en) Interface calling method, device, storage medium and computer equipment
CN116149654A (en) Page information determination method and device and terminal equipment

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