Work order approval method and device, electronic equipment and storage medium
By acquiring and analyzing the characteristic data of the work order, the pre -training model is used to automatically approve the problem of low manual approval efficiency and security risks, and the efficient and accurate work order approval process has been achieved.
Patent Information
- Application Number
- CN202411469633.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-21
- Publication Date
- 2025-01-28
AI Technical Summary
In the prior art, the work order approval process relies on manual review, resulting in inefficiency, inaccurate results and security risks.
By obtaining the characteristic data of the target work order, the pre -trained work order approval model is used for automatic approval to improve the efficiency and accuracy of approval and reduce safety risks.
The automation of the work order approval has been realized, the accuracy of approval efficiency and results are improved, and safety risks are reduced.
Smart Images

Figure CN119379205A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and specifically to a work order approval method, device, electronic device and storage medium. Background Art
[0002] At present, most enterprises use virtual private networks (VPNs) or zero trust to protect intranet resources. Access policies are applied through work orders, which require manual review and approval. Since manual approval is required, the process is cumbersome and time-consuming, which often delays normal working hours and may cause potential security issues. When employees apply for permissions beyond their business scope and the approvers do not check carefully, it is easy to cause security risks. Summary of the invention
[0003] The embodiments of the present application disclose a work order approval method, device, electronic device and storage medium, which can automatically approve resource access policy work orders, improve the work order approval efficiency and the accuracy of work order approval results, and reduce security risks.
[0004] The first aspect of the embodiment of the present application discloses a work order approval method, the method comprising:
[0005] Acquire characteristic data of the target work order; the characteristic data is determined according to the target content of the target work order, and the target content includes at least one of the Internet Protocol IP address of the resource applied for access, the port of the resource, the communication protocol, the business reason for the application for access, the application for access duration, and the applicant information;
[0006] The approval result of the target work order is determined according to the feature data and a pre-trained work order approval model, wherein the work order approval model is obtained by training an initial model according to the feature data of a sample work order and the approval result of the sample work order.
[0007] As an optional implementation manner, in the first aspect of this embodiment, obtaining characteristic data of the target work order includes:
[0008] The target work order is input into a pre-trained feature extraction model to obtain feature data of the target work order, wherein the feature extraction model is trained on the sample work order and the feature data of the sample work order.
[0009] As an optional implementation, in the first aspect of this embodiment, the feature data is a feature vector, the feature extraction model includes a data extraction module and a data conversion module, and the target work order is input into a pre-trained feature extraction model to obtain the feature data of the target work order, including:
[0010] Inputting the target work order into the data extraction module to obtain the target content of the target work order;
[0011] The target content is input into the data conversion module to obtain a feature value corresponding to the target content, and a feature vector of the target work order is obtained according to the feature value.
[0012] As an optional implementation, in the first aspect of this embodiment, the sample work order is an approved work order exported from the approval process system corresponding to the target work order.
[0013] As an optional implementation manner, in the first aspect of this embodiment, the method further includes:
[0014] According to the characteristic data of the sample work order and the approval result of the sample work order, the initial model is trained to obtain the work order approval model.
[0015] As an optional implementation, in the first aspect of this embodiment, the training of the initial model to obtain the work order approval model according to the feature data of the sample work order and the approval result of the sample work order includes:
[0016] The characteristic data of some sample work orders in the sample work orders and the combination of the approval results corresponding to the some sample work orders are used as a sample training set, and the characteristic data of the remaining sample work orders in the sample work orders and the combination of the approval results corresponding to the remaining sample work orders are used as a sample test set;
[0017] The initial model is trained using the sample training set. When the accuracy of the trained target work order approval model on the sample test set is greater than or equal to a preset accuracy threshold, the trained target work order approval model is used as the work order approval model.
[0018] As an optional implementation, in the first aspect of this embodiment, the initial model is built based on a support vector machine model, and the approval result of the target work order is determined based on a decision function corresponding to the support vector machine model, wherein the decision function is determined based on a Gaussian kernel function and an estimated value of a preset Lagrange multiplier.
[0019] A second aspect of an embodiment of the present application discloses a work order approval device, the device comprising:
[0020] An acquisition module, used to acquire characteristic data of a target work order; the characteristic data is determined according to the target content of the target work order, and the target content includes at least one of an Internet protocol IP address for applying to access a resource, a port of the resource, a communication protocol, a business reason for applying to access, a duration of applying to access, and applicant information;
[0021] An approval module is used to determine the approval result of the target work order based on the feature data and a pre-trained work order approval model, wherein the work order approval model is obtained by training an initial model based on the feature data of a sample work order and the approval result of the sample work order.
[0022] A third aspect of an embodiment of the present application discloses an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor implements the method described above.
[0023] A fourth aspect of an embodiment of the present application discloses a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the method described above when executed by a processor.
[0024] Compared with the related art, the embodiments of the present application include at least the following beneficial effects:
[0025] The embodiments of the present application disclose a work order approval method, device, electronic device and storage medium, which obtains the characteristic data of the target work order and determines the approval result of the target work order according to the characteristic data and the pre-trained work order approval model. Compared with the related art that relies on manual approval, the embodiments of the present application can automatically approve resource access policy work orders through the work order approval model, thereby improving the work order approval efficiency and the accuracy of the work order approval results, and reducing security risks. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0027] Figure 1 This is an application scenario diagram of a work order approval method in an embodiment;
[0028] Figure 2 A flowchart of a work order approval method in one embodiment;
[0029] Figure 3 A flow chart of a method for obtaining characteristic data of a target work order in one embodiment;
[0030] Figure 4 A flowchart of a method for obtaining a work order approval model in an embodiment;
[0031] Figure 5 A block diagram of a work order approval device in one embodiment;
[0032] Figure 6 FIG. 4 is a structural block diagram of an electronic device in an embodiment. DETAILED DESCRIPTION
[0033] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0034] In order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first" and "second" are used to distinguish the same items or similar items with substantially the same functions and effects. For example, the first instruction and the second instruction are to distinguish different user instructions, and their order is not limited. Those skilled in the art can understand that the words "first" and "second" do not limit the quantity and execution order, and the words "first" and "second" do not necessarily limit them to be different.
[0035] It should be noted that, in this application, words such as "exemplarily" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplarily" or "for example" in this application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplarily" or "for example" is intended to present related concepts in a specific way.
[0036] In addition, "at least one" means one or more, and "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can mean: a, or b, or c, or a and b, or a and c, or b and c, or a, b and c, where a, b, c can be single or multiple.
[0037] In addition, the terms "including" and "having" and any variations thereof in the embodiments of the present application and the accompanying drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products, or devices.
[0038] In modern enterprises, the management of intranet resources is a crucial link. It not only involves the security of enterprise data, but also directly affects the work efficiency of employees. Traditional intranet resource access management usually relies on VPN (virtual private network) technology, which enables remote users to safely access enterprise intranet resources by establishing an encrypted channel. However, with the development of technology and changes in work modes, some limitations of VPN technology have begun to emerge, such as complex configuration on mobile devices and strong dependence on the network environment. In order to solve these problems, the zero trust model came into being. Under the zero trust model, whether the user is located in the enterprise intranet or the extranet, their access requests need to be strictly verified and authorized. The zero trust model ensures that only legitimate users and devices can access specific resources through continuous monitoring and evaluation.
[0039] In actual applications, enterprises usually use a work order system to manage access rights to intranet resources. Employees apply for access to specific intranet resources by submitting work orders, which are then approved by administrators. This work order approval method has some shortcomings. First, the manual approval process is cumbersome and time-consuming, which not only affects work efficiency, but may also cause approval delays and affect the normal operation of the business. Secondly, since the approval process involves human judgment, there may be omissions. For example, the approver may fail to carefully review the applicant's business scope, thereby approving access requests that exceed their authority, which undoubtedly increases security risks.
[0040] In view of this, the embodiments of the present application disclose a work order approval method, device, electronic device and storage medium, which can automatically approve resource access policy work orders, improve the work order approval efficiency and the accuracy of the work order approval results, and reduce security risks. The following are detailed descriptions.
[0041] See also Figure 1 , Figure 1 FIG. 1 is an application scenario diagram of a work order approval method in an embodiment. Figure 1 As shown, the application scenario includes: a user device 10 and a server 20, wherein a signaling connection is established between the user device 10 and the server 20.
[0042] In some embodiments, the user device 10 may include but is not limited to a mobile phone, a tablet computer, a desktop computer, a laptop computer, a portable terminal, a vehicle terminal, a PC (Personal Computer), etc. The computer system in the user device 10 may be Windows, Linux, IOS or Unix, which is not specifically limited here. The server 20 may be a server cluster composed of multiple servers, or a single server, or a computer, for example, a tower server, a rack server, a blade server, a cloud server, etc., which is not specifically limited here.
[0043] In some embodiments, users can access the interface of the internal work order approval process system of the enterprise through mobile phones, tablet computers, laptop computers and other devices to submit work order applications. At the same time, the internal approval process system, feature extraction model, and work order approval model are deployed on the server 20. After receiving the target work order, the server 20 extracts the feature data of the target work order through the feature extraction model, inputs the feature data into the work order approval model for automatic approval, and feeds back the approval result to the user device 10. The user can check the approval status of the work order on the user device 10 to understand whether the work order application is approved.
[0044] In some embodiments, the server 20 may also store sample work orders and corresponding approval results in the internal approval process system to provide sample data for the training and prediction of the work order approval model. The user device 10 may communicate with the server 20 through a communication network, and the communication network may be a wired network or a wireless network. For example, the communication network may be a local area network (LAN) or a wide area network (WAN), such as the Internet. When the communication network is a local area network, exemplarily, the communication network may be a short-range communication network such as a wireless fidelity (Wi-Fi) hotspot network, a Wi-Fi P2P network, a Bluetooth network, a zigbee network, or a near field communication (NFC) network. When the communication network is a wide area network, exemplarily, the communication network may be a third-generation mobile communication technology network, a fourth-generation mobile communication technology network, a fifth-generation mobile communication technology network, or the like.
[0045] See also Figure 2 , Figure 2 FIG. 1 is a flowchart of a work order approval method in an embodiment. Figure 2 As shown, the method may include the following steps:
[0046] Step 201, obtain characteristic data of the target work order; the characteristic data is determined based on the target content of the target work order, and the target content includes at least one of the Internet Protocol IP address of the resource applied for access, the port of the resource, the communication protocol, the business reason for applying for access, the duration of the application for access, and the applicant information.
[0047] In an embodiment of the present application, the target work order can be obtained through the work order approval process system within the enterprise, and internal employees can submit the target work order through the approval process system to apply for an access policy. The access policy refers to the access permission setting for specific network resources, which is used to determine the specific resources to be accessed, the access permission level, and the access condition restrictions. After approval, employees can access resources in accordance with the method specified in the access policy to ensure that only authorized users can access sensitive data or perform key operations, thereby protecting the security of enterprise resources.
[0048] In some embodiments, the target work order is a request document submitted by an employee for applying for access to a specific intranet resource. The target content in the target work order includes the Internet Protocol (IP) address of the resource requested for access. The IP address is used to identify the location of the resource requested for access in the network. Through the IP address, a specific server, database or other network device can be quickly located; the port of the resource refers to the logical port used to distinguish different services or applications in network communications. Based on the Internet Protocol (IP), the port number is used to identify a specific service or application running on a host (server or personal computer). In an enterprise intranet, the port of the resource can be the port listened to by internal services (such as databases, file servers, internal websites, etc.). For example, an internal database service may be configured to accept connections only on a specific port. In this case, employees need to apply for access to the port through the work order approval process; the communication protocol in the target work order is the data transmission method and rule agreement involved in applying for access to intranet resources. The communication protocol types may include Transmission Control Protocol (TCP), User Datagram Protocol (UDP), Hypertext Transfer Protocol (HTTP), File Transfer Protocol (FTP), etc., which are not specifically limited here.
[0049] In some embodiments, the business reason for applying for access in the target content of the target work order refers to the specific business need or purpose for which the employee needs to access resources. For example, access to customer data, system maintenance or support, research and development activities, data analysis, etc. The applicant information may include the applicant ID, applicant position, applicant responsibilities, etc., and may also include the applicant's name, department, contact information, etc. It is understandable that the target content of the target work order includes at least one of the target contents in the above embodiments, and may also include other information in the access policy, which is not specifically limited here.
[0050] In an embodiment of the present application, obtaining characteristic data of a target work order includes:
[0051] The target work order is input into a pre-trained feature extraction model to obtain feature data of the target work order, wherein the feature extraction model is trained on the sample work order and the feature data of the sample work order.
[0052] In some embodiments, a large language model can be used as a feature extraction model. The large language model learns rich language representations by pre-training on a large amount of text data. The model can capture complex patterns and semantic information of words, phrases, sentences, and even the entire document. When the target work order exists in text form, the target work order content can be input into the large language model, and the model will output a fixed-length feature vector that encodes the semantic information of the target work order, that is, the feature data of the target work order.
[0053] Step 202, determining the approval result of the target work order based on the feature data and a pre-trained work order approval model, wherein the work order approval model is obtained by training an initial model based on the feature data of the sample work order and the approval result of the sample work order.
[0054] In the embodiment of the present application, the sample work order is a work order that has been approved and exported from the approval process system corresponding to the target work order. The internal work order approval process system supports providing an API interface, which can query, export process records and control processes for the work order approval model. The process records include sample work orders and the approval results of the sample work orders. The sample content of the sample work order includes the Internet Protocol IP address of the resource accessed by the historical application, the port of the historical access resource, the historical communication protocol, the business reason for the historical application access, the historical application access time and at least one of the historical applicant information, and may also include other historical information, which is not specifically limited here. In addition, the internal work order approval process system can automatically adjust the approval process according to the prediction results of the work order approval model to improve the approval efficiency. When a new work order enters the system or the approval process changes, the work order approval process system can actively push relevant information to the work order approval model. The system integrated with the model can realize an automated approval process, reduce the workload and error rate of manual approval, and at the same time, the traceability and data analysis functions of the system can help enterprises discover problems and bottlenecks in the approval process and make continuous optimization.
[0055] In some embodiments, the feature data of the sample work order includes all feature dimensions in the sample content. The feature data of the sample work order can be obtained by preprocessing the sample work order, for example, first cleaning the sample content of the sample work order to remove invalid or erroneous records, then formatting the data to ensure that the sample work order content maintains data consistency, and then segmenting the work order content to decompose the content into separate fields, such as resource IP address, communication protocol type, applicant information, etc. Finally, the feature data of the sample work order is directly obtained through the pre-established mapping relationship between the sample content and the feature value. It can be understood that by using the sample work order as a data set and the feature data of the sample work order as the label of the data set, after training the feature extraction model, it can be used to extract the feature data of the target work order.
[0056] In some other embodiments, the mapping relationship between sample content and feature values can be imported into a trained large language model, and the sample work order exported from the internal approval process system can be imported into the large language model for feature extraction to obtain feature data of the sample work order. Before importing the mapping relationship between sample content and feature values into the large language model, it is necessary to organize the mapping relationship between sample content and feature values into a format suitable for input into the large language model. Usually, this mapping relationship can be represented by a table (such as CSV format) or a structured JSON file. For example, in the CSV format, each row can represent a mapping relationship, the first column is the key information of the sample content (such as keywords, phrases, etc.), and the second column is the corresponding feature value. For the JSON format, it can more flexibly represent complex mapping relationships. For example, there can be an object containing "mapping rules", where each rule is a key-value pair, the key is a description of the sample content (which can be a more complex form such as a regular expression), and the value is the corresponding feature value. Similarly, the mapping relationship between the target content and the feature value in the target sample can be imported into the large language model to extract the feature data of the target work order.
[0057] In an embodiment of the present application, based on the characteristic data of the obtained sample work orders and the approval results corresponding to the sample work orders exported from the internal approval process system, a sample data set for initial model training can be obtained. The initial model can be built based on a support vector machine model or other models, such as a decision tree model, a random forest model, a neural network model, a logistic regression model, etc. During the training process, these models build a prediction model by learning the relationship between input features (characteristic data of sample work orders) and output labels (approval results corresponding to sample work orders), so that when faced with new target work order characteristic data, its approval result can be predicted. It can be understood that as long as it is a model that can be used for classification tasks and can classify work orders into different approval categories, such as pass or reject, after training, it can be used as an initial model, and no specific limitation is made here.
[0058] By adopting the above embodiment, the characteristic data of the target work order is obtained, and the approval result of the target work order is determined according to the characteristic data and the pre-trained work order approval model. Compared with the related art that relies on manual approval, the embodiment of the present application can automatically approve the resource access policy work order through the work order approval model, thereby improving the work order approval efficiency and the accuracy of the work order approval result, and reducing security risks.
[0059] See also Figure 3 , Figure 3 FIG. 1 is a flow chart of a method for obtaining characteristic data of a target work order in one embodiment. Figure 3As shown, the target work order is input into a pre-trained feature extraction model to obtain feature data of the target work order, the feature data is a feature vector, the feature extraction model includes a data extraction module and a data conversion module, the target work order is input into a pre-trained feature extraction model to obtain feature data of the target work order, including the following steps:
[0060] Step 301, input the target work order into the data extraction module to obtain the target content of the target work order.
[0061] In an embodiment of the present application, the target work order is a work order for approval submitted by an enterprise employee in an internal approval process system, and the target content includes at least one of the Internet Protocol IP address of the resource to be accessed, the port of the resource, the communication protocol, the business reason for the application for access, the duration of the application for access, and the applicant's information. The data extraction module of the feature extraction model is used to identify and extract the target content in the target work order, and regular expressions or natural language processing technology can be used to parse the work order text to identify and extract key information containing the target content. It is understandable that the data extraction module can also perform data cleaning on the target work order, such as identifying and processing outliers and missing values in the target work order data, ensuring the consistency of the data format, such as date format, numerical format, etc., to facilitate further processing and analysis of the data.
[0062] In some embodiments, the data extraction module can be obtained by training a data extraction model through sample work orders and sample content of the sample work orders. The data extraction model can be a large language model, a recurrent neural network model (RNN), a long short-term memory network (LSTM), and a model based on the Transformer architecture, etc. These models can automatically learn the feature representation in the work order text, and can be trained to identify various types of information in the work order to obtain the target content of the target work order.
[0063] Step 302: input the target content into a data conversion module to obtain a feature value corresponding to the target content, and obtain a feature vector of the target work order according to the feature value.
[0064] In the embodiment of the present application, for various elements in the target content, such as the communication protocol, the IP address of the resource to be accessed, the applicant information, etc., the data conversion module will convert the target content into the corresponding characteristic value according to the preset mapping relationship between the target content and the characteristic value. For example, the IP address of the resource to be accessed and the port of the resource can be directly converted into a numerical representation in the form of an integer. For target content that cannot be directly converted into a numerical representation, a mapping table can be established. For example, different numerical codes can be assigned to different communication protocols, such as TCP given mapping value 1, UDP given mapping value 2, HTTP given mapping value 3, FTP given mapping value 4, etc. It can be understood that the specific mapping value is not specifically limited.
[0065] In some embodiments, the method for mapping the business reason for applying for access to a characteristic value may be: first, sort out and analyze various possible business reasons, and divide the business reasons into different categories, such as data query, system maintenance, business development, etc., and then further subdivide the specific reason description under each category. For example, under the data query category, there may be specific reasons such as viewing sales data and querying customer information. A unique numerical code is assigned to each specific business reason, and a sequential coding method may be used, starting from 1 and increasing in sequence. For example, "viewing sales data" is coded as 1, "querying customer information" is coded as 2, and so on.
[0066] In some embodiments, the application access duration is mapped to a characteristic value, and a reasonable time interval division can be determined according to the actual situation. For example, the access duration can be divided into intervals such as 0-1 hour, 1-2 hours, 2-3 hours, etc. in units of hours. It can also be divided more finely according to business needs, such as dividing an interval every half hour, and then assigning a numerical code to each time interval. The code can be set according to the length or importance of the interval. For example, 0-1 hours is encoded as 1, 1-2 hours is encoded as 2, and so on. In some other embodiments, the application access duration can also be directly converted into a characteristic value. First, the unit of the application access duration is clarified, which can usually be hours, minutes or seconds. Assuming that the unit is hours, determine a minimum time unit increment, such as 0.1 hours, so that the access duration can be more accurately represented, and then a linear conversion is performed according to the numerical value of the time unit. For example, if the application access time is 1.5 hours, directly convert it to the value 1.5. If the application access time is given in other units, such as minutes or seconds, it is necessary to convert the units first and then convert the values. Through the above method, the application access time can be converted into a characteristic value, which is convenient for subsequent data processing and analysis.
[0067] In some embodiments, the method for mapping applicant information to feature values is as follows: for applicant ID, its original value can be directly retained as the feature value or a simple hash operation can be performed on it to obtain a unique numerical code; the applicant's position can be classified first, such as management position, technical position, administrative position, etc., and a specific numerical value is assigned to each position category. For example, the management position corresponds to a value of 1, the technical position corresponds to a value of 2, and the administrative position corresponds to a value of 3. If the positions have a finer hierarchical division, the coding can be further refined, such as senior management positions are 1.1, and intermediate management positions are 1.2. The applicant's responsibilities can be classified by analyzing the keywords in the job description. For example, if keywords such as "project management" and "team leader" appear in the responsibilities, they can be classified into a category of responsibilities and assigned a value of 10. If there are keywords such as "technology research and development" and "code writing", they are assigned a value of 20. For the applicant's name, a hash function can be used to convert it into a fixed-length value, or certain features in the name can be extracted, such as the ordinal position of the first letter in the alphabet and converted into a numerical value. For example, for applicants whose names begin with A, the first letter corresponds to the value 1; the applicant's department can also be classified and coded, such as R&D department 100, sales department 200, finance department 300, etc. If the department has sub-departments, it can be expanded on the basis of the main department code, such as R&D department 1 is 101, R&D department 2 is 102, etc. There is no specific limitation on the way of mapping applicant information to feature values.
[0068] The encoded feature values of the target content are combined in a predetermined order to form a feature vector. The dimension of the feature vector is the dimension of the feature value, which is also the feature dimension corresponding to the target content. For example, the Internet Protocol (IP) address of the resource requested for access is one of the feature dimensions.
[0069] In some other embodiments, the data conversion module can be obtained by training a data conversion model through the sample content of the sample work order and the feature data of the sample work order. The trained data conversion model will learn the mapping relationship between the sample content and the feature data of the sample work order. Based on the mapping relationship, the data conversion module can convert the target content of the target work order into a feature vector.
[0070] By adopting the above embodiment, through the combination of the data extraction module and the data conversion module, automatic processing of the target work order can be achieved. By converting the work order content into a feature vector, the work order can be analyzed from multiple dimensions, providing more valuable basis for subsequent processing and decision-making, and improving the accuracy of work order approval.
[0071] See also Figure 4 , Figure 4 A flowchart of a method for obtaining a work order approval model in an embodiment is shown as follows: Figure 4As shown, the method may include the following steps:
[0072] Step 401, obtaining a sample training set and a sample test set.
[0073] In an embodiment of the present application, an internal approval process system can be pre-built and deployed, and sample work orders and approval results corresponding to the sample work orders can be exported from the internal approval process system. The feature data of the sample work order can be directly obtained through the mapping relationship between the sample content and the feature value of the pre-established sample work order. In other embodiments, the method for obtaining the feature data of the sample work order can also perform feature extraction through a large language model, and import the pre-constructed mapping relationship between the sample content and the feature value into the trained large language model. The sample content includes the IP address of the resource accessed by the historical application, the port of the historical resource, the historical communication protocol, the business reason for the historical application access, the historical application access duration, the historical applicant ID, the historical applicant position, and at least one of the historical applicant's responsibilities. The sample content in the sample work order is extracted through the large language model, and the sample content is converted into the corresponding feature value. Finally, the feature data of the sample work order is obtained according to the feature value corresponding to the sample content. The method for obtaining the feature data of the sample work order through the large language model is similar to the method for obtaining the feature data of the target work order, which will not be repeated here.
[0074] The feature data of some sample work orders in the sample work order and the combination of the approval results corresponding to some sample work orders are used as the sample training set, and the feature data of the remaining sample work orders in the sample work order and the combination of the approval results corresponding to the remaining sample work orders are used as the sample test set. For example, n sample training sets can be expressed as follows:
[0075] D={(x1,y1),(x2,y2),...,(x n ,y n )},y i ∈{-1,1}, (1)
[0076] Where D represents a set of n sample work order data and the corresponding approval results, (x1, y1) represents the feature data of the first sample work order in the training set and its corresponding approval result, and y i Indicates the approval result of the sample work order. A value of -1 indicates that the approval result is not passed, and a value of 1 indicates that the approval result is passed. i ={x i1 ,x i2 ,...,x it}, i = 1, 2, ..., n means that the feature data of a sample work order contains t feature dimensions. For example, the port of the historical resource is one of the feature dimensions. Similarly, the m sample test sets can be expressed as follows:
[0077] D'={(x1,y1),(x2,y2),...,(x m ,y m )},y i ∈{-1,1} (2)
[0078] Wherein, D' represents a set of m sample work order data and corresponding approval results, and (x1, y1) represents the feature data of the first sample work order in the test set and its corresponding approval result. The sample training set is used for training the initial model, and the sample test set is used for verification testing of the trained initial model. The initial model is built based on the support vector machine model, and can also be built based on other models. In the embodiment of this application, the support vector machine model is taken as an example to illustrate the acquisition process of the work order approval model.
[0079] Step 402: Support vector machine model training.
[0080] Support Vector Machine (SVM) is a supervised learning algorithm mainly used for classification and regression problems. The core idea of the support vector machine model is to find an optimal hyperplane in the feature space so that the interval between samples of different categories is maximized. For linearly separable data, the support vector machine model attempts to maximize the interval between two categories to improve the robustness of classification. If the data is linearly inseparable, the support vector machine model maps the data to a high-dimensional feature space through a kernel function, making the data linearly separable in this high-dimensional space. Commonly used kernel functions include linear kernels, polynomial kernels, and Gaussian kernels (radial basis kernels). For example, the Gaussian kernel function maps samples in a low-dimensional space to an infinite-dimensional feature space, and determines the similarity by calculating the inner product of the samples in the high-dimensional space, thereby achieving nonlinear classification.
[0081] In the embodiment of the present application, the kernel function of the selected support vector machine model is a Gaussian kernel function, and its specific expression can be expressed as follows:
[0082]
[0083] Among them, x, y represent the input vectors, σ is the hyperparameter of the kernel function, which is used to control the width of the kernel function, ||xy|| 2 is the square of the Euclidean distance between two vectors, K(x,y) is the kernel function, and e represents the base of the natural logarithm. After the kernel function is introduced, the training problem of the support vector machine is transformed into solving a constrained quadratic programming problem, and the objective function is to minimize the Lagrangian function:
[0084]
[0085] where α i , α jis the Lagrange multiplier, n is the number of sample work orders in the sample training set, y i ,y j is the category label of the sample work order approval result, K(x i ,x j ) is the kernel function, which represents the inner product operation after mapping the sample to the high-dimensional feature space. i ,x j The feature vector representing the sample work order, with the following constraints:
[0086]
[0087] C is the penalty parameter, and a default value can be given before model training to balance the complexity of the model and the degree of fit to the sample training set. It also controls the penalty intensity of the model for misclassified samples. For example, a larger penalty parameter value will make the model pay more attention to the correct classification of training samples, which may lead to overfitting; a smaller penalty parameter value will make the model less penalized for misclassified samples, which may lead to underfitting. During the model training process, the hyperparameter σ of the Gaussian kernel function and the penalty parameter C can be dynamically adjusted according to the model training effect.
[0088] By solving the optimization problem of the objective function, the estimated value of the Lagrange multiplier can be obtained. Under the constraints, the sample points whose corresponding Lagrange multipliers are not zero are called support vectors, which determine the form of the decision function of the support vector machine model.
[0089] In some embodiments, during the model training process, a Sequential Minimal Optimization (SMO) algorithm can be used to solve the optimization problem of the model to obtain an estimated value of the Lagrange multiplier. The SMO algorithm selects two Lagrange multipliers α each time. i and α j Perform optimization, fix other Lagrange multipliers, and update their values by solving a quadratic programming subproblem about these two multipliers so that the objective function value decreases. Repeat this process until the convergence condition is met.
[0090] For the two selected multipliers α i and α j , the objective function and constraints are simplified to a form containing only these two variables. By taking the derivative of the simplified objective function and setting the derivative to zero, we can obtain a j The linear equation of α can be directly solved j Then according to the constraints and α j Update the value of α i,According to the updated Lagrange multipliers, the weight vector and bias term of the support vector machine are calculated.,The convergence condition of the model can be determined by judging whether the change of the Lagrange multiplier is less than a given threshold, or whether the change of the objective function value is small enough, etc.,If the convergence condition is not met, the next pair of Lagrange multipliers will be selected for optimization.
[0091] Step 403: Determine the decision function corresponding to the support vector machine model according to the estimated values of the Gaussian kernel function and the Lagrange multiplier.
[0092] In the embodiment of the present application, based on the estimated values of the Gaussian kernel function and the Lagrange multiplier, the decision function of the support vector machine model can be expressed as:
[0093]
[0094] Where n is the number of sample work orders in the sample training set, α i represents the estimated value of the Lagrange multiplier. x i ,x j The feature vector representing the sample work order, y i ,y j is the category label of the approval result of the sample work order. b is the bias term of the decision function, and x represents the eigenvector of the target work order. The approval result of the target work order is determined according to the decision function corresponding to the support vector machine model, where the decision function is determined according to the estimated value of the Gaussian kernel function and the preset Lagrange multiplier. For a new data point, such as the eigenvector of the target work order, the decision function calculates the similarity with all support vectors through the Gaussian kernel function, and combines the weight of the Lagrange multiplier to obtain a value, and then judges the category to which the data point belongs based on the value, that is, the approval result of the target work order. For example, if the calculation result is greater than 0, it belongs to the positive class and the approval result is passed; if the calculation result is less than 0, it belongs to the negative class and the approval result is not passed.
[0095] In some embodiments, the prediction accuracy and generalization ability of the decision function on new data directly reflect the performance of the support vector machine model. If the decision function can accurately classify new data points, it means that the model has learned the rules in the data well and has good generalization ability. On the contrary, if the decision function performs poorly on the test data and a large number of misclassifications occur, it means that the model has problems such as overfitting or underfitting, and the model needs to be adjusted, such as adjusting the hyperparameters and penalty parameters of the Gaussian kernel function.
[0096] The parameters in the support vector machine model, such as the Lagrange multiplier, the hyperparameter σ of the Gaussian kernel function, and the penalty parameter C, all directly affect the decision function. The Lagrange multiplier determines the weight of the support vector in the decision function. Different weight distributions will lead to different classification tendencies of the decision function for different data points. The hyperparameter σ controls the scope of the Gaussian kernel function, affects the similarity calculation of data points in high-dimensional space, and thus affects the shape of the decision boundary. The penalty parameter C balances the complexity of the model and the tolerance for misclassified samples. The larger the penalty parameter value, the more the model tends to accurately classify the training data, but it may cause overfitting, which will affect the performance of the decision function on new data.
[0097] Step 404: determine whether the accuracy of the support vector machine model on the sample test set is greater than or equal to a given accuracy threshold.
[0098] In an embodiment of the present application, the initial model is trained using a sample training set. When the accuracy of the trained target work order approval model on the sample test set is greater than or equal to a preset accuracy threshold, the trained target work order approval model is used as the work order approval model.
[0099] In some embodiments, the sample training set and the sample test set can be divided according to a fixed ratio, such as 6:3, 8:2, etc., and the sample training set is used to train the support vector machine model, and the test set is used to evaluate the performance and generalization ability of the model. In addition, a cross-validation method, such as K-fold cross-validation, can be used to randomly divide the sample data set into K subsets of the same size, and each time one of the subsets is selected as the test set, and the remaining K-1 subsets are used as the training set. This process is repeated K times, so that each subset has the opportunity to be used as a test set. Finally, the performance of the model is evaluated by combining the results of K times.
[0100] In some embodiments, the decision function corresponding to the trained target work order approval model can be applied to the sample test set to evaluate the performance of the model. For each work order in the test set, its feature vector is substituted into the decision function to obtain the predicted approval result of the model, and then the predicted approval result is compared with the actual approval result in the test set to calculate the accuracy and other evaluation indicators. For example, if the actual approval result of a work order is "passed", and the predicted output result of the model decision function for the work order is greater than 0, then the predicted approval result of the work order is correct. If the predicted output result of the model decision function for the work order is less than 0, then the predicted approval result of the work order is wrong. Finally, the number of correctly predicted work orders is counted, and the accuracy is the ratio of the number of correctly predicted work orders to the total number of work orders in the test set. If the calculated accuracy is greater than or equal to the preset accuracy threshold, the trained target work order approval model is used as the work order approval model. Otherwise, the support vector machine model is continuously trained until a model that meets the requirements is trained.
[0101] Step 405: Obtain the work order approval model.
[0102] In an embodiment of the present application, the work order approval model output after the inspection in step 404 is integrated into the internal approval process system to ensure seamless connection with the interface for employees to submit target work orders. For the target work orders submitted by employees, the work order log is subjected to feature extraction by a feature extraction model to obtain feature data of the target work order, and then the feature data is input into the decision function corresponding to the work order approval model to calculate the output value. The decision result of the work order approval model can be obtained based on the output value, so as to callback and reject or pass the submitted target work order, thereby realizing an efficient and automatic work order approval process.
[0103] In some embodiments, the work order approval model can be integrated into the internal approval process system through API integration, plug-in integration, and independent service integration. API integration is to pass the work order data to the model for approval and obtain the approval result by calling the API interface provided by the model. Plug-in integration is to use the model as a plug-in of the internal approval process system and directly call the model in the system for approval. Independent service integration is to run the model as an independent service and interact with the internal approval process system through network communication.
[0104] At the same time, a complete work order callback mechanism is established to ensure that the approval results can be fed back to the applicant in a timely manner. In addition, the automatic approval process can be monitored to record the approval time, results and other information in order to promptly identify and handle problems, and set up an early warning mechanism to promptly notify relevant personnel to intervene when the model makes abnormal decisions or the approval efficiency decreases.
[0105] By adopting the above embodiment, the work order approval model can automatically make decisions on the target work orders submitted by employees in a short time, greatly reducing the time required for approval, and the work order approval model can process multiple target work orders at the same time. Compared with traditional manual approval, it can process more work order applications in the same time, improving the approval efficiency of work orders. Resource access policy work orders that are not within the scope of responsibility can also be directly rejected, making the enterprise's access management of assets more intelligent and safer and standardized.
[0106] See also Figure 5 , Figure 5 4 is a block diagram of a work order approval device in an embodiment. The work order approval device 500 may include an acquisition module 510 and an approval module 530 .
[0107] Acquisition module 510, for characteristic data of a target work order; the characteristic data is determined according to the target content of the target work order, the target content including at least one of the Internet Protocol IP address of the resource applied for access, the port of the resource, the communication protocol, the business reason for the application for access, the application for access duration and the applicant information;
[0108] The approval module 530 is used to determine the approval result of the target work order based on the feature data and a pre-trained work order approval model, wherein the work order approval model is obtained by training an initial model based on the feature data of a sample work order and the approval result of the sample work order.
[0109] In some embodiments, Figure 5 The work order approval device shown also includes:
[0110] The feature extraction module 520 is used to input the target work order into a pre-trained feature extraction model to obtain feature data of the target work order, wherein the feature extraction model is trained on the sample work order and the feature data of the sample work order.
[0111] In some embodiments, the feature extraction module 520 may include a data extraction module 521 and a data conversion module 522;
[0112] A data extraction module 521, used for inputting the target work order into the data extraction module to obtain the target content of the target work order;
[0113] The data conversion module 522 is used to input the target content into the data conversion module, obtain the feature value corresponding to the target content, and obtain the feature vector of the target work order according to the feature value.
[0114] In some embodiments, the approval module 530 is specifically used to:
[0115] According to the characteristic data of the sample work order and the approval result of the sample work order, the initial model is trained to obtain the work order approval model.
[0116] In some embodiments, the approval module 530 is further configured to:
[0117] The characteristic data of some sample work orders in the sample work orders and the combination of the approval results corresponding to the some sample work orders are used as a sample training set, and the characteristic data of the remaining sample work orders in the sample work orders and the combination of the approval results corresponding to the remaining sample work orders are used as a sample test set;
[0118] The initial model is trained using the sample training set. When the accuracy of the trained target work order approval model on the sample test set is greater than or equal to a preset accuracy threshold, the trained target work order approval model is used as the work order approval model.
[0119] Figure 6 FIG. 1 is a structural block diagram of an electronic device in an embodiment. Figure 6 As shown, the terminal electronic device 600 may include: a memory 610 storing executable program codes and a processor 620 coupled to the memory 610 .
[0120] The processor 620 calls the executable program code stored in the memory 610 to execute any one of the spatial interaction control methods disclosed in the embodiments of the present application. Those skilled in the art can understand that Figure 6 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0121] The processor 620 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. By running or executing software programs and / or modules stored in the memory 610, and calling data stored in the memory 610, it performs various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole. Optionally, the processor 620 may include one or more processing units; preferably, the processor 620 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 620.
[0122] The memory 610 can be used to store software programs and modules, and the processor 620 executes various functional applications and data processing of the electronic device by running the software programs and modules stored in the memory 610. The memory 610 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function, etc.; the data storage area can store data created according to the use of the electronic device, etc. In addition, the memory 610 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0123] An embodiment of the present application discloses a computer-readable storage medium storing a computer program, wherein the computer program implements the methods described in the above embodiments when executed by a processor.
[0124] An embodiment of the present application discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program can be executed by a processor to implement the methods described in the above embodiments.
[0125] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a ROM, etc.
[0126] As used herein, any reference to memory, storage, database, or other medium may include nonvolatile and / or volatile memory. Suitable nonvolatile memory may include ROM, programmable ROM (Programmable ROM, PROM), erasable PROM (Erasable PROM, EPROM), electrically erasable PROM (Electrically Erasable PROM, EEPROM), or flash memory. Volatile memory may include random access memory (RAM), which is used as an external cache memory. By way of illustration and not limitation, RAM may be in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), memory bus direct RAM (RDRAM) and direct memory bus dynamic RAM (DRDRAM).
[0127] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. Those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present application. It should be noted that "multiple" in the present application includes "two or more".
[0128] In the various embodiments of the present application, it should be understood that the size of the serial numbers of the above-mentioned processes does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0129] The units described above as separate components may or may not be physically separated, and the components shown as units 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 units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0130] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0131] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described 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.
[0132] The above is a detailed introduction to a work order approval method, device, electronic device and storage medium disclosed in the embodiment of the present application. This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of the present application. At the same time, for those of ordinary skill in the art, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A work order approval method, characterized in that: The method comprises: Acquire characteristic data of the target work order; the characteristic data is determined according to the target content of the target work order, and the target content includes at least one of the Internet Protocol IP address of the resource applied for access, the port of the resource, the communication protocol, the business reason for the application for access, the application for access duration, and the applicant information; The approval result of the target work order is determined according to the feature data and a pre-trained work order approval model, wherein the work order approval model is obtained by training an initial model according to the feature data of a sample work order and the approval result of the sample work order.
2. The method according to claim 1, characterized in that The step of obtaining characteristic data of the target work order includes: The target work order is input into a pre-trained feature extraction model to obtain feature data of the target work order, wherein the feature extraction model is trained on the sample work order and the feature data of the sample work order.
3. The method according to claim 2, characterized in that The feature data is a feature vector, the feature extraction model includes a data extraction module and a data conversion module, and the target work order is input into a pre-trained feature extraction model to obtain the feature data of the target work order, including: Inputting the target work order into the data extraction module to obtain the target content of the target work order; The target content is input into the data conversion module to obtain a feature value corresponding to the target content, and a feature vector of the target work order is obtained according to the feature value.
4. The method according to any one of claims 1 to 3, characterized in that: The sample work order is an approved work order exported from the approval process system corresponding to the target work order.
5. The method according to claim 1, characterized in that The method further comprises: According to the characteristic data of the sample work order and the approval result of the sample work order, the initial model is trained to obtain the work order approval model.
6. The method according to claim 5, characterized in that The step of training the initial model according to the characteristic data of the sample work order and the approval result of the sample work order to obtain the work order approval model includes: The characteristic data of some sample work orders in the sample work orders and the combination of the approval results corresponding to the some sample work orders are used as a sample training set, and the characteristic data of the remaining sample work orders in the sample work orders and the combination of the approval results corresponding to the remaining sample work orders are used as a sample test set; The initial model is trained using the sample training set, and when the accuracy of the trained target work order approval model on the sample test set is greater than or equal to a preset accuracy threshold, the trained target work order approval model is used as the work order approval model.
7. The method according to claim 1, characterized in that The initial model is built based on a support vector machine model, and the approval result of the target work order is determined based on a decision function corresponding to the support vector machine model, wherein the decision function is determined based on an estimated value of a Gaussian kernel function and a preset Lagrange multiplier.
8. A work order approval device, characterized in that: The device comprises: An acquisition module, used to acquire characteristic data of a target work order; the characteristic data is determined according to the target content of the target work order, and the target content includes at least one of an Internet Protocol IP address for applying to access a resource, a port for the resource, a communication protocol, a business reason for applying to access, a duration for applying to access, and applicant information; An approval module is used to determine the approval result of the target work order based on the feature data and a pre-trained work order approval model, wherein the work order approval model is obtained by training an initial model based on the feature data of a sample work order and the approval result of the sample work order.
9. An electronic device, characterized in that: The method comprises a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor implements the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.