Model training method and device, and network service method and device
By obtaining global and local knowledge characteristics in the sample data, training the initial network service model and generating the target network service model, the problem of insufficient loading efficiency of PSR model is solved, and network service performance and deep information processing capabilities are improved.
Patent Information
- Application Number
- CN202411138727.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2024-12-27
AI Technical Summary
The loading efficiency of the PSR model is difficult to meet the needs of network services, resulting in limited performance improvement.
By obtaining global knowledge characteristics and local knowledge characteristics in the sample data, the initial network service model is trained to generate the target network service model to improve the loading efficiency of the model and the network service performance.
While improving the loading efficiency of the model, it fully utilizes the overall and domain knowledge characteristics of the data, enhances the deep information processing capabilities of network services, and solves the impact of intricate data relationships on model training.
Smart Images

Figure CN119202704A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of big data, and in particular to a model training method and device, as well as a network service method and device. Background Art
[0002] The design concept of the PSR (Pressure State Response) model is to decouple resources, services, and products in layers, assemble and design them based on the underlying cloud network capabilities, form services, and provide communication services / products to the outside world.
[0003] As a visualization capability design tool for the new generation of cloud network operation business systems, the product service center is an important component of the development framework tool. However, with the increasing performance requirements in product services, the loading efficiency of the PSR model in product services can no longer meet the network service requirements. Summary of the invention
[0004] Based on this, it is necessary to provide a model training method and device, as well as a network service method and device, which can ensure that the loading efficiency of the PSR model meets the network service requirements in response to the above-mentioned technical problems.
[0005] In a first aspect, the present application provides a model training method. The method comprises:
[0006] Acquire sample data; the sample data includes a global knowledge feature and a plurality of local knowledge features;
[0007] The initial network service model is trained according to the sample data to obtain a trained target network service model; the target network service model is used to provide network services.
[0008] In one of the embodiments, a network structure of a pressure state response PSR object is obtained;
[0009] Construct a global knowledge graph and a local knowledge graph of the PSR object according to the network structure of the PSR object;
[0010] The sample data is obtained according to the global knowledge graph and the local knowledge graph.
[0011] In one embodiment, the method further comprises:
[0012] Convert the network structure of the PSR object into a preset data structure;
[0013] The constructing the global knowledge graph and the local knowledge graph of the PSR object according to the network structure of the PSR object includes:
[0014] Construct the global knowledge graph and local knowledge graph of the PSR object according to the preset data structure.
[0015] In one embodiment, converting the network structure of the PSR object into a preset data structure includes:
[0016] The network structure of the PSR object is represented by a triple structure, and the preset data structure is determined.
[0017] In one embodiment, obtaining the sample data according to the global knowledge graph and the local knowledge graph includes:
[0018] Extracting features from the global knowledge graph to obtain the global knowledge features;
[0019] Performing feature extraction on the local knowledge graph to obtain the multiple local knowledge features;
[0020] The sample data is obtained according to the global knowledge feature and the multiple local knowledge features.
[0021] In one embodiment, obtaining the sample data according to the global knowledge feature and the plurality of local knowledge features includes:
[0022] The global knowledge feature and the multiple local knowledge features are subjected to feature fusion, and the fused features are determined as the sample data.
[0023] In a second aspect, the present application also provides a network service method. The method comprises:
[0024] Acquire data to be processed; the data to be processed includes at least one of business service object data, network service object data and resource object data;
[0025] According to the target network service model, the data to be processed is subjected to network analysis to obtain a network service result; the target network service model is obtained by training based on sample data and an initial network service model, and the sample data includes global knowledge features and multiple local knowledge features.
[0026] In a third aspect, the present application also provides a model training device. The device comprises:
[0027] An acquisition module, used to acquire sample data; the sample data includes a global knowledge feature and a plurality of local knowledge features;
[0028] The training module is used to perform model training on the initial network service model according to the sample data to obtain a trained target network service model; the target network service model is used to provide network services.
[0029] In a fourth aspect, the present application also provides a model training device. The device comprises:
[0030] A second acquisition module is used to acquire data to be processed; the data to be processed includes at least one of business service object data, network service object data and resource object data;
[0031] The input module is used to perform network analysis on the data to be processed according to the target network service model to obtain the network service result; the target network service model is trained based on sample data and an initial network service model, and the sample data includes global knowledge features and multiple local knowledge features.
[0032] In a fifth aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0033] Acquire sample data; the sample data includes a global knowledge feature and a plurality of local knowledge features;
[0034] The initial network service model is trained according to the sample data to obtain a trained target network service model; the target network service model is used to provide network services.
[0035] In a sixth aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0036] Acquire data to be processed; the data to be processed includes at least one of business service object data, network service object data and resource object data;
[0037] According to the target network service model, the data to be processed is subjected to network analysis to obtain a network service result; the target network service model is obtained by training based on sample data and an initial network service model, and the sample data includes global knowledge features and multiple local knowledge features.
[0038] In a seventh aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0039] Acquire sample data; the sample data includes a global knowledge feature and a plurality of local knowledge features;
[0040] The initial network service model is trained according to the sample data to obtain a trained target network service model; the target network service model is used to provide network services.
[0041] In an eighth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0042] Acquire data to be processed; the data to be processed includes at least one of business service object data, network service object data and resource object data;
[0043] According to the target network service model, the data to be processed is subjected to network analysis to obtain a network service result; the target network service model is obtained by training based on sample data and an initial network service model, and the sample data includes global knowledge features and multiple local knowledge features.
[0044] In a ninth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0045] Acquire sample data; the sample data includes a global knowledge feature and a plurality of local knowledge features;
[0046] The initial network service model is trained according to the sample data to obtain a trained target network service model; the target network service model is used to provide network services.
[0047] In a tenth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0048] Acquire data to be processed; the data to be processed includes at least one of business service object data, network service object data and resource object data;
[0049] According to the target network service model, the data to be processed is subjected to network analysis to obtain a network service result; the target network service model is obtained by training based on sample data and an initial network service model, and the sample data includes global knowledge features and multiple local knowledge features.
[0050] The above-mentioned model training method, device, and network service method and device, by obtaining sample data; the sample data includes global knowledge features and multiple local knowledge features; then, the initial network service model is model trained according to the sample data to obtain the trained target network service model; the target network service model is used to provide network services. According to the above content, when the initial network service model is model trained, the global knowledge features and multiple local knowledge features are used as sample data to complete the model training for the initial network service model according to the sample data. Since the global knowledge features are used to characterize the knowledge features of the data as a whole, and the local knowledge features are used to characterize the knowledge features of the data in various fields, therefore, in the process of training the initial network service model according to the global knowledge features and multiple local knowledge features, not only can the initial network service model fully consider the knowledge features of the data as a whole, but also can combine the knowledge features of the data in various fields, so as to achieve in the process of obtaining the trained target network service model, the deep information between the utilization data is analyzed to prevent the training effect of the target network service model from being affected due to the existence of many intricate relationships between the data. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] FIG1 is an application environment diagram of a model training method provided in an embodiment of the present application;
[0052] FIG2 is a schematic diagram of a flow chart of a first model training method provided in an embodiment of the present application;
[0053] FIG3 is a schematic diagram of a flow chart of a second model training method provided in an embodiment of the present application;
[0054] FIG4 is a flow chart of a network service method provided in an embodiment of the present application;
[0055] FIG5 is a schematic diagram of a flow chart of a third model training method provided in an embodiment of the present application;
[0056] FIG6 is a structural block diagram of a model training device provided in an embodiment of the present application;
[0057] FIG7 is a structural block diagram of a network service device provided in an embodiment of the present application;
[0058] FIG. 8 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0059] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0060] It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. In the description of the present application, the description of the reference terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms is not necessarily for the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples without contradicting each other.
[0061] The model training method provided in the embodiment of the present application can be applied to the application environment shown in Figure 1. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. By obtaining sample data; the sample data includes global knowledge features and multiple local knowledge features; then, the initial network service model is trained according to the sample data to obtain a trained target network service model; the target network service model is used to provide network services. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablets, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented with an independent server or a server cluster consisting of multiple servers.
[0062] In one embodiment, as shown in FIG. 2 , a model training method is provided, which is described by taking the method applied to the terminal 102 in FIG. 1 as an example, and includes the following steps:
[0063] S201, obtaining sample data.
[0064] The sample data includes global knowledge features and multiple local knowledge features.
[0065] It should be noted that in order to ensure that the global knowledge features and multiple local knowledge features contained in the sample data can be successfully determined, it is necessary to construct a knowledge graph corresponding to the data to be processed, and then determine the global knowledge features and multiple local knowledge features contained in the sample data based on the knowledge graph.
[0066] The data to be processed may be a PSR object.
[0067] In one embodiment of the present application, when it is necessary to obtain global knowledge features, a global knowledge graph corresponding to the data to be processed can be constructed, and then the global knowledge graph can be subjected to knowledge distillation to obtain global knowledge features corresponding to the global knowledge graph. When it is necessary to obtain multiple local knowledge features, the data to be processed can be pre-split according to the different data fields corresponding to the data to be processed to obtain sub-data corresponding to each data field; sub-knowledge graphs corresponding to each sub-data can be constructed respectively, and then knowledge distillation can be performed on each sub-knowledge graph to obtain multiple local knowledge features corresponding to each sub-knowledge graph.
[0068] In another embodiment of the present application, when it is necessary to obtain global knowledge features and multiple local knowledge features, a global knowledge graph corresponding to the data to be processed can be constructed, and then, knowledge distillation processing can be performed on the global knowledge graph to obtain global knowledge features corresponding to the global knowledge graph, and the global knowledge graph can be split according to different data fields corresponding to the data to be processed to obtain sub-knowledge graphs corresponding to each sub-data, and then, knowledge distillation processing can be performed on each sub-knowledge graph to obtain multiple local knowledge features corresponding to each sub-knowledge graph.
[0069] S202, performing model training on the initial network service model according to the sample data to obtain a trained target network service model.
[0070] The target network service model is used to provide network services.
[0071] It should be noted that when it is necessary to train the initial network service model based on the global knowledge features and multiple local knowledge features in the sample data, the global knowledge features and multiple local knowledge features can be used to train the initial network service model in turn to obtain the trained target network service model.
[0072] In one embodiment of the present application, when it is necessary to train a target network service model, global knowledge features are used to perform model training on the initial network service model to obtain a trained candidate network service model; then, multiple local knowledge features are used to perform model training on the candidate network service model to obtain a trained target network service model.
[0073] It is further explained that in order to better improve the training effect of the target network service model, when the initial network service model is trained according to the sample data, the global knowledge features and multiple local knowledge features can be fused, and the fused features are used as sample data. Then, the initial network service model is trained according to the fused sample data to obtain the trained target network service model.
[0074] In one embodiment of the present application, when it is necessary to perform feature fusion on the global knowledge feature and multiple local knowledge features, a feature pyramid fusion method can be used to convert the global knowledge feature into a global knowledge feature map, and convert the multiple local knowledge features into multiple local knowledge feature maps; then, pooling or upsampling operations of different scales are performed on the global knowledge feature map and the multiple local knowledge feature maps to generate a multi-scale target feature map, and the target feature maps are spliced together to form a fused feature.
[0075] In another embodiment of the present application, when it is necessary to perform feature fusion on global knowledge features and multiple local knowledge features, the corresponding key features can be extracted from the global knowledge features and the multiple local knowledge features respectively, and then the key features are fused and the fused features are used as sample data.
[0076] In another embodiment of the present application, when it is necessary to perform feature fusion of global knowledge features and multiple local knowledge features, the global knowledge features can be converted into the form of a global knowledge feature vector, and the multiple local knowledge features can be converted into the form of multiple local knowledge feature vectors. Then, the fusion operation of the global knowledge feature vector and the multiple local knowledge feature vectors can be completed by vector addition, vector concatenation, or weighted operation. In summary, there are many methods for performing vector fusion of a global knowledge feature vector and multiple local knowledge feature vectors, and the vector fusion method is not limited here.
[0077] The above-mentioned model training method obtains sample data; the sample data includes global knowledge features and multiple local knowledge features; then, the initial network service model is trained according to the sample data to obtain the trained target network service model; the target network service model is used to provide network services. According to the above content, when the initial network service model is trained, the global knowledge features and multiple local knowledge features are used as sample data to complete the model training for the initial network service model according to the sample data. Since the global knowledge features are used to characterize the knowledge features of the data as a whole, and the local knowledge features are used to characterize the knowledge features of the data in various fields, therefore, in the process of training the initial network service model according to the global knowledge features and multiple local knowledge features, not only can the initial network service model fully consider the knowledge features of the data as a whole, but also can combine the knowledge features of the data in various fields, so as to achieve in the process of obtaining the trained target network service model, the deep information between the utilization data is analyzed to prevent the training effect of the target network service model from being affected due to the existence of many intricate relationships between the data.
[0078] In one embodiment, as shown in FIG3 , when it is necessary to obtain sample data, the following contents may be specifically included:
[0079] S301, obtaining the network structure of the PSR object.
[0080] Among them, the PSR object may include business service object data, network service object data and resource object data.
[0081] In one embodiment of the present application, after obtaining the PSR object, a network structure may be constructed for the PSR object to obtain the network structure of the PSR object.
[0082] S302, constructing a global knowledge graph and a local knowledge graph of the PSR object according to the network structure of the PSR object.
[0083] It should be noted that the first graph construction model for the global knowledge graph and the second graph construction model for the local knowledge graph can be pre-trained, and then, based on the first graph construction model and the second graph construction model, the global knowledge graph and the local knowledge graph of the PSR object can be constructed.
[0084] In one embodiment of the present application, after training the first graph construction model and the second graph construction model, the network structure of the PSR object can be input into the first graph construction model and the second graph construction model respectively, and the output results of the first graph construction model and the second graph construction model can be obtained. The output result of the first graph construction model is the global knowledge graph, and the output result of the second graph construction model is the local knowledge graph.
[0085] Further explanation: in order to ensure the subsequent accurate acquisition of the global knowledge features and multiple local knowledge features contained in the sample data, the network structure of the PSR object can be structurally transformed before constructing the global knowledge graph and the local knowledge graph. Specifically, the network structure of the PSR object is converted into a preset data structure; therefore, when constructing the global knowledge graph and the local knowledge graph of the PSR object according to the network structure of the PSR object, it can include: constructing the global knowledge graph and the local knowledge graph of the PSR object according to the preset data structure.
[0086] Among them, the structural type of the preset data structure can be set or adjusted according to actual conditions. The structural type of the preset data structure is not limited here. As an example, the preset data structure can be in the form of data triples.
[0087] Therefore, when it is necessary to convert the network structure of the PSR object into a preset data structure, the network structure of the PSR object can be represented by a triple structure to determine the preset data structure, wherein the preset data structure includes a head entity, a relation definition, and a tail entity.
[0088] In one embodiment of the present application, when it is necessary to construct a global knowledge graph and a local knowledge graph of a PSR object, a global knowledge graph of the PSR object can be constructed according to a preset data structure; then, domain knowledge distillation is performed on the global knowledge graph to obtain local knowledge graphs corresponding to the PSR object in different functional fields.
[0089] S303, obtaining sample data according to the global knowledge graph and the local knowledge graph.
[0090] It should be noted that when it is necessary to obtain sample data based on the global knowledge graph and the local knowledge graph, the following may be specifically included: extracting features from the global knowledge graph to obtain global knowledge features; extracting features from the local knowledge graph to obtain multiple local knowledge features; and obtaining sample data based on the global knowledge features and multiple local knowledge features.
[0091] To further illustrate, when it is necessary to obtain sample data based on the global knowledge feature and multiple local knowledge features, the following may be included: fusing the global knowledge feature and multiple local knowledge features, and determining the fused features as sample data.
[0092] The above-mentioned model training method obtains global knowledge features and multiple local knowledge features; obtains sample data based on the global knowledge features and multiple local knowledge features, and completes model training for the initial network service model based on the sample data. Since the global knowledge features are used to characterize the knowledge features of the data as a whole, and the local knowledge features are used to characterize the knowledge features of the data in various fields, therefore, in the process of training the initial network service model according to the global knowledge features and multiple local knowledge features, not only can the initial network service model fully consider the knowledge features of the data as a whole, but also can combine the knowledge features of the data in various fields, so as to achieve in the process of obtaining the trained target network service model, the deep-level information between the utilization data is analyzed to prevent the training effect of the target network service model from being affected by the existence of many complex relationships between the data.
[0093] In one embodiment, as shown in FIG. 4 , when network service processing is required, the following contents may be specifically included:
[0094] S401, obtaining data to be processed.
[0095] The data to be processed includes at least one of business service object data, network service object data and resource object data.
[0096] It should be noted that the data to be processed is the data that needs to be processed by network services.
[0097] S402, performing network analysis on the data to be processed according to the target network service model to obtain a network service result.
[0098] The target network service model is trained based on sample data and an initial network service model, and the sample data includes global knowledge features and multiple local knowledge features.
[0099] In one embodiment of the present application, when it is necessary to perform network analysis on the data to be processed through the target network service model, the network structure of the data to be processed can be represented by a triple structure, a preset data structure can be determined, and then, the global knowledge graph and the local knowledge graph of the PSR object can be constructed according to the preset data structure. Feature extraction is performed on the global knowledge graph to obtain global knowledge features; feature extraction is performed on the local knowledge graph to obtain multiple local knowledge features; feature fusion is performed on the global knowledge features and the multiple local knowledge features, and the fused features are determined as sample data; then, the sample data is input into the target network service model for network analysis to obtain network service results.
[0100] The above-mentioned network service method performs network analysis on the data to be processed according to the target network service model to achieve the operation of obtaining network service results. Since the target network service model of the present application is trained based on sample data and the initial network service model, and the sample data includes global knowledge features and multiple local knowledge features, the present application can effectively complete the network analysis operation on the data to be processed through the target network service model.
[0101] In one embodiment, as shown in FIG5 , when it is necessary to train a target network service model, the following contents may be specifically included:
[0102] S501, obtaining the network structure of the PSR object.
[0103] S502, using triples to structurally represent the network structure of the PSR object and determining a preset data structure.
[0104] S503, constructing the global knowledge graph and local knowledge graph of the PSR object according to the preset data structure.
[0105] S504, extract features from the global knowledge graph to obtain global knowledge features.
[0106] S505, extracting features from the local knowledge graph to obtain multiple local knowledge features.
[0107] S506, obtaining sample data according to the global knowledge feature and the multiple local knowledge features.
[0108] S507, performing model training on the initial network service model according to the sample data to obtain a trained target network service model.
[0109] The above-mentioned model training method obtains sample data; the sample data includes global knowledge features and multiple local knowledge features; then, the initial network service model is trained according to the sample data to obtain the trained target network service model; the target network service model is used to provide network services. According to the above content, when the initial network service model is trained, the global knowledge features and multiple local knowledge features are used as sample data to complete the model training for the initial network service model according to the sample data. Since the global knowledge features are used to characterize the knowledge features of the data as a whole, and the local knowledge features are used to characterize the knowledge features of the data in various fields, therefore, in the process of training the initial network service model according to the global knowledge features and multiple local knowledge features, not only can the initial network service model fully consider the knowledge features of the data as a whole, but also can combine the knowledge features of the data in various fields, so as to achieve in the process of obtaining the trained target network service model, the deep information between the utilization data is analyzed to prevent the training effect of the target network service model from being affected due to the existence of many intricate relationships between the data.
[0110] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0111] Based on the same inventive concept, the embodiment of the present application also provides a model training device for implementing the model training method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more model training device embodiments provided below can refer to the limitations on the model training method above, and will not be repeated here.
[0112] In one embodiment, as shown in FIG6 , a model training device is provided, including: a first acquisition module 10 and a training module 20, wherein:
[0113] The first acquisition module 10 is used to acquire sample data; the sample data includes a global knowledge feature and a plurality of local knowledge features.
[0114] The training module 20 is used to perform model training on the initial network service model according to the sample data to obtain a trained target network service model; the target network service model is used to provide network services.
[0115] In one embodiment, a network structure of a pressure state response PSR object is obtained;
[0116] Construct the global knowledge graph and local knowledge graph of the PSR object according to the network structure of the PSR object;
[0117] According to the global knowledge graph and the local knowledge graph, sample data is obtained.
[0118] In one embodiment, the network structure of the PSR object is converted into a preset data structure;
[0119] The global knowledge graph and local knowledge graph of the PSR object are constructed according to the network structure of the PSR object, including:
[0120] Construct the global knowledge graph and local knowledge graph of the PSR object according to the preset data structure.
[0121] In one embodiment, a network structure of a PSR object is represented using a triple structure to determine a preset data structure.
[0122] In one embodiment, feature extraction is performed on the global knowledge graph to obtain global knowledge features;
[0123] Extract features from the local knowledge graph to obtain multiple local knowledge features;
[0124] Sample data is obtained according to the global knowledge feature and multiple local knowledge features.
[0125] In one embodiment, feature fusion is performed on the global knowledge feature and the multiple local knowledge features, and the fused features are determined as sample data.
[0126] In one embodiment, as shown in FIG. 7 , a network service device is provided, including: a second acquisition module 30 and an input module 40, wherein:
[0127] The second acquisition module 30 is used to acquire the data to be processed; the data to be processed includes at least one of business service object data, network service object data and resource object data.
[0128] The input module 40 is used to perform network analysis on the data to be processed according to the target network service model to obtain the network service result; the target network service model is trained based on the sample data and the initial network service model, and the sample data includes global knowledge features and multiple local knowledge features.
[0129] The above-mentioned model training method obtains sample data; the sample data includes global knowledge features and multiple local knowledge features; then, the initial network service model is trained according to the sample data to obtain the trained target network service model; the target network service model is used to provide network services. According to the above content, when the initial network service model is trained, the global knowledge features and multiple local knowledge features are used as sample data to complete the model training for the initial network service model according to the sample data. Since the global knowledge features are used to characterize the knowledge features of the data as a whole, and the local knowledge features are used to characterize the knowledge features of the data in various fields, therefore, in the process of training the initial network service model according to the global knowledge features and multiple local knowledge features, not only can the initial network service model fully consider the knowledge features of the data as a whole, but also can combine the knowledge features of the data in various fields, so as to achieve in the process of obtaining the trained target network service model, the deep information between the utilization data is analyzed to prevent the training effect of the target network service model from being affected due to the existence of many intricate relationships between the data.
[0130] Each module in the above-mentioned model training device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0131] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be shown in FIG8. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, the memory, and the input / output interface are connected via a system bus, and the communication interface, the display unit, and the input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner may be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a model training method is implemented. The display unit of the computer device is used to form a visually visible picture, which may be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0132] Those skilled in the art will understand that the structure shown in FIG. 8 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0133] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0134] Acquire sample data; the sample data includes a global knowledge feature and a plurality of local knowledge features;
[0135] The initial network service model is trained according to the sample data to obtain a trained target network service model; the target network service model is used to provide network services.
[0136] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0137] Get the network structure of the pressure state response PSR object;
[0138] Construct the global knowledge graph and local knowledge graph of the PSR object according to the network structure of the PSR object;
[0139] According to the global knowledge graph and the local knowledge graph, sample data is obtained.
[0140] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0141] Convert the network structure of the PSR object into a preset data structure;
[0142] The global knowledge graph and local knowledge graph of the PSR object are constructed according to the network structure of the PSR object, including:
[0143] Construct the global knowledge graph and local knowledge graph of the PSR object according to the preset data structure.
[0144] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0145] The network structure of the PSR object is represented by a triple structure and the preset data structure is determined.
[0146] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0147] Extract features from the global knowledge graph to obtain global knowledge features;
[0148] Extract features from the local knowledge graph to obtain multiple local knowledge features;
[0149] Sample data is obtained according to the global knowledge feature and multiple local knowledge features.
[0150] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0151] The global knowledge feature and multiple local knowledge features are fused, and the fused features are determined as sample data.
[0152] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0153] Acquire data to be processed; the data to be processed includes at least one of business service object data, network service object data and resource object data;
[0154] According to the target network service model, network analysis is performed on the data to be processed to obtain network service results; the target network service model is trained based on sample data and an initial network service model, and the sample data includes global knowledge features and multiple local knowledge features.
[0155] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0156] Acquire sample data; the sample data includes a global knowledge feature and a plurality of local knowledge features;
[0157] The initial network service model is trained according to the sample data to obtain a trained target network service model; the target network service model is used to provide network services.
[0158] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0159] Get the network structure of the pressure state response PSR object;
[0160] Construct the global knowledge graph and local knowledge graph of the PSR object according to the network structure of the PSR object;
[0161] According to the global knowledge graph and the local knowledge graph, sample data is obtained.
[0162] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0163] Convert the network structure of the PSR object into a preset data structure;
[0164] The global knowledge graph and local knowledge graph of the PSR object are constructed according to the network structure of the PSR object, including:
[0165] Construct the global knowledge graph and local knowledge graph of the PSR object according to the preset data structure.
[0166] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0167] The network structure of the PSR object is represented by a triple structure and the preset data structure is determined.
[0168] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0169] Extract features from the global knowledge graph to obtain global knowledge features;
[0170] Extract features from the local knowledge graph to obtain multiple local knowledge features;
[0171] Sample data is obtained according to the global knowledge feature and multiple local knowledge features.
[0172] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0173] The global knowledge feature and multiple local knowledge features are fused, and the fused features are determined as sample data.
[0174] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0175] Acquire data to be processed; the data to be processed includes at least one of business service object data, network service object data and resource object data;
[0176] According to the target network service model, network analysis is performed on the data to be processed to obtain network service results; the target network service model is trained based on sample data and an initial network service model, and the sample data includes global knowledge features and multiple local knowledge features.
[0177] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0178] Acquire sample data; the sample data includes a global knowledge feature and a plurality of local knowledge features;
[0179] The initial network service model is trained according to the sample data to obtain a trained target network service model; the target network service model is used to provide network services.
[0180] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0181] Get the network structure of the pressure state response PSR object;
[0182] Construct the global knowledge graph and local knowledge graph of the PSR object according to the network structure of the PSR object;
[0183] According to the global knowledge graph and the local knowledge graph, sample data is obtained.
[0184] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0185] Convert the network structure of the PSR object into a preset data structure;
[0186] The global knowledge graph and local knowledge graph of the PSR object are constructed according to the network structure of the PSR object, including:
[0187] Construct the global knowledge graph and local knowledge graph of the PSR object according to the preset data structure.
[0188] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0189] The network structure of the PSR object is represented by a triple structure and the preset data structure is determined.
[0190] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0191] Extract features from the global knowledge graph to obtain global knowledge features;
[0192] Extract features from the local knowledge graph to obtain multiple local knowledge features;
[0193] Sample data is obtained according to the global knowledge feature and multiple local knowledge features.
[0194] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0195] The global knowledge feature and multiple local knowledge features are fused, and the fused features are determined as sample data.
[0196] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0197] Acquire data to be processed; the data to be processed includes at least one of business service object data, network service object data and resource object data;
[0198] According to the target network service model, network analysis is performed on the data to be processed to obtain network service results; the target network service model is trained based on sample data and an initial network service model, and the sample data includes global knowledge features and multiple local knowledge features.
[0199] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0200] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0201] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0202] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A model training method, characterized in that: The method comprises: Acquire sample data; the sample data includes a global knowledge feature and a plurality of local knowledge features; The initial network service model is trained according to the sample data to obtain a trained target network service model; the target network service model is used to provide network services.
2. The method according to claim 1, characterized in that The obtaining of sample data comprises: Get the network structure of the pressure state response PSR object; Constructing a global knowledge graph and a local knowledge graph of the PSR object according to the network structure of the PSR object; The sample data is obtained according to the global knowledge graph and the local knowledge graph.
3. The method according to claim 2, characterized in that The method further comprises: Convert the network structure of the PSR object into a preset data structure; The constructing the global knowledge graph and the local knowledge graph of the PSR object according to the network structure of the PSR object includes: Construct the global knowledge graph and local knowledge graph of the PSR object according to the preset data structure.
4. The method according to claim 3, characterized in that The network structure of the PSR object is converted into a preset data structure, including: The network structure of the PSR object is represented by a triple structure, and the preset data structure is determined.
5. The method according to any one of claims 2 to 4, characterized in that: The obtaining the sample data according to the global knowledge graph and the local knowledge graph includes: Performing feature extraction on the global knowledge graph to obtain the global knowledge features; Performing feature extraction on the local knowledge graph to obtain the multiple local knowledge features; The sample data is obtained according to the global knowledge feature and the multiple local knowledge features.
6. The method according to claim 5, characterized in that The obtaining of the sample data according to the global knowledge feature and the plurality of local knowledge features comprises: The global knowledge feature and the multiple local knowledge features are subjected to feature fusion, and the fused features are determined as the sample data.
7. A network service method, characterized in that: The method comprises: Acquire data to be processed; the data to be processed includes at least one of business service object data, network service object data and resource object data; According to the target network service model, network analysis is performed on the data to be processed to obtain a network service result; the target network service model is trained based on sample data and an initial network service model, and the sample data includes global knowledge features and multiple local knowledge features.
8. A model training device, characterized in that: The device comprises: A first acquisition module is used to acquire sample data; the sample data includes a global knowledge feature and a plurality of local knowledge features; The training module is used to perform model training on the initial network service model according to the sample data to obtain a trained target network service model; the target network service model is used to provide network services.
9. A network service device, characterized in that: The device comprises: A second acquisition module is used to acquire data to be processed; the data to be processed includes at least one of business service object data, network service object data and resource object data; The input module is used to perform network analysis on the data to be processed according to the target network service model to obtain the network service result; the target network service model is trained based on sample data and an initial network service model, and the sample data includes global knowledge features and multiple local knowledge features.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
