CN117061310A - Device image generation method, device, storage medium and electronic device - Google Patents

Device image generation method, device, storage medium and electronic device Download PDF

Info

Publication number
CN117061310A
CN117061310A CN202311030319.4A CN202311030319A CN117061310A CN 117061310 A CN117061310 A CN 117061310A CN 202311030319 A CN202311030319 A CN 202311030319A CN 117061310 A CN117061310 A CN 117061310A
Authority
CN
China
Prior art keywords
information
target
equipment
port
state
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
CN202311030319.4A
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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202311030319.4A priority Critical patent/CN117061310A/en
Publication of CN117061310A publication Critical patent/CN117061310A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application discloses a method and a device for generating equipment portrait, a storage medium and electronic equipment, and relates to the field of financial science and technology and other related technical fields. Wherein the method comprises the following steps: the method comprises the steps of obtaining basic information of target equipment, wherein the basic information at least comprises equipment name, equipment model and equipment I P of the target equipment, obtaining management information, network information and alarm information of the target equipment according to the basic information, wherein the management information at least comprises management record and manager information of the target equipment, the network information at least comprises network state and port information of the target equipment, the alarm information is prompt information of the target equipment in an abnormal state, and equipment portraits of the target equipment are generated according to the basic information, the management information, the network information and the alarm information, and the equipment portraits are used for representing characteristics of the target equipment from multiple dimensions. The technical scheme of the application solves the technical problem of low accuracy of equipment portrait generation in the prior art.

Description

Device image generation method, device, storage medium and electronic device
Technical Field
The application relates to the field of financial science and technology and other related technical fields, in particular to a method and a device for generating equipment portrait, a storage medium and electronic equipment.
Background
The equipment portrait is a portrait generated by analyzing and summarizing equipment information and equipment behaviors, and operation and maintenance personnel can update, maintain or discard, recycle and the like equipment based on the equipment images. In the prior art, the equipment information according to which the equipment image is generated has singleness, for example, operation and maintenance personnel often describe the corresponding equipment image based on basic attributes such as manufacturer and model of equipment, so that the generated equipment image cannot express the characteristics of the equipment from multiple dimensions, and the problem of low accuracy of generating the equipment image is caused.
In view of the above problems, no effective solution has been proposed at present.
Disclosure of Invention
The application provides a device portrait generation method, a device, a storage medium and electronic equipment, which at least solve the technical problem of low device portrait generation accuracy in the prior art.
According to one aspect of the present application, there is provided a device portrait generation method including: acquiring basic information of target equipment, wherein the basic information at least comprises equipment name, equipment model and equipment IP of the target equipment; acquiring management information, network information and alarm information of target equipment according to the basic information, wherein the management information at least comprises management records and manager information of the target equipment, the network information at least comprises network state and port information of the target equipment, and the alarm information is prompt information of the target equipment in an abnormal state; and generating a device portrait of the target device according to the basic information, the management information, the network information and the alarm information, wherein the device portrait is used for representing the characteristics of the target device from multiple dimensions.
Further, the device portrait generating method further includes: generating a device serial number corresponding to the target device according to the device name and the device model, wherein the device serial number is a unique identifier of the target device; and inquiring and obtaining management information corresponding to the target equipment in a management system by using the equipment serial number, wherein the management system at least associates and stores the equipment serial number of the target equipment, and management records and management personnel information corresponding to the equipment serial number.
Further, the device portrait generating method further includes: determining a network state of the target device through the access device IP, wherein the network state is a connected state or an unconnected state; when the network state is a connected state, acquiring network flow of the target equipment, and analyzing the network flow to obtain a port number and a port state of the target equipment, wherein the port state is a used state or an unused state; when the target equipment is in an unconnected state, the port number and the port state of the target equipment are obtained by scanning all ports of the target equipment; and generating port information of the target device according to the port number and the port state of the target device.
Further, the device portrait generating method further includes: determining the number of first ports and the number of second ports corresponding to the target device according to the port number and the port state, wherein the number of the first ports is the number of ports in the used state, and the number of the second ports is the number of ports in the unused state; and taking the port number, the first port number and the second port number as port information of the target device.
Further, the device portrait generating method further includes: after a preset time interval, re-acquiring port states of all ports of the target device; when the state of any port of the target equipment is changed, acquiring port change time, a first target port number and a second target port number, wherein the first target port number is the number of ports in a used state, the latest port state is the number of ports in a used state, and the second target port number is the number of ports in an unused state; and updating the port information of the target equipment according to the port change time, the first target port number and the second target port number.
Further, the device portrait generating method further includes: inquiring a log backup platform by using the equipment IP to obtain the CPU occupancy rate and the space value of the idle memory corresponding to the target equipment, wherein the log backup platform is used for storing the equipment IP of the target equipment and a log file corresponding to the target equipment in a correlated manner, and at least the CPU occupancy rate and the space value of the idle memory of the target equipment are recorded in the log file; generating performance alarm information corresponding to the target equipment under the condition that the CPU occupancy rate is smaller than a preset CPU threshold value; generating space alarm information corresponding to the target equipment under the condition that the space value of the idle memory is smaller than a preset space threshold value; and taking the performance alarm information and the space alarm information as the alarm information of the target equipment.
Further, the device portrait generating method further includes: counting the number of the performance alarm messages and the number of the space alarm messages corresponding to the target equipment in a preset time period; determining a performance score of the target device according to the number of the performance alarm messages, wherein the performance score and the number of the performance alarm messages are in a negative correlation relationship; determining the idle computing resource score of the target equipment according to the number of the space alarm information, wherein the idle computing resource score and the number of the space alarm information are in a negative correlation relationship; and carrying out weighted calculation on the performance scores and the idle calculation resource scores to obtain target scores corresponding to the target equipment, wherein the target scores are used for representing the running states of the target equipment.
Further, the device portrait generating method further includes: and filling the basic information, the management information, the network information, the alarm information and the target score into a preset device information table, and taking the filled device information table as a device portrait of the target device.
According to another aspect of the present application, there is also provided an apparatus for generating an equipment image, including: a first obtaining unit, configured to obtain basic information of a target device, where the basic information includes at least a device name, a device model, and a device IP of the target device; the second acquisition unit is used for acquiring management information, network information and alarm information of the target equipment according to the basic information, wherein the management information at least comprises management records and manager information of the target equipment, the network information at least comprises network state and port information of the target equipment, and the alarm information is prompt information of the target equipment in an abnormal state; and the device portrait generation unit is used for generating a device portrait of the target device according to the basic information, the management information, the network information and the alarm information, wherein the device portrait is used for characterizing the characteristics of the target device from multiple dimensions.
According to another aspect of the present application, there is also provided a computer-readable storage medium having a computer program stored therein, wherein the computer program is configured to control a device in which the computer-readable storage medium is located to execute the above-described device portrait generation method when the computer program is executed.
According to another aspect of the present application, there is also provided an electronic device, where the electronic device includes one or more processors and a memory, and the memory is configured to store one or more programs, where the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method for generating a device representation described above.
According to the method, basic information of target equipment is firstly obtained, wherein the basic information at least comprises equipment name, equipment model and equipment IP of the target equipment, then management information, network information and alarm information of the target equipment are obtained according to the basic information, the management information at least comprises management record and management personnel information of the target equipment, the network information at least comprises network state and port information of the target equipment, the alarm information is prompt information of the target equipment in an abnormal state, and then equipment images of the target equipment are generated according to the basic information, the management information, the network information and the alarm information, wherein the equipment images are used for representing characteristics of the target equipment from multiple dimensions.
From the above, the application firstly obtains the basic information of the device, then automatically obtains the management information, the network information and the alarm information of the target device according to the basic information, and then jointly generates the device portrait of the target device based on the basic information, the management information, the network information and the alarm information.
Therefore, the technical scheme of the application realizes the purpose of expressing the multidimensional features of the target equipment based on the equipment image, thereby realizing the technical effect of improving the accuracy of generating the equipment image and further solving the technical problem of low accuracy of generating the equipment image in the prior art.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
FIG. 1 is a flow chart of an alternative device representation generation method in accordance with an embodiment of the present application;
FIG. 2 is a flow chart of an alternative method of acquiring network information of a target device according to an embodiment of the application;
FIG. 3 is a flow chart of an alternative method of acquiring alert information for a target device according to an embodiment of the present application;
FIG. 4 is a flow chart of an alternative method of generating a target score according to an embodiment of the application;
FIG. 5 is a schematic diagram of an alternative device representation generation apparatus in accordance with an embodiment of the present application;
fig. 6 is a schematic diagram of an alternative electronic device according to an embodiment of the application.
Detailed Description
In order that those skilled in the art will better understand the present application, a technical solution in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that, the related information (including, but not limited to, basic information, management information, network information, alarm information, etc.) and data (including, but not limited to, data for presentation and analysis, etc.) related to the present application are information and data authorized by the user or sufficiently authorized by each party. For example, an interface is provided between the system and the relevant user or institution, before acquiring the relevant information, the system needs to send an acquisition request to the user or institution through the interface, and acquire the relevant information after receiving the consent information fed back by the user or institution.
The application is further illustrated below in conjunction with the examples.
Example 1
According to an embodiment of the present application, there is provided an embodiment of a method for generating an equipment image, it should be noted that the steps shown in the flowchart of the drawings may be performed in a computer system such as a set of computer executable instructions, and that although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in an order different from that herein.
The application provides a device portrait generating system (simply called generating system) for executing a device portrait generating method in an embodiment of the application, fig. 1 is a flowchart of an alternative device portrait generating method according to an embodiment of the application, as shown in fig. 1, the method includes the following steps:
step S101, obtaining basic information of a target device.
Specifically, the basic information includes at least a device name, a device model, and a device IP of the target device.
Optionally, the base information of the target device further includes version information of the target device.
Step S102, acquiring management information, network information and alarm information of the target equipment according to the basic information.
Specifically, the management information at least comprises management records and manager information of the target equipment, the network information at least comprises network state and port information of the target equipment, and the alarm information is prompt information of the target equipment in an abnormal state.
Optionally, the management record in the management information includes a history maintenance record and a current device state of the target device, and the manager information includes a contact way of a manager corresponding to the target device, where the current device state of the target device is a maintenance state, a normal state or a fault state, and the generating system may generate a corresponding management policy for the target device based on the current state of the target device.
Step S103, generating the equipment portrait of the target equipment according to the basic information, the management information, the network information and the alarm information.
Specifically, the device image is used to characterize the target device from multiple dimensions.
Alternatively, after the generating system obtains the device representation of the target device, the generating system may manage or maintain the device based on the device image, e.g., the generating system obtains a target score for the target device based on the device representation, the target score being used to characterize an operational state of the target device, and then the generating system determines a maintenance policy for the target device based on the target score.
In addition, the generating system analyzes the equipment portrait to obtain the safety level of the target equipment, and generates early warning information under the condition that the safety level of the target equipment is lower than a preset safety threshold, wherein the early warning information is used for prompting operation and maintenance personnel to reduce the potential risk of the target equipment.
From the above, the application firstly obtains the basic information of the device, then automatically obtains the management information, the network information and the alarm information of the target device according to the basic information, and then jointly generates the device portrait of the target device based on the basic information, the management information, the network information and the alarm information.
Therefore, the technical scheme of the application realizes the purpose of expressing the multidimensional features of the target equipment based on the equipment image, thereby realizing the technical effect of improving the accuracy of generating the equipment image and further solving the technical problem of low accuracy of generating the equipment image in the prior art.
In an alternative embodiment, the generating system generates the device serial number corresponding to the target device according to the device name and the device model, wherein the device serial number is the unique identifier of the target device, and then queries the management system for management information corresponding to the target device by using the device serial number, wherein the management system at least associates and stores the device serial number of the target device, and management records and management personnel information corresponding to the device serial number.
Optionally, the generating system acquires the MAC address and the timestamp of the target device based on the device name and the device model after acquiring the device name and the device model, and then generates the device serial number corresponding to the target device according to the MAC address and the timestamp of the target device.
In an alternative embodiment, fig. 2 is a flowchart of an alternative method for acquiring network information of a target device according to an embodiment of the present application, as shown in fig. 2, the method includes the steps of:
step S201, determining the network status of the target device by the access device IP.
Specifically, the network state is a connected state or an unconnected state.
Step S202, when the network state is the connected state, obtaining the network flow of the target device, and analyzing the network flow to obtain the port number and port state of the target device
Specifically, the port state is either a used state or an unused state.
In step S203, when the target device is in the unconnected state, the port number and the port state of the target device are obtained by scanning all ports of the target device.
Step S204, generating the port information of the target device according to the port number and the port state of the target device.
Optionally, the generating system sends a network connection request to the target device, if the network connection with the target device is successful in the preset connection time, the network state of the target device is indicated to be a connected state, and if the network connection with the target device is unsuccessful in the preset connection time, the network state of the target device is indicated to be an unconnected state.
In an alternative embodiment, the generating system first determines a first port number and a second port number corresponding to the target device according to the port number and the port state, where the first port number is a port number of which the port state is a used state, and the second port number is a port number of which the port state is an unused state, and then uses the port number, the first port number, and the second port number as port information of the target device.
In an alternative embodiment, the generating system firstly re-acquires port states of all ports of the target device after a preset time interval, and then acquires port change time, a first target port number and a second target port number when any port state of the target device changes, wherein the first target port number is the number of ports in a used state, the second target port number is the number of ports in an unused state, and then updates port information of the target device according to the port change time, the first target port number and the second target port number.
For example, the generating system acquires the number of used ports of the target device as 20 at 12:00, the number of unused ports as 40, that is, the number of first ports as 20 and the number of second ports as 40 at 12:00, the current preset interval is 20min, the generating system detects that a certain port state of the target device is changed from the used state to the unused state at 12:20, the generating system detects that the number of first target ports is 19 and the number of second target ports is 41 at 12:20, and updates the port information based on the number of first target ports and the number of second target ports.
In an alternative embodiment, fig. 3 is a flowchart of an alternative method for obtaining alert information of a target device according to an embodiment of the present application, as shown in fig. 3, the method includes the steps of:
step S301, inquiring the CPU occupancy rate and the space value of the idle memory corresponding to the target device in the log backup platform by using the device IP.
Specifically, the log backup platform is used for storing the device IP of the target device and the log file corresponding to the target device in an associated manner, and at least the CPU occupancy rate of the target device and the space value of the idle memory are recorded in the log file.
Step S302, generating performance alarm information corresponding to the target equipment under the condition that the CPU occupancy rate is smaller than a preset CPU threshold value.
Step S303, generating space alarm information corresponding to the target equipment under the condition that the space value of the idle memory is smaller than a preset space threshold value.
Step S304, the performance alarm information and the space alarm information are used as the alarm information of the target equipment.
Optionally, the generating system queries the log backup platform by using the device IP to obtain the memory occupancy rate corresponding to the target device, generates the performance alarm information corresponding to the target device when the memory occupancy rate is smaller than the preset memory threshold value, and queries the log backup platform by using the device IP to obtain the network connection rate corresponding to the target device, generates the network alarm information corresponding to the target device when the network connection rate is smaller than the preset network rate threshold value, and then uses the network alarm information as the alarm information of the target device.
In an alternative embodiment, fig. 4 is a flowchart of an alternative method of generating a target score according to an embodiment of the application, as shown in fig. 4, the method comprising the steps of:
step S401, counting the number of the performance alarm information and the number of the space alarm information corresponding to the target equipment in a preset time period.
Step S402, determining the performance score of the target equipment according to the quantity of the performance alarm information.
Specifically, there is a negative correlation between the performance score and the number of performance alert information.
Step S403, determining the idle computing resource score of the target equipment according to the number of the space warning information.
Specifically, the relationship between the free computing resource score and the number of spatial alert information is a negative correlation.
And step S404, performing weighted calculation on the performance scores and the idle calculation resource scores to obtain target scores corresponding to the target devices.
Specifically, the target score is used to characterize the operational status of the target device.
Optionally, the generating system carries out grading on the alarm information to obtain a target level corresponding to the target device, wherein the target level is in a negative correlation relationship with the number of the performance alarm information and the number of the space alarm information, then a preset level score corresponding to the target level is obtained, the preset level score is in a positive correlation relationship with the target level, and the performance score, the idle computing resource score and the preset level score are weighted and calculated to obtain a target score corresponding to the target device.
In an alternative embodiment, the generating system fills the basic information, the management information, the network information, the alarm information and the target score into a preset device information table, and takes the filled device information table as a device portrait of the target device.
According to the method, basic information of target equipment is firstly obtained, wherein the basic information at least comprises equipment name, equipment model and equipment IP of the target equipment, then management information, network information and alarm information of the target equipment are obtained according to the basic information, the management information at least comprises management record and management personnel information of the target equipment, the network information at least comprises network state and port information of the target equipment, the alarm information is prompt information of the target equipment in an abnormal state, and then equipment images of the target equipment are generated according to the basic information, the management information, the network information and the alarm information, wherein the equipment images are used for representing characteristics of the target equipment from multiple dimensions.
From the above, the application firstly obtains the basic information of the device, then automatically obtains the management information, the network information and the alarm information of the target device according to the basic information, and then jointly generates the device portrait of the target device based on the basic information, the management information, the network information and the alarm information.
Therefore, the technical scheme of the application realizes the purpose of expressing the multidimensional features of the target equipment based on the equipment image, thereby realizing the technical effect of improving the accuracy of generating the equipment image and further solving the technical problem of low accuracy of generating the equipment image in the prior art.
Example 2
According to an embodiment of the present application, there is provided an embodiment of a device image generating apparatus. FIG. 5 is a schematic diagram of an alternative device representation generation apparatus according to an embodiment of the present application, as shown in FIG. 5, the device representation generation apparatus includes: a first acquisition unit 501, a second acquisition unit 502, and a device image generation unit 503.
Specifically, the first obtaining unit is configured to obtain basic information of the target device, where the basic information includes at least a device name, a device model, and a device IP of the target device, the second obtaining unit is configured to obtain management information, network information, and alarm information of the target device according to the basic information, where the management information includes at least a management record and management personnel information of the target device, the network information includes at least a network state and port information of the target device, the alarm information is a prompt information of the target device in an abnormal state, and the device portrait generating unit is configured to generate a device portrait of the target device according to the basic information, the management information, the network information, and the alarm information, where the device portrait is used to characterize the target device from multiple dimensions.
In an alternative embodiment, the second acquisition unit further comprises: a first generation subunit and a first query subunit.
Specifically, the first generating subunit is configured to generate a device serial number corresponding to the target device according to the device name and the device model, where the device serial number is a unique identifier of the target device, and the first querying subunit is configured to query, in a management system, by using the device serial number to obtain management information corresponding to the target device, where the management system at least associates and stores the device serial number of the target device with management record and management personnel information corresponding to the device serial number.
In an alternative embodiment, the second acquisition unit further comprises: the device comprises a first determining subunit, a first acquiring subunit, a second acquiring subunit and a second generating subunit.
Specifically, a first determining subunit is configured to determine, by using an access device IP, a network state of a target device, where the network state is a connected state or an unconnected state, a first obtaining subunit is configured to obtain, when the network state is the connected state, network traffic of the target device, and analyze the network traffic to obtain a port number and a port state of the target device, where the port state is a used state or an unused state, a second obtaining subunit is configured to obtain, by scanning all ports of the target device, the port number and the port state of the target device when the target device is in the unconnected state, and a second generating subunit is configured to generate port information of the target device according to the port number and the port state of the target device.
In an alternative embodiment, the second generation subunit further comprises: a first determination module and a first generation module.
Specifically, the first determining module is configured to determine, according to the port number and the port state, a first port number and a second port number corresponding to the target device, where the first port number is a port number of which the port state is a used state, and the second port number is a port number of which the port state is an unused state, and the first generating module is configured to use the port number, the first port number, and the second port number as port information of the target device.
In an alternative embodiment, the device portrait generating apparatus further includes: a third acquisition unit, a fourth acquisition unit and an updating unit.
Specifically, the third acquiring unit is configured to re-acquire port states of all ports of the target device after a preset time interval, the fourth acquiring unit is configured to acquire, when any port state of the target device changes, port change time, a first target port number and a second target port number, where the first target port number is a number of ports in a used state, the second target port number is a number of ports in an unused state, and the updating unit is configured to update port information of the target device according to the port change time, the first target port number and the second target port number.
In an alternative embodiment, the second acquisition unit further comprises: a query subunit, a third generation subunit, a fourth generation subunit, and a fifth generation subunit.
The system comprises a query subunit, a fourth generation subunit and a fifth generation subunit, wherein the query subunit is used for querying and obtaining the CPU occupancy rate and the space value of the idle memory corresponding to the target device in the log backup platform by using the device IP, the log backup platform is used for storing the device IP of the target device and the log file corresponding to the target device in a correlated manner, the log file at least records the CPU occupancy rate and the space value of the idle memory of the target device, the third generation subunit is used for generating the performance alarm information corresponding to the target device when the CPU occupancy rate is smaller than a preset CPU threshold value, the fourth generation subunit is used for generating the space alarm information corresponding to the target device when the space value of the idle memory is smaller than the preset space threshold value, and the fifth generation subunit is used for taking the performance alarm information and the space alarm information as the alarm information of the target device.
In an alternative embodiment, the device portrait generating apparatus further includes: the device comprises a statistics unit, a first determination unit, a second determination unit and a calculation unit.
The system comprises a statistics unit, a first determination unit, a second determination unit and a calculation unit, wherein the statistics unit is used for counting the number of performance alarm information and the number of space alarm information corresponding to target equipment in a preset time period, the first determination unit is used for determining the performance score of the target equipment according to the number of the performance alarm information, the performance score and the number of the performance alarm information are in a negative correlation relationship, the second determination unit is used for determining the idle calculation resource score of the target equipment according to the number of the space alarm information, the idle calculation resource score and the number of the space alarm information are in a negative correlation relationship, the calculation unit is used for carrying out weighted calculation on the performance score and the idle calculation resource score to obtain the target score corresponding to the target equipment, and the target score is used for representing the running state of the target equipment.
In an alternative embodiment, the device representation generating unit further comprises: and a sixth generation subunit.
Specifically, the sixth generation subunit is configured to populate the basic information, the management information, the network information, the alarm information, and the target score into a preset device information table, and take the populated device information table as a device portrait of the target device.
According to the method, basic information of target equipment is firstly obtained, wherein the basic information at least comprises equipment name, equipment model and equipment IP of the target equipment, then management information, network information and alarm information of the target equipment are obtained according to the basic information, the management information at least comprises management record and management personnel information of the target equipment, the network information at least comprises network state and port information of the target equipment, the alarm information is prompt information of the target equipment in an abnormal state, and then equipment images of the target equipment are generated according to the basic information, the management information, the network information and the alarm information, wherein the equipment images are used for representing characteristics of the target equipment from multiple dimensions.
From the above, the application firstly obtains the basic information of the device, then automatically obtains the management information, the network information and the alarm information of the target device according to the basic information, and then jointly generates the device portrait of the target device based on the basic information, the management information, the network information and the alarm information.
Therefore, the technical scheme of the application realizes the purpose of expressing the multidimensional features of the target equipment based on the equipment image, thereby realizing the technical effect of improving the accuracy of generating the equipment image and further solving the technical problem of low accuracy of generating the equipment image in the prior art.
Example 3
According to another aspect of the embodiments of the present application, there is further provided a computer readable storage medium, including a stored computer program, where the computer program when executed controls a device in which the computer readable storage medium is located to execute the method for generating a device portrait according to any one of the above embodiments 1.
Example 4
According to another aspect of the embodiment of the present application, there is also provided an electronic device, including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the device representation generation method of any one of the above embodiment 1 via execution of executable instructions.
Fig. 6 is a schematic diagram of an electronic device according to an embodiment of the present application, and as shown in fig. 6, an embodiment of the present application provides an electronic device, where the electronic device includes a processor, a memory, and a program stored on the memory and capable of running on the processor, and the processor implements the device portrait generation method according to any one of the foregoing embodiments 1 when executing the program.
Alternatively, the following steps may be implemented when the processor executes the program: the method comprises the steps of obtaining basic information of target equipment, wherein the basic information at least comprises equipment name, equipment model and equipment IP of the target equipment, then obtaining management information, network information and alarm information of the target equipment according to the basic information, wherein the management information at least comprises management record and management personnel information of the target equipment, the network information at least comprises network state and port information of the target equipment, the alarm information is prompt information of the target equipment in an abnormal state, and then generating equipment portrait of the target equipment according to the basic information, the management information, the network information and the alarm information, wherein the equipment portrait is used for representing characteristics of the target equipment from multiple dimensions.
Alternatively, the following steps may be implemented when the processor executes the program: generating a device serial number corresponding to the target device according to the device name and the device model, wherein the device serial number is a unique identifier of the target device, and then inquiring and obtaining management information corresponding to the target device in a management system by utilizing the device serial number, wherein the management system at least stores the device serial number of the target device, and management records and management personnel information corresponding to the device serial number in a correlated manner.
Alternatively, the following steps may be implemented when the processor executes the program: the method comprises the steps of determining a network state of target equipment through an access equipment IP, wherein the network state is a connected state or an unconnected state, obtaining network traffic of the target equipment when the network state is the connected state, analyzing the network traffic to obtain a port number and a port state of the target equipment, wherein the port state is a used state or an unused state, obtaining the port number and the port state of the target equipment by scanning all ports of the target equipment when the target equipment is in the unconnected state, and generating port information of the target equipment according to the port number and the port state of the target equipment.
Alternatively, the following steps may be implemented when the processor executes the program: and determining the first port number and the second port number corresponding to the target device according to the port number and the port state, wherein the first port number is the port number of which the port state is in the used state, the second port number is the port number of which the port state is in the unused state, and then taking the port number, the first port number and the second port number as port information of the target device.
Alternatively, the following steps may be implemented when the processor executes the program: and after a preset time interval, acquiring port states of all ports of the target equipment again, and then acquiring port change time, a first target port number and a second target port number when any port state of the target equipment is changed, wherein the first target port number is the number of ports in a used state, the second target port number is the number of ports in an unused state, and then updating the port information of the target equipment according to the port change time, the first target port number and the second target port number.
Alternatively, the following steps may be implemented when the processor executes the program: inquiring the CPU occupancy rate and the space value of the idle memory corresponding to the target device in a log backup platform by using the device IP, wherein the log backup platform is used for storing the device IP of the target device and a log file corresponding to the target device in a correlated manner, at least the CPU occupancy rate and the space value of the idle memory of the target device are recorded in the log file, then, under the condition that the CPU occupancy rate is smaller than a preset CPU threshold value, performance alarm information corresponding to the target device is generated, then, under the condition that the space value of the idle memory is smaller than the preset space threshold value, space alarm information corresponding to the target device is generated, and finally, the performance alarm information and the space alarm information are used as alarm information of the target device.
Alternatively, the following steps may be implemented when the processor executes the program: counting the number of performance alarm information and the number of space alarm information corresponding to the target equipment in a preset time period, determining the performance score of the target equipment according to the number of the performance alarm information, wherein the performance score and the number of the performance alarm information are in a negative correlation relationship, determining the idle computing resource score of the target equipment according to the number of the space alarm information, wherein the idle computing resource score and the number of the space alarm information are in a negative correlation relationship, and finally carrying out weighted calculation on the performance score and the idle computing resource score to obtain the target score corresponding to the target equipment, wherein the target score is used for representing the running state of the target equipment.
Alternatively, the following steps may be implemented when the processor executes the program: and filling the basic information, the management information, the network information, the alarm information and the target score into a preset device information table, and taking the filled device information table as a device portrait of the target device.
From the above, the application firstly obtains the basic information of the device, then automatically obtains the management information, the network information and the alarm information of the target device according to the basic information, and then jointly generates the device portrait of the target device based on the basic information, the management information, the network information and the alarm information.
Therefore, the technical scheme of the application realizes the purpose of expressing the multidimensional features of the target equipment based on the equipment image, thereby realizing the technical effect of improving the accuracy of generating the equipment image and further solving the technical problem of low accuracy of generating the equipment image in the prior art.
The foregoing embodiment numbers of the present application are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
In the foregoing embodiments of the present application, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed technology may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of the units, for example, may be a logic function division, and may be implemented in another manner, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a Read-only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely a preferred embodiment of the present application and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present application, which are intended to be comprehended within the scope of the present application.

Claims (11)

1. A method for generating an equipment portrait is characterized by comprising the following steps:
acquiring basic information of target equipment, wherein the basic information at least comprises equipment name, equipment model and equipment IP of the target equipment;
acquiring management information, network information and alarm information of the target equipment according to the basic information, wherein the management information at least comprises management records and manager information of the target equipment, the network information at least comprises network state and port information of the target equipment, and the alarm information is prompt information of the target equipment in an abnormal state;
and generating a device portrait of the target device according to the basic information, the management information, the network information and the alarm information, wherein the device portrait is used for characterizing the characteristics of the target device from multiple dimensions.
2. The method of claim 1, wherein obtaining management information for the target device based on the base information comprises:
generating a device serial number corresponding to the target device according to the device name and the device model, wherein the device serial number is a unique identifier of the target device;
and inquiring and obtaining management information corresponding to the target equipment in a management system by using the equipment serial number, wherein the management system at least stores the equipment serial number of the target equipment, and management records and management personnel information corresponding to the equipment serial number in a correlated manner.
3. The method of claim 1, wherein obtaining network information of the target device based on the base information comprises:
determining a network state of the target device by accessing the device IP, wherein the network state is a connected state or an unconnected state;
when the network state is the connected state, acquiring the network flow of the target equipment, and analyzing the network flow to obtain a port number and a port state of the target equipment, wherein the port state is a used state or an unused state;
When the target equipment is in an unconnected state, obtaining the port number and the port state of the target equipment by scanning all ports of the target equipment;
and generating port information of the target equipment according to the port number and the port state of the target equipment.
4. The method of claim 3, wherein generating port information for the target device as a function of the port number and the port status of the target device comprises:
determining a first port number and a second port number corresponding to the target device according to the port number and the port state, wherein the first port number is the number of ports in which the port state is the used state, and the second port number is the number of ports in which the port state is the unused state;
and taking the port number, the first port number and the second port number as port information of the target device.
5. The method of claim 4, wherein after taking the port number, the first port number, and the second port number as port information of the target device, the method further comprises:
After a preset time interval, re-acquiring port states of all ports of the target device;
when any port state of the target device changes, acquiring port change time, a first target port number and a second target port number, wherein the first target port number is the number of ports in a used state, the latest port state is the number of ports in an unused state, and the second target port number is the number of ports in an up-to-date port state;
and updating the port information of the target equipment according to the port change time, the first target port number and the second target port number.
6. The method of claim 1, wherein obtaining alert information for the target device based on the base information comprises:
inquiring and obtaining the CPU occupancy rate and the space value of the idle memory corresponding to the target equipment in a log backup platform by using the equipment IP, wherein the log backup platform is used for storing the equipment IP of the target equipment and log files corresponding to the target equipment in a correlated manner, and at least the CPU occupancy rate and the space value of the idle memory of the target equipment are recorded in the log files;
Generating performance alarm information corresponding to the target equipment under the condition that the CPU occupancy rate is smaller than a preset CPU threshold value;
generating space alarm information corresponding to the target equipment under the condition that the space value of the idle memory is smaller than a preset space threshold value;
and taking the performance alarm information and the space alarm information as the alarm information of the target equipment.
7. The method of claim 6, wherein after taking the performance alert information and the spatial alert information as alert information for the target device, the method further comprises:
counting the number of the performance alarm information and the number of the space alarm information corresponding to the target equipment in a preset time period;
determining a performance score of the target device according to the number of the performance alarm messages, wherein the performance score and the number of the performance alarm messages are in a negative correlation relationship;
determining an idle computing resource score of the target equipment according to the number of the space alarm information, wherein the idle computing resource score and the number of the space alarm information are in a negative correlation relationship;
and carrying out weighted calculation on the performance score and the idle calculation resource score to obtain a target score corresponding to the target equipment, wherein the target score is used for representing the running state of the target equipment.
8. The method of claim 7, wherein generating a device representation of the target device based on the base information, the management information, the network information, and the alert information comprises:
and filling the basic information, the management information, the network information, the alarm information and the target score into a preset equipment information table, and taking the filled equipment information table as an equipment portrait of the target equipment.
9. An apparatus for generating an equipment portrait, comprising:
a first obtaining unit, configured to obtain basic information of a target device, where the basic information includes at least a device name, a device model, and a device IP of the target device;
the second acquisition unit is used for acquiring management information, network information and alarm information of the target equipment according to the basic information, wherein the management information at least comprises management records and manager information of the target equipment, the network information at least comprises network state and port information of the target equipment, and the alarm information is prompt information of the target equipment in an abnormal state;
And the device portrait generation unit is used for generating a device portrait of the target device according to the basic information, the management information, the network information and the alarm information, wherein the device portrait is used for characterizing the characteristics of the target device from multiple dimensions.
10. A computer readable storage medium, wherein a computer program is stored in the computer readable storage medium, and wherein the computer program when executed controls a device in which the computer readable storage medium is located to execute the method for generating a device representation according to any one of claims 1 to 8.
11. An electronic device comprising one or more processors and a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of generating a device representation of any of claims 1-8.
CN202311030319.4A 2023-08-15 2023-08-15 Device image generation method, device, storage medium and electronic device Pending CN117061310A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311030319.4A CN117061310A (en) 2023-08-15 2023-08-15 Device image generation method, device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311030319.4A CN117061310A (en) 2023-08-15 2023-08-15 Device image generation method, device, storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN117061310A true CN117061310A (en) 2023-11-14

Family

ID=88660423

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311030319.4A Pending CN117061310A (en) 2023-08-15 2023-08-15 Device image generation method, device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN117061310A (en)

Similar Documents

Publication Publication Date Title
JP6160064B2 (en) Application determination program, failure detection apparatus, and application determination method
CN111177165B (en) Method, device and equipment for detecting data consistency
WO2017131774A1 (en) Log event summarization for distributed server system
CN112115026B (en) Server cluster monitoring method and device, electronic equipment and readable storage medium
CN108744504B (en) Game data processing method and device, game server and game system
CN110661794B (en) Flow identification method and device, electronic equipment and readable storage medium
JP2010250854A (en) System, method, and software for distributed loading of database
CN110471749A (en) Task processing method, device, computer readable storage medium and computer equipment
CN110088744A (en) A kind of database maintenance method and its system
CN112737800A (en) Service node fault positioning method, call chain generation method and server
CN107040576A (en) Information-pushing method and device, communication system
CN114153688A (en) Distributed monitoring method and device based on cloud platform
CN108337100B (en) Cloud platform monitoring method and device
CN116418653A (en) Fault positioning method and device based on multi-index root cause positioning algorithm
CN112491625A (en) Operation and maintenance alarming method, device and equipment based on instant communication platform
CN114895879B (en) Management system design scheme determining method, device, equipment and storage medium
CN117061310A (en) Device image generation method, device, storage medium and electronic device
CN115981713A (en) Business system management method, device, equipment and storage medium
CN115150253A (en) Fault root cause determination method and device and electronic equipment
CN114860432A (en) Method and device for determining information of memory fault
CN116737764A (en) Method and device for data synchronization, electronic equipment and storage medium
CN110392104B (en) Data synchronization method, system, server and storage medium
CN111813880A (en) Method, system and storage medium for managing territorial space planning project
CN110837454A (en) Interface monitoring processing method and server
CN107957942B (en) SQL script fault repairing method and terminal thereof

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