Device information management method, device and electronic equipment
By acquiring and encoding the attribute data of industrial equipment, building a knowledge graph and training a generative model, it solves the problem of low efficiency in equipment information management and achieves efficient management and accurate association of industrial equipment information.
Patent Information
- Application Number
- CN202410898943.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-05
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2044-07-05
AI Technical Summary
In the Internet of Things system, the efficiency of equipment information management is low and it is impossible to form a complete mapping of virtual data to the physical world. This results in poor data accessibility and the inability to comprehensively recognize industrial equipment, which affects the information management of industrial equipment and the user's perception of the production environment.
By acquiring the attribute data of industrial equipment, classifying and coding it, a knowledge graph is constructed, a generative model is trained based on the knowledge graph, an equipment information management model is generated, and the equipment information management requirements obtained in real time are input to manage the equipment information in the knowledge graph.
It improves the efficiency and completeness of equipment information management, improves the accuracy of the correlation between multiple equipment information, and ensures efficient management of industrial equipment information.
Smart Images

Figure CN118428613B
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent manufacturing technology, and in particular to a device information management method, apparatus and electronic equipment. Background Art
[0002] At present, with the rapid development of industrial production and Internet of Things applications, the number of electronic devices has increased rapidly, and device information management faces huge challenges. In the Internet of Things system, due to the diversity of data sources and the large amount of data, a large amount of data has poor accessibility and information occlusion. In order to effectively manage the data, the device data is usually organized in a coded manner and presented in a graphical or tabular manner. However, this method cannot form a complete mapping of virtual data to the physical world, cannot ensure that the information of industrial equipment is efficiently managed, and cannot ensure that users can fully understand the industrial equipment in the entire production environment. Summary of the invention
[0003] In view of the above, it is necessary to propose a device information management method, apparatus and electronic device to solve the technical problem of low management efficiency of device information.
[0004] The present application provides a device information management method, which is applied to electronic devices, and the method includes: obtaining device information of industrial equipment, wherein the device information includes at least attribute data of the industrial equipment; classifying the industrial equipment according to the attribute data to obtain the category of the industrial equipment; encoding the attribute data of the industrial equipment with the same category to obtain the category code corresponding to each category; encoding the device information of the industrial equipment with the same category to obtain the device code of the industrial equipment belonging to the same category; determining a first correlation between any two of the categories according to the category code, and determining a second correlation between any two of the industrial equipment belonging to the same category according to the device code; constructing a knowledge graph according to the category code, the device code, the first correlation and the second correlation; training a generative model based on the knowledge graph to obtain a device information management model; inputting the device information management requirements obtained in real time into the device information management model to manage the device information in the knowledge graph.
[0005] In some embodiments, the attribute data includes at least the location data of the industrial equipment, the material data corresponding to the industrial equipment, and the fault data corresponding to the industrial equipment. The encoding of the attribute data of the industrial equipment of the same category to obtain the category code of the industrial equipment of each category includes: encoding the location data to obtain a location code; encoding the material data to obtain a material code; encoding the fault data to obtain a fault code; and determining the category code corresponding to any one category based on the location code, the material code and the fault code of the industrial equipment corresponding to any one category.
[0006] In some embodiments, the equipment information also includes point cloud data of the industrial equipment, and encoding the equipment information of the industrial equipment of the same category to obtain the equipment code of the industrial equipment belonging to the same category includes: determining the point cloud code of the industrial equipment based on the point cloud data; for the industrial equipment corresponding to any one category, splicing the category code, the location code, the material code, the fault code and the point cloud code to obtain the equipment code of the industrial equipment corresponding to any one category.
[0007] In some embodiments, determining the first correlation between any two of the categories based on the category codes and determining the second correlation between any two of the industrial devices belonging to the same category based on the device codes includes: determining the cosine similarity of the category codes corresponding to any two categories to obtain the first correlation between the any two categories; calculating the cosine similarity between the device codes of any two of the industrial devices belonging to the same category to obtain the second correlation between any two of the industrial devices belonging to the same category.
[0008] In some embodiments, constructing a knowledge graph based on the category code, the device code, the first correlation and the second correlation includes: determining the category code as a first-level node, determining the device code as a second-level node; determining the first correlation between any two categories as the first edge weight between the first-level nodes corresponding to the any two categories; determining the second correlation between any two device codes of the industrial equipment belonging to the same category as the second edge weight between the corresponding second-level nodes.
[0009] In some embodiments, the training of the generative model based on the knowledge graph to obtain the device information management model includes: determining prompt data based on the device information and a pre-stored prompt template; inputting the prompt data into a pre-built initial generation model; obtaining a predicted knowledge graph corresponding to the device information; determining a loss value of the initial generation model based on the predicted knowledge graph and the knowledge graph; when the loss value is greater than a preset termination threshold, updating the predicted generation model based on a back-propagation algorithm until the loss value is less than or equal to the termination threshold, thereby obtaining a knowledge graph generation model trained to a convergence state.
[0010] In some embodiments, the prediction knowledge graph includes at least one prediction first-level node and at least one prediction second-level node, the prediction first-level node is used to characterize the prediction category code corresponding to the category, and the prediction second-level node is used to characterize the prediction device code corresponding to the industrial equipment. The prediction knowledge graph also includes a predicted first correlation between any two of the prediction category codes and a predicted second correlation between any two of the prediction device codes belonging to the same category.
[0011] In some embodiments, determining the loss value of the initial generation model according to the predicted knowledge graph and the knowledge graph includes:
[0012] , where Loss represents the loss value of the initial generation model; n represents the number of nodes in the knowledge graph; i represents the index of the node in the knowledge graph; m represents the number of nodes in the predicted knowledge graph; j represents the index of the node in the predicted knowledge graph; A ij represents the similarity between the category code of the i-th first-level node in the knowledge graph and the predicted category code of the j-th predicted first-level node in the predicted knowledge graph; B ij represents the difference between the mean of all first edge weights corresponding to the i-th first-level node in the knowledge graph and all predicted first correlations corresponding to the j-th predicted first-level node in the predicted knowledge graph; s represents the number of second-level nodes corresponding to the i-th first-level node in the knowledge graph; x represents the index of the second-level node corresponding to the i-th first-level node in the knowledge graph; t represents the number of second-level nodes corresponding to the j-th first-level node in the predicted knowledge graph; y represents the index of the second-level node corresponding to the j-th first-level node in the predicted knowledge graph; C ij xy represents the similarity between the device code of the xth secondary node corresponding to the ith primary node in the knowledge graph and the predicted device code of the yth predicted secondary node corresponding to the jth predicted primary node in the predicted knowledge graph; D ij xyRepresents the difference between the mean of all second edge weights of the x-th second-level node corresponding to the ith first-level node in the knowledge graph and the mean of all predicted second correlations of the y-th predicted second-level node corresponding to the j-th predicted first-level node in the predicted knowledge graph.
[0013] The embodiment of the present application also provides an equipment information management device, which includes: an acquisition module, which is used to acquire equipment information of industrial equipment, wherein the equipment information at least includes attribute data of the industrial equipment; a classification module, which is used to classify the industrial equipment according to the attribute data to obtain the category of the industrial equipment; an encoding module, which is used to encode the attribute data of the industrial equipment with the same category to obtain the category code corresponding to each category; the encoding module is also used to encode the equipment information of the industrial equipment with the same category to obtain the equipment code of the industrial equipment belonging to the same category; a determination module, which is used to determine the first correlation between any two of the categories according to the category code, and determine the second correlation between any two of the industrial equipment belonging to the same category according to the equipment code; the determination module is also used to construct a knowledge graph according to the category code, the equipment code, the first correlation and the second correlation; a training module, which is used to train a generative model based on the knowledge graph to obtain an equipment information management model; the determination module is also used to input the equipment information management requirements obtained in real time into the equipment information management model to manage the equipment information in the knowledge graph.
[0014] An embodiment of the present application also provides an electronic device, comprising: a memory storing at least one instruction; and a processor executing the instruction stored in the memory to implement the device information management method.
[0015] It can be seen from the above technical solutions that the embodiment of the present application classifies industrial equipment according to attribute data, encodes the equipment information of industrial equipment of the same category, determines the category code of each category according to the characteristics of industrial equipment of the same type, and the equipment code corresponding to each industrial equipment, so as to digitally represent the same type of industrial equipment, thereby improving the efficiency of managing equipment information. In this way, a knowledge graph with multi-level data can be constructed according to the category code and the equipment code, and the knowledge graph, a structured data, can be used to manage equipment information, thereby improving the integrity of the equipment information and the accuracy of the degree of correlation between multiple equipment information. Finally, a generative model is trained based on the knowledge graph to obtain a device information management model, and the real-time acquired equipment information management requirements are input into the device information management model to manage the equipment information in the knowledge graph, thereby improving the efficiency of equipment information management. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 This is an application scenario diagram of a device information management method provided in one embodiment of the present application.
[0017] Figure 2 This is a flow chart of a device information management method provided in one embodiment of the present application.
[0018] Figure 3 It is a functional module diagram of a device information management apparatus provided in one embodiment of the present application.
[0019] Figure 4 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0020] In order to more clearly understand the purpose, features and advantages of the present application, the present application is described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that, in the absence of conflict, the embodiments of the present application and the features in the embodiments can be combined with each other. In the following description, many specific details are set forth to facilitate a full understanding of the present application, and the embodiments described are only a part of the embodiments of the present application, rather than all of the embodiments.
[0021] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0022] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those generally understood by those skilled in the art to which the present application belongs. The terms used herein in the specification of the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.
[0023] The embodiment of the present application provides a device information management method, which can be applied to one or more electronic devices. The electronic device is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to a microprocessor, an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a programmable gate array (Field-Programmable Gate Array, FPGA), a digital processor (Digital Signal Processor, DSP), an embedded device, etc.
[0024] An electronic device can be any electronic product that can interact with customers, such as personal computers, tablet computers, smart phones, personal digital assistants (PDAs), game consoles, Internet Protocol Television (IPTV), smart wearable devices, etc.
[0025] The electronic device may also include a network device and / or a client device, wherein the network device includes, but is not limited to, a single network server, a server group consisting of multiple network servers, or a cloud consisting of a large number of hosts or network servers based on cloud computing.
[0026] The networks where electronic devices are located include but are not limited to the Internet, wide area network, metropolitan area network, local area network, virtual private network (VPN), etc.
[0027] like Figure 1 As shown, a device information management method provided by the present application can be applied to an electronic device 100, and the electronic device 100 is connected to a server 200 for communication. The electronic device 100 is used to obtain device information of industrial equipment from the server 200, wherein the device information at least includes attribute data of the industrial equipment; classify the industrial equipment according to the attribute data to obtain the category of the industrial equipment; encode the attribute data of the industrial equipment with the same category to obtain the category code corresponding to each category; encode the device information of the industrial equipment with the same category to obtain the device code of the industrial equipment belonging to the same category; determine the first correlation between any two of the categories according to the category code, and determine the second correlation between any two of the industrial equipment belonging to the same category according to the device code; construct a knowledge graph according to the category code, the device code, the first correlation and the second correlation; train a generative model based on the knowledge graph to obtain a device information management model; input the device information management requirements obtained in real time into the device information management model to manage the device information in the knowledge graph.
[0028] like Figure 2 , is a flow chart of a device information management method provided in an embodiment of the present application. According to different requirements, the order of the steps in the flow chart can be changed, and some steps can be omitted. A device information management method provided in an embodiment of the present application includes the following steps.
[0029] S20, acquiring equipment information of the industrial equipment, wherein the equipment information at least includes attribute data of the industrial equipment.
[0030] In one embodiment of the present application, industrial equipment can be any equipment used for production and manufacturing in the industrial chain. For example, industrial equipment can be a generator, a printing press, an injection molding equipment, etc. The present application does not limit the specific type of industrial equipment. Among them, the attribute data of industrial equipment is used to characterize the status of industrial equipment when it is running or shut down; point cloud data is used to characterize the structure and shape of industrial equipment. Exemplarily, the attribute data can be noise data, vibration data or voltage data when the industrial equipment is running, which is not limited in the present application.
[0031] S21, classifying the industrial equipment according to the attribute data to obtain the category of the industrial equipment.
[0032] In one embodiment of the present application, the attribute data includes at least: basic information of the equipment, such as the equipment name, model, specification, manufacturer, purchase time, service life, location data of the equipment, material data corresponding to the equipment, etc. Equipment status, such as operating status, fault data, maintenance status, etc. Equipment performance, such as performance parameters such as production capacity, efficiency, and failure rate. Equipment maintenance, such as maintenance time, maintenance content, maintenance personnel and other information. Specifically, the attribute data of industrial equipment can be processed using a pre-trained classification model to obtain the category of the industrial equipment. Among them, the classification model can be a decision tree model, a random forest model, a fully connected neural network model, and other models with classification functions. The category of industrial equipment can be "production equipment", "auxiliary equipment", "experimental equipment", etc. This application does not limit the specific content of the category of industrial equipment.
[0033] S22, encoding the attribute data of the industrial equipment of the same category to obtain a category code corresponding to each category.
[0034] In one embodiment of the present application, the attribute data at least includes the location data of the industrial equipment, the material data corresponding to the industrial equipment, and the fault data corresponding to the industrial equipment. The encoding of the attribute data of the industrial equipment of the same category to obtain the category code of each category of the industrial equipment includes: encoding the location data to obtain the location code; encoding the material data to obtain the material code; encoding the fault data to obtain the fault code; based on the location code, the material code and the fault code of the industrial equipment corresponding to any category, determine the category code corresponding to any category. Among them, the attribute data can be encoded using a pre-trained twin network model; the attribute data can also be encoded using a pre-trained autoencoder model; and the attribute data and can also be encoded using a One-Hot encoding algorithm. This application does not limit the method of encoding attribute data.
[0035] In one embodiment of the present application, the location code, material code and fault code of industrial equipment corresponding to any category can be spliced to obtain the category code corresponding to any category; the location code, material code and fault code of industrial equipment corresponding to any category can also be input into a pre-trained autoencoder to obtain the category code corresponding to any category. The present application does not limit the specific method of determining the category code.
[0036] S23, encoding the equipment information of the industrial equipment of the same category to obtain equipment codes of the industrial equipment of the same category.
[0037] In one embodiment of the present application, the equipment information also includes point cloud data of the industrial equipment, and the encoding of the equipment information of the industrial equipment of the same category to obtain the equipment code of the industrial equipment of the same category includes: determining the point cloud code of the industrial equipment based on the point cloud data; for the industrial equipment corresponding to any one category, splicing the category code, the position code, the material code, the fault code and the point cloud code to obtain the equipment code of the industrial equipment corresponding to any one category. Specifically, when splicing the category code, the position code, the material code, the fault code and the point cloud code, the order of splicing the category code, the position code, the material code, the fault code and the point cloud code is not limited.
[0038] S24, determining a first correlation between any two of the categories according to the category codes, and determining a second correlation between any two of the industrial devices belonging to the same category according to the device codes.
[0039] In one embodiment of the present application, determining the first correlation between any two of the categories based on the category codes and determining the second correlation between any two of the industrial devices belonging to the same category based on the device codes includes: determining the cosine similarity of the category codes corresponding to any two categories to obtain the first correlation between the any two categories; calculating the cosine similarity between the device codes of any two of the industrial devices belonging to the same category to obtain the second correlation between any two of the industrial devices belonging to the same category.
[0040] S25, constructing a knowledge graph according to the category code, the device code, the first correlation and the second correlation.
[0041] In one embodiment of the present application, in order to efficiently manage the equipment information of industrial equipment, a knowledge graph can be constructed based on the category code, the equipment code, the first correlation and the second correlation, including: determining the category code as a first-level node, determining the equipment code as a second-level node; determining the first correlation between any two categories as the first edge weight between the first-level nodes corresponding to the any two categories; determining the second correlation between the equipment codes of any two industrial equipment belonging to the same category as the second edge weight between the corresponding second-level nodes. In this way, the attribute codes of industrial equipment and the correlations between industrial equipment can be converted into a structured knowledge graph, and the equipment information can be managed by querying or updating the data in the knowledge graph, thereby improving the efficiency of equipment information management.
[0042] S26, training a generative model based on the knowledge graph to obtain a device information management model.
[0043] In one embodiment of the present application, during the process of device information management, the electronic device usually receives a device information management requirement sent by the user. The device information management requirement may be voice data or text data containing natural language information. In order to improve the efficiency of device information management, a device information management model may be trained based on a knowledge graph, and the device information management model may be used to process the device information management requirements sent by the user, thereby improving the efficiency of device information management. The training of the generative model based on the knowledge graph to obtain the device information management model includes determining prompt data based on the device information and a pre-stored prompt template; inputting the prompt data into a pre-built initial generation model; obtaining a predicted knowledge graph corresponding to the device information; determining a loss value of the initial generation model based on the predicted knowledge graph and the knowledge graph; when the loss value is greater than a preset termination threshold, updating the predicted generation model based on a back propagation algorithm until the loss value is less than or equal to the termination threshold, thereby obtaining a knowledge graph generation model trained to a convergence state. The prompt template is used to generalize the device information to obtain prompt data that conforms to the natural language grammar, thereby improving the generalization ability of the device information management model, thereby improving the efficiency of device information management.
[0044] Exemplarily, the prompt template may be pre-written text data, and the content of the prompt template includes: "Background prompt: You are an assistant capable of generating a knowledge graph; Task prompt: Please generate a knowledge graph based on the following node data and edge weight data; Node data:; Edge weight data:.". When the node data includes node 1, node 2, and node 3, and the edge weight data includes that the edge weight between node 1 and node 2 is 0.5, the edge weight between node 2 and node 3 is 0.6, and the edge weight between node 1 and node 3 is 0.7, the prompt data may be "Background prompt: You are an assistant capable of generating a knowledge graph; Task prompt: Please generate a knowledge graph based on the following node data and edge weight data; Node data: node 1, node 2, and node 3; Edge weight data: the edge weight between node 1 and node 2 is 0.5, the edge weight between node 2 and node 3 is 0.6, and the edge weight between node 1 and node 3 is 0.7."
[0045] In one embodiment of the present application, the prediction knowledge graph includes at least one prediction first-level node and at least one prediction second-level node, the prediction first-level node is used to characterize the prediction category code corresponding to the category, and the prediction second-level node is used to characterize the prediction device code corresponding to the industrial equipment. The prediction knowledge graph also includes a predicted first correlation between any two of the prediction category codes and a predicted second correlation between any two of the prediction device codes belonging to the same category.
[0046] In one embodiment of the present application, determining the loss value of the initial generation model according to the predicted knowledge graph and the knowledge graph includes:
[0047] , where Loss represents the loss value of the initial generation model; n represents the number of nodes in the knowledge graph; i represents the index of the node in the knowledge graph; m represents the number of nodes in the predicted knowledge graph; j represents the index of the node in the predicted knowledge graph; A ij represents the similarity between the category code of the i-th first-level node in the knowledge graph and the predicted category code of the j-th predicted first-level node in the predicted knowledge graph; B ij represents the difference between the mean of all first edge weights corresponding to the i-th first-level node in the knowledge graph and all predicted first correlations corresponding to the j-th predicted first-level node in the predicted knowledge graph; s represents the number of second-level nodes corresponding to the i-th first-level node in the knowledge graph; x represents the index of the second-level node corresponding to the i-th first-level node in the knowledge graph; t represents the number of second-level nodes corresponding to the j-th first-level node in the predicted knowledge graph; y represents the index of the second-level node corresponding to the j-th first-level node in the predicted knowledge graph; C ij xy represents the similarity between the device code of the xth secondary node corresponding to the ith primary node in the knowledge graph and the predicted device code of the yth predicted secondary node corresponding to the jth predicted primary node in the predicted knowledge graph; D ij xy Represents the difference between the mean of all second edge weights of the x-th second-level node corresponding to the ith first-level node in the knowledge graph and the mean of all predicted second correlations of the y-th predicted second-level node corresponding to the j-th predicted first-level node in the predicted knowledge graph.
[0048] S27, input the device information management requirements acquired in real time into the device information management model to manage the device information in the knowledge graph.
[0049] In one embodiment of the present application, in order to improve the efficiency of managing device information in the knowledge graph, the device information management requirements acquired in real time can be input into the device information management model to manage the device information in the knowledge graph. Exemplarily, the device information management requirements can be to update the device information of industrial equipment corresponding to any one or more nodes in the knowledge graph; the device information management requirements can also be to delete any one or more nodes in the knowledge graph; the device information management requirements can also be to update the edge weights of any two nodes in the knowledge graph. This application does not limit the specific content of the device information management requirements.
[0050] It can be seen from the above technical solutions that the embodiment of the present application classifies industrial equipment according to attribute data, encodes the equipment information of industrial equipment of the same category, determines the category code of each category according to the characteristics of industrial equipment of the same type, and the equipment code corresponding to each industrial equipment, so as to digitally represent the same type of industrial equipment, thereby improving the efficiency of managing equipment information. In this way, a knowledge graph with multi-level data can be constructed according to the category code and the equipment code, and the knowledge graph, a structured data, can be used to manage equipment information, thereby improving the integrity of the equipment information and the accuracy of the degree of correlation between multiple equipment information. Finally, a generative model is trained based on the knowledge graph to obtain a device information management model, and the real-time acquired equipment information management requirements are input into the device information management model to manage the equipment information in the knowledge graph, thereby improving the efficiency of equipment information management.
[0051] See also Figure 3 , Figure 3 1 is a functional module diagram of a device information management device provided in an embodiment of the present application. A device information management device 31 includes an acquisition module 310, a classification module 311, an encoding module 312, a determination module 313 and a training module 314. The module / unit referred to in the present application refers to a series of computer-readable instruction segments that can be executed by the processor 13 and can complete fixed functions, which are stored in the memory 12. In this embodiment, the functions of each module / unit will be described in detail in subsequent embodiments.
[0052] The acquisition module 310 is used to acquire device information of industrial equipment, wherein the device information at least includes attribute data of the industrial equipment.
[0053] The classification module 311 is used to classify the industrial equipment according to the attribute data to obtain the category of the industrial equipment.
[0054] The encoding module 312 is used to encode the attribute data of the industrial equipment of the same category to obtain a category code corresponding to each category.
[0055] The encoding module 312 is further used to encode the device information of the industrial devices of the same category to obtain the device codes of the industrial devices of the same category.
[0056] The determination module 313 is used to determine a first correlation between any two of the categories according to the category codes, and to determine a second correlation between any two of the industrial devices belonging to the same category according to the device codes.
[0057] The determination module 313 is further used to construct a knowledge graph according to the category code, the device code, the first correlation and the second correlation.
[0058] The training module 314 is used to train a generative model based on the knowledge graph to obtain a device information management model.
[0059] The determination module 313 is also used to input the device information management requirements acquired in real time into the device information management model to manage the device information in the knowledge graph.
[0060] See also Figure 4 , is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 100 includes a memory 12 and a processor 13. The memory 12 is used to store computer-readable instructions, and the processor 13 is used to execute the computer-readable instructions stored in the memory to implement a device information management method described in any of the above embodiments.
[0061] In an embodiment of the present application, the electronic device 100 further includes a bus, a computer program stored in the memory 12 and executable on the processor 13, such as a device information management program.
[0062] Figure 4 Only the electronic device 100 having the memory 12 and the processor 13 is shown, and those skilled in the art can understand that Figure 4 The structure shown does not constitute a limitation on the electronic device 100 , and the electronic device 100 may include fewer or more components than shown in the figure, or combine some components, or arrange the components differently.
[0063] Combination Figure 2, the memory 12 in the electronic device 100 stores multiple computer-readable instructions to implement a device information management method, and the processor 13 can execute the multiple instructions to achieve: obtaining device information of industrial equipment, wherein the device information at least includes attribute data of the industrial equipment; classifying the industrial equipment according to the attribute data to obtain the category of the industrial equipment; encoding the attribute data of the industrial equipment with the same category to obtain the category code corresponding to each category; encoding the device information of the industrial equipment with the same category to obtain the device code of the industrial equipment belonging to the same category; determining the first correlation between any two of the categories according to the category code, and determining the second correlation between any two of the industrial equipment belonging to the same category according to the device code; constructing a knowledge graph according to the category code, the device code, the first correlation and the second correlation; training a generative model based on the knowledge graph to obtain a device information management model; inputting the device information management requirements obtained in real time into the device information management model to manage the device information in the knowledge graph.
[0064] Specifically, the specific implementation method of the processor 13 for the above instructions can refer to Figure 2 The description of the relevant steps in the corresponding embodiments will not be repeated here.
[0065] Those skilled in the art will appreciate that the schematic diagram is merely an example of the electronic device 100 and does not constitute a limitation on the electronic device 100. The electronic device 100 may be a bus-type structure or a star-type structure. The electronic device 100 may also include more or less other hardware or software than shown in the diagram, or a different arrangement of components. For example, the electronic device 100 may also include input and output devices, network access devices, etc.
[0066] It should be noted that the electronic device 100 is only an example, and other existing or future electronic products that are suitable for the present application should also be included in the protection scope of the present application and included here by reference.
[0067] Among them, the memory 12 includes at least one type of readable storage medium, and the readable storage medium can be non-volatile or volatile. The readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (for example: SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 12 can be an internal storage unit of the electronic device 100, such as a mobile hard disk of the electronic device 100. In other embodiments, the memory 12 can also be an external storage device of the electronic device 100, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. equipped on the electronic device 100. The memory 12 can not only be used to store application software and various types of data installed in the electronic device 100, such as a code of a device information management program, etc., but also can be used to temporarily store data that has been output or is to be output.
[0068] In some embodiments, the processor 13 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and a combination of various control chips. The processor 13 is the control core (Control Unit) of the electronic device 100, and uses various interfaces and lines to connect various components of the entire electronic device 100, and executes various functions and processes data of the electronic device 100 by running or executing programs or modules stored in the memory 12 (for example, executing a device information management program, etc.), and calling data stored in the memory 12.
[0069] The processor 13 executes the operating system of the electronic device 100 and various installed applications. The processor 13 executes the applications to implement the steps in each of the above-mentioned device information management method embodiments, for example Figure 2 Steps shown.
[0070] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory 12 and executed by the processor 13 to complete the present application. The one or more modules / units may be a series of computer-readable instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program in the electronic device 100. For example, the computer program may be divided into an acquisition module 310, a classification module 311, an encoding module 312, a determination module 313, and a training module 314.
[0071] The above-mentioned integrated unit implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a computer device, or a network device, etc.) or a processor to execute a part of a device information management method described in each embodiment of the present application.
[0072] If the module / unit integrated in the electronic device 100 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also instruct the relevant hardware devices to complete through a computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by the processor, the steps of each of the above-mentioned method embodiments can be implemented.
[0073] The computer program includes computer program code, which may be in source code form, object code form, executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory and other memory, etc.
[0074] Furthermore, the computer-readable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the blockchain node, etc.
[0075] The bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. Figure 4 Only one arrow is used in the figure, but it does not mean that there is only one bus or one type of bus. The bus is configured to realize the connection and communication between the memory 12 and at least one processor 13, etc.
[0076] An embodiment of the present application also provides a computer-readable storage medium (not shown), in which computer-readable storage medium is stored computer-readable instructions, and the computer-readable instructions are executed by a processor in an electronic device to implement a device information management method described in any of the above embodiments.
[0077] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.
[0078] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0079] In addition, each functional module in each embodiment of the present application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0080] In addition, it is obvious that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the specification can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any specific order.
[0081] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present application and are not intended to limit it. Although the present application has been described in detail with reference to the preferred embodiments, a person of ordinary skill in the art should understand that the technical solution of the present application may be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present application.
Claims
1. A device information management method, applied to electronic equipment, It is characterized in that The method comprises: Acquire device information of industrial equipment, wherein the device information at least includes attribute data of the industrial equipment; Classify the industrial equipment according to the attribute data to obtain the category of the industrial equipment; Encoding the attribute data of the industrial equipment of the same category to obtain a category code corresponding to each category; Encoding the equipment information of the industrial equipment of the same category to obtain equipment codes of the industrial equipment of the same category; Determine a first correlation between any two of the categories according to the category code, and determine a second correlation between any two of the industrial devices belonging to the same category according to the device code; Construct a knowledge graph according to the category code, the device code, the first correlation, and the second correlation; Training a generative model based on the knowledge graph to obtain a device information management model; Input the device information management requirements acquired in real time into the device information management model to manage the device information in the knowledge graph.
2. The device information management method according to claim 1, It is characterized in that The attribute data at least includes the location data of the industrial equipment, the material data corresponding to the industrial equipment, and the fault data corresponding to the industrial equipment. The encoding of the attribute data of the industrial equipment of the same category to obtain the category code of each category of the industrial equipment includes: Encoding the position data to obtain a position code; Encoding the material data to obtain a material code; Encoding the fault data to obtain a fault code; Based on the location code, the material code and the fault code of the industrial equipment corresponding to any one category, the category code corresponding to the any one category is determined.
3. The device information management method according to claim 2, It is characterized in that The device information also includes point cloud data of the industrial equipment. The device information of the industrial equipment of the same category is encoded to obtain the device code of the industrial equipment of the same category, including: Based on the point cloud data, determining a point cloud code of the industrial equipment; For the industrial equipment corresponding to any one category, the category code, the location code, the material code, the fault code and the point cloud code are concatenated to obtain the equipment code of the industrial equipment corresponding to any one category.
4. The device information management method according to claim 1, It is characterized in that The determining of the first correlation between any two of the categories according to the category codes, and the determining of the second correlation between any two of the industrial devices belonging to the same category according to the device codes comprises: Determine the cosine similarity of the category codes corresponding to any two categories to obtain a first correlation between the any two categories; The cosine similarity between the device codes of any two industrial devices belonging to the same category is calculated to obtain a second correlation between any two industrial devices belonging to the same category.
5. The device information management method according to claim 1, It is characterized in that The constructing of the knowledge graph according to the category code, the device code, the first correlation and the second correlation comprises: Determine that the category code is a primary node, and determine that the device code is a secondary node; Determine the first correlation between any two categories as a first edge weight between the first-level nodes corresponding to the any two categories; A second correlation between any two device codes of the industrial devices belonging to the same category is determined as a second edge weight between corresponding secondary nodes.
6. The device information management method according to claim 1, It is characterized in that The device information management model obtained by training the generative model based on the knowledge graph includes: Determining prompt data according to the device information and a pre-stored prompt template; Inputting the prompt data into a pre-built initial generation model; Obtaining a prediction knowledge graph corresponding to the device information; Determining a loss value of the initial generation model according to the predicted knowledge graph and the knowledge graph; When the loss value is greater than a preset termination threshold, the prediction generation model is updated based on the back propagation algorithm until the loss value is less than or equal to the termination threshold, thereby obtaining a knowledge graph generation model trained to a convergence state.
7. The device information management method according to claim 6, It is characterized in that The prediction knowledge graph includes at least one prediction first-level node and at least one prediction second-level node, the prediction first-level node is used to characterize the prediction category code corresponding to the category, and the prediction second-level node is used to characterize the prediction device code corresponding to the industrial equipment. The prediction knowledge graph also includes a prediction first correlation between any two of the prediction category codes and a prediction second correlation between any two of the prediction device codes belonging to the same category.
8. The device information management method according to claim 7, It is characterized in that The determining the loss value of the initial generation model according to the predicted knowledge graph and the knowledge graph includes: , Wherein, Loss represents the loss value of the initial generation model; n represents the number of nodes in the knowledge graph; i represents the index of the node in the knowledge graph; m represents the number of nodes in the predicted knowledge graph; j represents the index of the node in the predicted knowledge graph; A ij represents the similarity between the category code of the i-th first-level node in the knowledge graph and the predicted category code of the j-th predicted first-level node in the predicted knowledge graph; B ij represents the difference between the mean of all first edge weights corresponding to the i-th first-level node in the knowledge graph and all predicted first correlations corresponding to the j-th predicted first-level node in the predicted knowledge graph; s represents the number of second-level nodes corresponding to the i-th first-level node in the knowledge graph; x represents the index of the second-level node corresponding to the i-th first-level node in the knowledge graph; t represents the number of second-level nodes corresponding to the j-th first-level node in the predicted knowledge graph; y represents the index of the second-level node corresponding to the j-th first-level node in the predicted knowledge graph; C ij xy represents the similarity between the device code of the xth secondary node corresponding to the ith primary node in the knowledge graph and the predicted device code of the yth predicted secondary node corresponding to the jth predicted primary node in the predicted knowledge graph; D ij xy Represents the difference between the mean of all second edge weights of the x-th second-level node corresponding to the ith first-level node in the knowledge graph and the mean of all predicted second correlations of the y-th predicted second-level node corresponding to the j-th predicted first-level node in the predicted knowledge graph.
9. A device information management device, It is characterized in that The apparatus comprises a module for implementing the device information management method according to any one of claims 1 to 8, and the apparatus comprises: An acquisition module, used to acquire device information of industrial equipment, wherein the device information at least includes attribute data of the industrial equipment; A classification module, used for classifying the industrial equipment according to the attribute data to obtain the category of the industrial equipment; An encoding module, used for encoding the attribute data of the industrial equipment of the same category to obtain a category code corresponding to each category; The encoding module is further used to encode the device information of the industrial devices of the same category to obtain the device codes of the industrial devices of the same category; A determination module, configured to determine a first correlation between any two of the categories according to the category code, and to determine a second correlation between any two of the industrial devices belonging to the same category according to the device code; The determination module is further used to construct a knowledge graph according to the category code, the device code, the first correlation and the second correlation; A training module, used for training a generative model based on the knowledge graph to obtain a device information management model; The determination module is also used to input the device information management requirements acquired in real time into the device information management model to manage the device information in the knowledge graph.
10. An electronic device, It is characterized in that The electronic device comprises a processor and a memory, and the processor is configured to implement the device information management method according to any one of claims 1 to 8 when executing a computer program stored in the memory.
