CN112306687A - Resource allocation method and device based on knowledge graph, computer equipment and medium - Google Patents

Resource allocation method and device based on knowledge graph, computer equipment and medium Download PDF

Info

Publication number
CN112306687A
CN112306687A CN202011192613.1A CN202011192613A CN112306687A CN 112306687 A CN112306687 A CN 112306687A CN 202011192613 A CN202011192613 A CN 202011192613A CN 112306687 A CN112306687 A CN 112306687A
Authority
CN
China
Prior art keywords
resource
node
authority
graph
vector
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011192613.1A
Other languages
Chinese (zh)
Inventor
李圣垚
郑毅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Pingan Zhihui Enterprise Information Management Co.,Ltd.
Original Assignee
Ping An Digital Information Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Digital Information Technology Shenzhen Co Ltd filed Critical Ping An Digital Information Technology Shenzhen Co Ltd
Priority to CN202011192613.1A priority Critical patent/CN112306687A/en
Publication of CN112306687A publication Critical patent/CN112306687A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • G06F40/216Parsing using statistical methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/284Lexical analysis, e.g. tokenisation or collocates

Abstract

The embodiment of the application belongs to the field of resource allocation, is applied to the field of intelligent government affairs and intelligent enterprises, and relates to a resource allocation method based on a knowledge graph, which comprises the steps of obtaining first resource data and second resource data of a user; vectorizing the first resource data and the second resource data respectively to obtain a first resource vector and a second resource vector; establishing a vector node graph according to the first incidence relation by taking the first resource vector and the second resource vector as first graph nodes; inquiring a node path from a preset authority graph according to the vector node graph to obtain a node graph to be determined; and acquiring a first authority node having a second association relation with a second map node in the node map to be determined from the authority nodes, and taking the first authority node as an authority resource allocation result and an authority resource allocation result. By adopting the method, the accuracy and the efficiency of authority distribution are improved.

Description

Resource allocation method and device based on knowledge graph, computer equipment and medium
Technical Field
The present application relates to the field of resource allocation, and in particular, to a method and an apparatus for resource allocation based on a knowledge graph, a computer device, and a storage medium.
Background
Some software systems have a great variety of functions, different functions have dependency relations, and different types of users have operation authorities of different functions in the software systems; just because the permissions of the functions are more and the user information is more complex and changeable, the new user cannot accurately obtain the permission suitable for the own function, so that the function permission which can not be accurately distributed/matched for the new user or the user with changed identity can not be obtained, and the user does not know which permissions to apply for the system.
Therefore, a scheme capable of generating an operation permission for matching a software system function for a user is needed to solve the technical problems of inaccurate permission matching and low efficiency for the user in the prior art.
Disclosure of Invention
Based on this, in order to solve the above technical problems, the present application provides a resource allocation method, device, computer device and storage medium based on a knowledge graph, so as to solve the technical problems in the prior art that the permission matching for a user is inaccurate and the efficiency is low.
A method of resource allocation based on a knowledge-graph, the method comprising:
acquiring first resource data and second resource data of a user, wherein the first resource data and the second resource data have a first association relation;
vectorizing the first resource data and the second resource data respectively to obtain a first resource vector and a second resource vector;
establishing a vector node graph according to the first incidence relation by taking the first resource vector and the second resource vector as first graph nodes;
inquiring a node path from a preset authority graph according to the vector node graph to obtain a node graph to be determined, wherein the preset authority graph comprises second graph nodes and authority nodes having a second incidence relation with the second graph nodes;
and acquiring a first authority node having a second incidence relation with a second map node in the node map to be determined from the authority nodes as an authority resource allocation result.
A knowledge-graph based resource allocation apparatus, the apparatus comprising:
the data module is used for acquiring first resource data and second resource data of a user, wherein the first resource data and the second resource data have a first incidence relation;
the vector module is used for respectively carrying out vectorization processing on the first resource data and the second resource data to obtain a first resource vector and a second resource vector;
the building module is used for building a vector node map according to the first incidence relation by taking the first resource vector and the second resource vector as first map nodes;
the query module is used for querying a node path from a preset authority graph according to the vector node graph to obtain a node graph to be determined, wherein the preset authority graph comprises second graph nodes and authority nodes having a second incidence relation with the second graph nodes;
and the allocation module is used for acquiring a first authority node which has a second incidence relation with a second map node in the node map to be determined from the authority nodes, and taking the first authority node as an authority resource allocation result.
A computer device comprising a memory and a processor, and computer readable instructions stored in the memory and executable on the processor, the processor implementing the steps of the above knowledge-graph based resource allocation method when executing the computer readable instructions.
A computer readable storage medium storing computer readable instructions which, when executed by a processor, implement the steps of the above-described knowledge-graph based resource allocation method.
According to the resource allocation method, device, computer equipment and storage medium based on the knowledge graph, through the graph retrieval technology and the preset authority knowledge graph, only user data of a user needs to be acquired: the first resource data and the second resource data can comprehensively allocate the required permission resources to the users, so that more suitable permission resources are indirectly recommended to one user, the permission allocation accuracy is improved, the permission resource allocation efficiency is improved, and the permission resources are allocated more comprehensively and intelligently.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive labor.
FIG. 1 is a schematic diagram of an application environment of a knowledge-graph-based resource allocation method;
FIG. 2 is a schematic flow chart of a method for knowledge-graph based resource allocation;
FIG. 3 is a schematic view of a vector node graph;
FIG. 4 is a functional rights knowledge graph;
FIG. 5 is a schematic diagram of a post-project knowledge graph;
FIG. 6 is a diagram illustrating a default permission map;
FIG. 7 is a schematic diagram of a knowledge-graph based resource allocation apparatus;
FIG. 8 is a diagram of a computer device in one embodiment.
Detailed Description
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "including" and "having," and any variations thereof, in the description and claims of this application and the description of the above figures are intended to cover non-exclusive inclusions. The terms "first," "second," and the like in the description and claims of this application or in the above-described drawings are used for distinguishing between different objects and not for describing a particular order.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The resource allocation method based on the knowledge graph provided by the embodiment of the invention can be applied to the application environment shown in fig. 1. The application environment may include a terminal 102, a network for providing a communication link medium between the terminal 102 and the server 104, and a server 104, wherein the network may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
A user may use the terminal 102 to interact with the server 104 over a network to receive or send messages, etc. The terminal 102 may have installed thereon various communication client applications, such as a web browser application, a shopping application, a search application, an instant messaging tool, a mailbox client, social platform software, and the like.
The terminal 102 may be various electronic devices having a display screen and supporting web browsing, including but not limited to a smart phone, a tablet computer, an e-book reader, an MP3 player (Moving Picture Experts Group Audio Layer III, mpeg compression standard Audio Layer 3), an MP4 player (Moving Picture Experts Group Audio Layer IV, mpeg compression standard Audio Layer 4), a laptop portable computer, a desktop computer, and the like.
The server 104 may be a server that provides various services, such as a background server that provides support for pages displayed on the terminal 102.
It should be noted that the resource allocation method based on the knowledge graph provided in the embodiments of the present application is generally executed by the server/terminal, and accordingly, the resource allocation apparatus based on the knowledge graph is generally disposed in the server/terminal device.
The application is operational with numerous general purpose or special purpose computing system environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet-type devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like. The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
This application can be applied to in wisdom government affairs and the wisdom enterprise field to promote the construction in wisdom city.
It should be understood that the number of terminals, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Wherein, the terminal 102 communicates with the server 104 through the network. The server 104 acquires the first resource data and the second resource data of the user from the terminal 102, vectorizes the first resource data and the second resource data to serve as first map nodes, establishes a vector node map, then presets a node path in the authority map to obtain a node map to be determined, and acquires authority nodes having a second association relation with second map nodes in the node map to be determined to serve as authority resource distribution nodes. The terminal 102 and the server 104 are connected through a network, the network may be a wired network or a wireless network, the terminal 102 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and the server 104 may be implemented by an independent server or a server cluster formed by a plurality of servers.
In one embodiment, as shown in fig. 2, a resource allocation method based on knowledge graph is provided, which is described by taking the method as an example applied to the server in fig. 1, and includes the following steps:
step 202, first resource data and second resource data of a user are obtained, wherein the first resource data and the second resource data have a first association relation.
In some embodiments, the application is applied to a user right resource allocation scenario of a software system with multiple functions, wherein the software system comprises multiple function modules, each function module comprises multiple sub-functions, each sub-function exists independently, and each sub-function also has a sub-function having a dependency relationship with other sub-functions; for example: the realization of the data platform function needs to be based on the realization of the report display function, if a user only has the operation authority of the data platform function but does not have the operation/acquisition authority of the report display function, when the data platform function is used, the situations of operation failure, data loss or limited access may occur.
The user has user data, and the user data includes but is not limited to first resource data and second resource data; the first resource data and the second resource data have a first association relationship, and the first association relationship is that the second resource data is a subordinate node resource of the first resource data, or a resource with a certain correlation.
For example: the project tasks of the enterprise employees are subordinate nodes of the posts where the enterprise employees are located, and professional projects of college university have certain relevance to the professions where the university is located. These user data are stored in a user database and updated periodically or aperiodically.
Further, in some embodiments, the application scenario of the technical scheme of the application may be a government platform, and whether a certain user right is given to the user needs to be judged according to professional information and technical experience information of the user.
Step 204, performing vectorization processing on the first resource data and the second resource data respectively to obtain a first resource vector and a second resource vector.
Because descriptions of the same post and the same project task in different industries and companies are different, standardized processing needs to be performed on the first resource data and the second resource data to obtain standardized descriptions of the same post and the same project task, so that subsequent processing and analysis on the first resource data and the second resource data are facilitated.
Further, word segmentation processing is respectively carried out on the first resource data and the second resource data to obtain a first analysis sequence and a second analysis sequence, then a first keyword of the first resource data is extracted from the first analysis sequence, a second keyword of the second resource data is extracted from the second analysis sequence, and vectorization processing is respectively carried out on the first keyword and the second keyword to obtain a first resource vector and a second resource vector.
Specifically, the first resource data and the second resource data may be subjected to word segmentation processing by a dictionary-based algorithm, and then keywords may be extracted by one or more of a TF-IDF algorithm (a numerical statistical method for reflecting the importance of a word to a certain document in anticipation) or a TextRank algorithm (a link analysis algorithm).
The first resource data may be XX software development engineers of a first research and development group of XX research and development departments of XX headquarters, or XX software development engineers of a group a of XX research and development departments of XX headquarters; the second resource data may be platform interface side development, platform development and maintenance, web application system code development and implementation, or writing of web application system code annotations, and so on.
Then the first keyword extracted may be:
[ XX software development, Engineers ]
[ XX software development, Engineers ]
The second keyword may be:
[ platform, interface end, development ]
[ platform, development, maintenance ]
[ Web, application System, development, implementation ]
And then expressing the obtained keyword text into a real number vector which can be recognized by a computer. Specifically, each keyword can be mapped from a high dimension to a low-dimension dense vector according to the context by a matrix-based distribution representation, and the dimension of the vector needs to be specified. In the formed vector space, the meaning of each keyword can be represented by surrounding words, and the method has the advantage of reducing the dimensionality of the word vector by considering the similarity relation existing between the words.
The keywords are extracted and vectorized, so that the keywords can be used for identifying the resource data, and the subsequent processing of the resource data is more standardized.
Further, in order to enable complex and variable resource data to be more serialized, reduce the data processing amount of a computer and improve the authority resource allocation heart rate, in some embodiments, the first keyword and the second keyword can be serialized based on a preset entity table, and then the serialized first keyword and the serialized second keyword are subjected to vectorization to obtain a first resource vector and a second resource vector respectively.
In particular, because of the variability of the post and project descriptions, different first resource vectors represent one post, or different second resource vectors represent the same project task, but their performances are different, so that there is a different vectorization representation, which increases the difficulty of subsequent processing. In order to solve the technical problem, the keywords can be serialized according to a preset entity table, so that a more standardized first resource vector and a more standardized second resource vector are obtained.
For example:
the preset entity table can be post and project task data in a json format, and comprises mapping relations between various keywords and the same standard keyword: a software development engineer, a software development engineer and the software development engineer are mapped; platform web development, platform interface end development and platform development have a mapping relation.
By the aid of the preset entity table, a plurality of keywords which are expressed as the same post or project task can be mapped into a standard description text, accuracy of right resource allocation is improved, and data processing capacity of the second server is reduced.
And step 206, establishing a vector node graph according to the first incidence relation by taking the first resource vector and the second resource vector as first graph nodes.
And establishing a vector node map for the user by taking the first resource vector and the second resource vector as first map nodes. Because the functional authority required by the user is based on the user data, the vector node graph of the user needs to be established, and generally, the second resource data of the user and the first resource data of the user have a corresponding incidence relation, and the incidence relation determines the type of the functional authority of the software system required by the user. Wherein, the vector node map is shown in fig. 3:
where D2 is a post node and D21, D22 are project nodes corresponding to the post node D2, then a user's post-project query graph (vector node graph) can be represented by fig. 3, where triangles represent post nodes and rectangles connected to triangles represent project task nodes under post nodes.
And 208, inquiring a node path from a preset authority graph according to the vector node graph to obtain a node graph to be determined, wherein the preset authority graph comprises second graph nodes and authority nodes having a second incidence relation with the second graph nodes.
And matching each first map node and the first incidence relation in the vector node map with a second map node and a second incidence relation in the preset authority map.
Splitting the vector node map to obtain at least one first query path; for example: the generated vector node graph is shown in fig. 3, and fig. 3 may be split into two first query paths: D2-D21, D2-D22; then acquiring a first path consistent with the first query path from a preset authority graph according to the first incidence relation, specifically determining a first resource vector in a first graph node according to the first incidence relation, then determining a first historical resource vector in a second graph node meeting the requirement of cosine similarity of the first resource vector by calculating cosine similarity between vectors, and then determining a node path according to the first incidence relation of the second graph node; and then taking all first paths where the second map nodes with the similarity degrees larger than the preset value are located as node paths to obtain the node map to be determined, specifically, calculating the cosine similarity between a second resource vector in the first association relationship in the first query path and a second historical resource vector in the node path, and taking the node paths with the cosine similarity degrees meeting the requirements as queried paths. Wherein, the similarity can be 0.8 and obtained according to historical experience.
At this time, the number of the obtained node paths may be more than one, and the node paths formed by map nodes corresponding to some similar posts and similar items are within the node map to be determined, so that more suitable permission resources are indirectly recommended for a user, and the distribution of the permission resources is more comprehensive and intelligent.
The preset authority graph is a knowledge graph which is generated according to historical user data and historical authority data and takes post-project-authority as nodes, wherein the knowledge graph comprises second graph nodes and authority nodes having second association relations with the second graph nodes, and in addition, first association relations also exist between the second graph nodes and the second graph nodes. In some embodiments, the first association relationship in this application refers to that when the user information of the user includes a certain a1 item, a11 authority node and a12 authority node are required to be allocated to the user information, and the second association relationship refers to a second graph node having a dependency relationship with the authority node. For example: the product analysis project of the product manager needs to depend on the report counting function of the software system.
Further, in some embodiments, before querying the node path from the preset authority graph, the preset authority graph needs to be generated:
generating a function authority map according to the dependency relationship among the subfunctions of the software system; acquiring historical vector data, wherein the historical user data comprises a first resource vector, a second resource vector and a first incidence relation between the first resource vector and the second resource vector; establishing a project task graph according to the first incidence relation by taking the first historical resource vector and the second historical resource vector as second graph nodes; acquiring a second incidence relation between each subfunction and a second map node; and establishing a preset authority map according to a second incidence relation based on the function authority map and the project task map.
Specifically, each subfunction in a software system or a software platform is regarded as a function node, the function nodes with dependency relationship are connected to finally obtain a function authority knowledge graph, and generally, each function node has direct or indirect dependency relationship, and the application explains the technical scheme to be disclosed by a specific example, for example:
a company's software system comprising a plurality of sub-functions: a1, a2, A3, B1, B2, B3, B4, C1, C2; the dependency relationship for the realization of the sub-functions is as follows: the complete realization of the sub-function A2 needs to be based on A1, A1 needs to be based on C2, C1 can be independently implemented based on B2 and B2, B1 is implemented based on B3, and B4 can be independently implemented. And then acquiring the dependency relationship among the sub-functions to obtain a function authority knowledge graph, as shown in fig. 4, wherein arrows point to represent the dependency relationship.
In some embodiments, the user data includes a first resource data and a second resource data, where the first resource data and the second resource data have an association relationship, and the association relationship is obtained by the second resource data based on the first resource data, for example: the first resource data is the description of the user's station responsibility, and the second resource data is the description of the user's project task at the corresponding station; the first resource data and the second resource data of the user are stored in a user database. Further, the server side can update the first resource data and the second resource data of the user regularly or irregularly.
Based on the above conditions, since the functional authority required by the user is based on the user data, it is necessary to establish the position-project knowledge map of the user, and in general, the second resource data of the user has a corresponding relationship with the first resource data of the user, and this relationship determines the type of the functional authority of the software system required by the user. Wherein the post-project knowledge graph is shown in fig. 5.
In fig. 5, a triangle represents a post node, a rectangle connected with the triangle represents a project task node under the post node, and a connecting line represents an association relationship between the post node and the project task node. In particular, it may happen that the same project task exists in different positions, such as the case where developers and testers need to test products, and the like. In some embodiments, the present proposal builds a post-project knowledge graph, such as that of FIG. 2, from existing post-project data. D1, D2, D3 represent different positions, D11-D33 and W0 are project tasks in the corresponding positions.
Then, a permission-task knowledge graph, namely a preset permission graph, is established according to the knowledge graphs in fig. 4 and fig. 5 and the existing permission data, as shown in fig. 6. The real line segments represent a first association relation between second graph nodes, the arrows represent dependency relations between authority nodes corresponding to different sub-functions, and the dotted lines represent a second association relation between the second graph nodes corresponding to the project tasks and the authority nodes of the sub-functions. The different lines are only used for clearly representing the relationship between the nodes in the authority-task knowledge graph and do not represent the style of the actually generated knowledge graph. As can be seen from fig. 6, a user having a certain sub-item may need a plurality of functional rights of the sub-function, some may need only one functional right, and some may not need any functional right, which are defined in advance according to user data.
Step 210, obtaining a first authority node having a second association relation with a second graph node in the graph of the nodes to be determined from the authority nodes, as an authority resource allocation result.
The node graph to be determined obtained according to the vector node graph does not include the authority node, but a first authority node having a second incidence relation with a second graph node in the node graph to be determined exists, and the authority of which sub-functions are needed by the user can be accurately obtained only by obtaining the authority nodes. By the node path matching mode, the authority resources can be accurately distributed to the users in massive authority resources, and the authority resource distribution efficiency and accuracy are greatly improved.
Further, in some embodiments, after the first authority node is obtained, a second authority node having a dependency relationship with the first authority node needs to be obtained, and the second authority node is updated to the authority resource allocation result, where the dependency relationship is that the function corresponding to the first authority node needs to be implemented based on the function corresponding to the second authority node.
The dependency relationship means that the realization of the sub-function corresponding to the first authority node needs to be realized based on the sub-function corresponding to the second authority node. By the technical scheme, the authority resources can be comprehensively allocated to the user, and the technical problem that although a certain authority resource is allocated, the operation corresponding to the authority resource cannot be normally executed is solved. Taking the vector node graph of fig. 3 as an example, the authority resources obtained by final matching are: a1, a2, and C2.
In the resource allocation method based on the knowledge graph, through the graph retrieval technology and the preset authority knowledge graph, only user data of a user needs to be acquired: the first resource data and the second resource data can comprehensively allocate the required permission resources to the users, so that more suitable permission resources are indirectly recommended to one user, the permission allocation accuracy is improved, the permission resource allocation efficiency is improved, and the permission resources are allocated more comprehensively and intelligently.
It should be understood that, although the steps in the flowchart of fig. 2 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in fig. 2 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 7, a resource allocation apparatus based on a knowledge graph is provided, and the resource allocation apparatus based on a knowledge graph corresponds to the resource allocation method based on a knowledge graph in the above embodiment one to one. The resource allocation device based on the knowledge graph comprises:
a data module 702, configured to obtain first resource data and second resource data of a user, where the first resource data and the second resource data have a first association relationship;
a vector module 704, configured to perform vectorization processing on the first resource data and the second resource data, respectively, to obtain a first resource vector and a second resource vector;
a building module 706, configured to use the first resource vector and the second resource vector as first graph nodes, and build a vector node graph according to the first association relationship;
the query module 708 is configured to query a node path from a preset authority graph according to the vector node graph to obtain a node graph to be determined, where the preset authority graph includes a second graph node and an authority node having a second association relationship with the second graph node;
an allocating module 710, configured to obtain, from the authority nodes, a first authority node having a second association relationship with a second graph node in the graph of the node to be determined as an authority resource allocation result.
Further, the vector module 704 includes:
the word segmentation sub-module is used for performing word segmentation processing on the first resource data and the second resource data respectively to obtain a first word segmentation sequence and a second word segmentation sequence;
the extraction submodule is used for extracting a first keyword of the first resource data from the first word segmentation sequence and extracting a second keyword of the second resource data from the second word segmentation sequence;
and the vector submodule is used for respectively carrying out vectorization processing on the first keyword and the second keyword to obtain a first resource vector and a second resource vector.
Further, before the vector submodule, the method further comprises:
and the serialization submodule is used for carrying out serialization processing on the first keyword and the second keyword based on a preset entity table to obtain the serialized first keyword and the serialized second keyword.
Further, prior to the query module 708, the method further includes:
the authority map submodule is used for generating a function authority map according to the dependency relationship among all subfunctions;
the historical data submodule is used for acquiring historical vector data, wherein the historical user data comprises a first historical resource vector, a second historical resource vector and a first incidence relation between the first historical resource vector and the second historical resource vector;
the project map sub-module is used for establishing a project task map according to the first incidence relation by taking the first historical resource vector and the second historical resource vector as second map nodes;
the association submodule is used for acquiring a second association relation between each subfunction and a second map node;
and the authority map submodule is used for establishing and obtaining a preset authority map according to the second incidence relation based on the function authority map and the project task map.
Further, after the allocating module 710, the method further includes:
the extension module is used for acquiring a second authority node which has a dependency relationship with the first authority node;
and the distribution updating module is used for updating the second authority node into the authority resource distribution result.
Further, the query module 708 includes:
the splitting sub-module is used for splitting the vector node map to obtain at least one first query path;
the path query submodule is used for acquiring a first path consistent with the first query path from the preset authority map according to the first incidence relation;
the similarity calculation operator module is used for calculating the similarity between the second graph node in each first path and the first graph node in the corresponding first query path; and are
And the to-be-determined submodule is used for taking all first paths where the second map nodes with the similarity larger than the preset value are located as node paths to obtain the to-be-determined node map.
It is emphasized that, in order to further ensure the privacy and security of the user information, the first resource data of the user is obtained. The second resource data may also be stored in a node of a blockchain.
The resource allocation device based on the knowledge graph only needs to acquire user data of a user through a graph retrieval technology and a preset authority knowledge graph: the first resource data and the second resource data can comprehensively allocate the required authority resources to the users, so that more suitable authority resources are indirectly recommended to one user, and the allocation of the authority resources is more comprehensive and intelligent.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 8. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer readable instructions, and a database. The internal memory provides an environment for the operating system and execution of computer-readable instructions in the non-volatile storage medium. The database of the computer device is used for storing user data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer readable instructions, when executed by a processor, implement a method for knowledge-graph based resource allocation. By means of the map retrieval technology and the preset authority knowledge map, only user data of a user need to be acquired: the first resource data and the second resource data can comprehensively allocate the required authority resources to the users, so that more suitable authority resources are indirectly recommended to one user, and the allocation of the authority resources is more comprehensive and intelligent.
As will be understood by those skilled in the art, the computer device is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction, and the hardware includes, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC), a Programmable Gate Array (FPGA), a Digital Signal Processor (DSP), an embedded device, and the like.
In one embodiment, a computer readable storage medium is provided, on which computer readable instructions are stored, and the computer readable instructions when executed by a processor implement the steps of the method for resource allocation based on a knowledge graph in the above embodiment, for example, the steps 202 to 210 shown in fig. 2, or the processor implements the functions of the modules/units of the apparatus for resource allocation based on a knowledge graph in the above embodiment, for example, the functions of the modules 702 to 710 shown in fig. 7.
By means of the map retrieval technology and the preset authority knowledge map, only user data of a user need to be acquired: the first resource data and the second resource data can comprehensively allocate the required authority resources to the users, so that more suitable authority resources are indirectly recommended to one user, and the allocation of the authority resources is more comprehensive and intelligent.
It will be understood by those of ordinary skill in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware associated with computer readable instructions, which can be stored in a non-volatile computer readable storage medium, and when executed, can include processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The block chain referred by the application is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for those skilled in the art, without departing from the spirit and scope of the present invention, several changes, modifications and equivalent substitutions of some technical features may be made, and these changes or substitutions do not make the essence of the same technical solution depart from the spirit and scope of the technical solution of the embodiments of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method for resource allocation based on knowledge graph, the method comprising:
acquiring first resource data and second resource data of a user, wherein the first resource data and the second resource data have a first association relation;
vectorizing the first resource data and the second resource data respectively to obtain a first resource vector and a second resource vector;
establishing a vector node graph according to the first incidence relation by taking the first resource vector and the second resource vector as first graph nodes;
inquiring a node path from a preset authority graph according to the vector node graph to obtain a node graph to be determined, wherein the preset authority graph comprises second graph nodes and authority nodes having a second incidence relation with the second graph nodes;
and acquiring a first authority node having a second incidence relation with a second map node in the node map to be determined from the authority nodes as an authority resource allocation result.
2. The method of claim 1, wherein the vectorizing the first resource data and the second resource data to obtain a first resource vector and a second resource vector comprises:
performing word segmentation processing on the first resource data and the second resource data respectively to obtain a first word segmentation sequence and a second word segmentation sequence;
extracting a first keyword of the first resource data from the first word segmentation sequence, and extracting a second keyword of the second resource data from the second word segmentation sequence;
and vectorizing the first keyword and the second keyword respectively to obtain the first resource vector and the second resource vector.
3. The method according to claim 1, wherein before the vectorizing the first keyword and the second keyword to obtain the first resource vector and the second resource vector, respectively, the method further comprises:
and carrying out serialization processing on the first keyword and the second keyword based on a preset entity table to obtain the serialized first keyword and the serialized second keyword.
4. The method of claim 1, further comprising, prior to said querying node paths from a preset authority graph according to the vector node graph:
generating a function authority map according to the dependency relationship among the subfunctions;
acquiring historical vector data, wherein the historical user data comprises a first historical resource vector, a second historical resource vector and a first incidence relation between the first historical resource vector and the second historical resource vector;
establishing a project task graph according to the first incidence relation by taking the first historical resource vector and the second historical resource vector as second graph nodes;
acquiring the second incidence relation between each sub-function and the second graph node;
and establishing and obtaining the preset authority map according to the second incidence relation based on the function authority map and the project task map.
5. The method according to claim 1, wherein after obtaining, from the authority nodes, a first authority node having a second association relationship with a second graph node in the node graph to be determined as an authority resource allocation result, further comprising:
acquiring a second authority node which has a dependency relationship with the first authority node;
and updating the second authority node into the authority resource allocation result.
6. The method according to claim 1, wherein the querying node paths from a preset authority graph according to the vector node graph to obtain a node graph to be determined comprises:
splitting the vector node map to obtain at least one first query path;
acquiring a first path consistent with the first query path from the preset authority map according to the first incidence relation;
calculating the similarity between a second graph node in each first path and a corresponding first graph node in the first query path; and are
And taking all first paths where the second map nodes with the similarity larger than the preset value are located as the node paths to obtain the node map to be determined.
7. The method of claim 1, wherein the first resource data and the second resource data of the user are stored in a block chain.
8. A knowledge-graph-based resource allocation apparatus, comprising:
the data module is used for acquiring first resource data and second resource data of a user, wherein the first resource data and the second resource data have a first incidence relation;
the vector module is used for respectively carrying out vectorization processing on the first resource data and the second resource data to obtain a first resource vector and a second resource vector;
the building module is used for building a vector node map according to the first incidence relation by taking the first resource vector and the second resource vector as first map nodes;
the query module is used for querying a node path from a preset authority graph according to the vector node graph to obtain a node graph to be determined, wherein the preset authority graph comprises second graph nodes and authority nodes having a second incidence relation with the second graph nodes;
and the allocation module is used for acquiring a first authority node which has a second incidence relation with a second map node in the node map to be determined from the authority nodes, and taking the first authority node as an authority resource allocation result.
9. A computer device comprising a memory and a processor, the memory storing computer readable instructions, wherein the processor when executing the computer readable instructions implements the steps of the method of any one of claims 1 to 7.
10. A computer readable storage medium having computer readable instructions stored thereon, which when executed by a processor implement the steps of the method of any one of claims 1 to 7.
CN202011192613.1A 2020-10-30 2020-10-30 Resource allocation method and device based on knowledge graph, computer equipment and medium Pending CN112306687A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011192613.1A CN112306687A (en) 2020-10-30 2020-10-30 Resource allocation method and device based on knowledge graph, computer equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011192613.1A CN112306687A (en) 2020-10-30 2020-10-30 Resource allocation method and device based on knowledge graph, computer equipment and medium

Publications (1)

Publication Number Publication Date
CN112306687A true CN112306687A (en) 2021-02-02

Family

ID=74332902

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011192613.1A Pending CN112306687A (en) 2020-10-30 2020-10-30 Resource allocation method and device based on knowledge graph, computer equipment and medium

Country Status (1)

Country Link
CN (1) CN112306687A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112711753A (en) * 2021-02-23 2021-04-27 邹威 Information authentication method based on block chain financial service and block chain service system
CN113783833A (en) * 2021-07-27 2021-12-10 齐鑫 Method and device for constructing computer security knowledge graph
CN115208754A (en) * 2022-06-28 2022-10-18 深信服科技股份有限公司 Configuration issuing method and device, computer equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109284342A (en) * 2018-11-22 2019-01-29 北京百度网讯科技有限公司 Method and apparatus for output information
CN110968894A (en) * 2019-11-28 2020-04-07 西安理工大学 Fine-grained access control scheme for game business data
CN111209400A (en) * 2020-01-03 2020-05-29 北京明略软件系统有限公司 Data analysis method and device
CN111274332A (en) * 2020-01-19 2020-06-12 中国科学院计算技术研究所 Intelligent patent retrieval method and system based on knowledge graph
WO2020143326A1 (en) * 2019-01-11 2020-07-16 平安科技(深圳)有限公司 Knowledge data storage method, device, computer apparatus, and storage medium
CN114065254A (en) * 2021-11-23 2022-02-18 北京字跳网络技术有限公司 Data processing method, device, electronic equipment, medium and product

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109284342A (en) * 2018-11-22 2019-01-29 北京百度网讯科技有限公司 Method and apparatus for output information
WO2020143326A1 (en) * 2019-01-11 2020-07-16 平安科技(深圳)有限公司 Knowledge data storage method, device, computer apparatus, and storage medium
CN110968894A (en) * 2019-11-28 2020-04-07 西安理工大学 Fine-grained access control scheme for game business data
CN111209400A (en) * 2020-01-03 2020-05-29 北京明略软件系统有限公司 Data analysis method and device
CN111274332A (en) * 2020-01-19 2020-06-12 中国科学院计算技术研究所 Intelligent patent retrieval method and system based on knowledge graph
CN114065254A (en) * 2021-11-23 2022-02-18 北京字跳网络技术有限公司 Data processing method, device, electronic equipment, medium and product

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112711753A (en) * 2021-02-23 2021-04-27 邹威 Information authentication method based on block chain financial service and block chain service system
CN113783833A (en) * 2021-07-27 2021-12-10 齐鑫 Method and device for constructing computer security knowledge graph
CN113783833B (en) * 2021-07-27 2023-09-01 齐鑫 Method and device for constructing computer security knowledge graph
CN115208754A (en) * 2022-06-28 2022-10-18 深信服科技股份有限公司 Configuration issuing method and device, computer equipment and storage medium
CN115208754B (en) * 2022-06-28 2024-02-23 深信服科技股份有限公司 Configuration issuing method, device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN112306687A (en) Resource allocation method and device based on knowledge graph, computer equipment and medium
CN112365202B (en) Method for screening evaluation factors of multi-target object and related equipment thereof
CN111310427A (en) Service data configuration processing method and device, computer equipment and storage medium
CN111046237B (en) User behavior data processing method and device, electronic equipment and readable medium
CN112286997B (en) Salary data query method based on distributed deployment and related equipment
CN112182004B (en) Method, device, computer equipment and storage medium for checking data in real time
CN112328486A (en) Interface automation test method and device, computer equipment and storage medium
CN112288163A (en) Target factor prediction method of target object and related equipment
CN113377372A (en) Business rule analysis method and device, computer equipment and storage medium
CN113626223A (en) Interface calling method and device
CN111476595A (en) Product pushing method and device, computer equipment and storage medium
CN114327374A (en) Business process generation method and device and computer equipment
CN111797297B (en) Page data processing method and device, computer equipment and storage medium
CN112860662A (en) Data blood relationship establishing method and device, computer equipment and storage medium
CN113254445A (en) Real-time data storage method and device, computer equipment and storage medium
CN112416934A (en) hive table incremental data synchronization method and device, computer equipment and storage medium
CN116956326A (en) Authority data processing method and device, computer equipment and storage medium
CN111552696A (en) Data processing method and device based on big data, computer equipment and medium
CN113886332B (en) Large file difference comparison method and device, computer equipment and storage medium
CN115471582A (en) Map generation method and device, computer equipment and storage medium
CN115543428A (en) Simulated data generation method and device based on strategy template
CN115203672A (en) Information access control method and device, computer equipment and medium
CN112199350B (en) Function verification method and device based on data screening, computer equipment and medium
CN114545328B (en) Tracking method and system for optical cable inspection equipment, computer equipment and storage medium
CN113112007B (en) Method, device and equipment for selecting sequence length in neural network and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20210204

Address after: 518000 room 64, 3 / F, building 364B, Jingui building, 68 Puti Road, Fubao community, Fubao street, Futian District, Shenzhen City, Guangdong Province

Applicant after: Shenzhen Pingan Zhihui Enterprise Information Management Co.,Ltd.

Address before: No.1411-14158, main tower of shipping center, No.59 Linhai Avenue, Nanshan street, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong 518000

Applicant before: Ping An digital information technology (Shenzhen) Co.,Ltd.