CN110489986B - Response method and system of graph data function and electronic equipment - Google Patents

Response method and system of graph data function and electronic equipment Download PDF

Info

Publication number
CN110489986B
CN110489986B CN201910780762.0A CN201910780762A CN110489986B CN 110489986 B CN110489986 B CN 110489986B CN 201910780762 A CN201910780762 A CN 201910780762A CN 110489986 B CN110489986 B CN 110489986B
Authority
CN
China
Prior art keywords
graph data
function
data function
graph
server
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.)
Active
Application number
CN201910780762.0A
Other languages
Chinese (zh)
Other versions
CN110489986A (en
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.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network 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 Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN201910780762.0A priority Critical patent/CN110489986B/en
Publication of CN110489986A publication Critical patent/CN110489986A/en
Application granted granted Critical
Publication of CN110489986B publication Critical patent/CN110489986B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6227Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database where protection concerns the structure of data, e.g. records, types, queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Bioethics (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Computer And Data Communications (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application provides a response method, a response system and electronic equipment of a graph data function, wherein the method is applied to graph data service equipment which is respectively connected with OpenAPI client equipment and the graph data function service equipment, and the method comprises the following steps: receiving a graph data function request sent by OpenAPI client equipment; the graph data function request carries a secret key and a graph data function service address; authenticating the graph data function request based on the secret key; after the authentication is successful, determining a server corresponding to the graph data function service address as a target server, and triggering the target server to respond to the graph data function request to obtain graph data function response information corresponding to the graph data function request; and returning the graph data function response information to the OpenAPI client device. The method and the device can reduce development cost and improve development efficiency on the basis of realizing various diagram data functions related in the whole flow of diagram data storage, calculation and application.

Description

Response method and system of graph data function and electronic equipment
Technical Field
The present application relates to the field of graph data technologies, and in particular, to a method and a system for responding to a graph data function, and an electronic device.
Background
The graph data is data in a non-European space, has the characteristics of heterogeneous multi-attribute and can provide a special solution in the aspects of storage, calculation, application and the like. The prior art mainly carries out research and development related to graph data from two aspects: 1) graph storage and graph data reading and writing, wherein a graph data storage environment is provided, and reading, writing and other operations are performed, and a graph algorithm training environment is not provided; 2) the graph algorithm research mainly comprises the related researches of deep learning of a graph, graph embedding and the like.
Because the daily updating of the graph data is limited by the application scene, the updating is generally only allowed to be carried out in the graph storage environment, the automatic development process is not met, and the problems of data safety and the like are easily caused. For the deployment and use of the graph algorithm model, a user needs to acquire the training result file first and then deploy the training result file on other servers, so that the cost of repeated development is increased, and the development efficiency is reduced.
Disclosure of Invention
The application aims to provide a response method and a response system for a graph data function and electronic equipment, which can improve data security, reduce development cost and improve development efficiency on the basis of realizing various graph data functions related in the whole processes of graph data storage, calculation and application.
In a first aspect, a method for responding to a graph data function provided in an embodiment of the present application is applied to a graph data service device, where the graph data service device is respectively connected to an OpenAPI client device and a graph data function service device, the graph data function service device includes at least one server for implementing a graph data function, and the method includes: receiving a graph data function request sent by OpenAPI client equipment; wherein, the graph data function request carries a secret key and a graph data function service address; authenticating the graph data function request based on the secret key; after the authentication is successful, determining a server corresponding to the graph data function service address as a target server, and triggering the target server to respond to the graph data function request to obtain graph data function response information corresponding to the graph data function request; and returning the graph data function response information to the OpenAPI client device.
In a preferred embodiment of the present application, the step of authenticating the graph data function request based on the key includes: judging whether the secret key exists in a preset database or not; if yes, the authentication is successful; and if the key does not exist, sending prompt information that the key does not exist to the OpenAPI client equipment.
In a preferred embodiment of the present application, the step of determining the server corresponding to the graph data function service address as the target server includes: analyzing the graph data function service address to obtain a function field and a function identifier corresponding to the graph data function request; and searching a server corresponding to the function field and the function identifier from a preset database, and taking the searched server as a target server.
In a preferred embodiment of the present application, the step of searching for the server corresponding to the function field and the function identifier from the preset database includes: if the function identifier corresponding to the graph data function request is the graph data identifier, searching a server corresponding to the function field and the function identifier from a server with the function type of the graph storage environment service function; and if the function identifier corresponding to the graph data function request is a graph training environment identifier or a model deployment identifier, searching a server corresponding to the function field and the function identifier from a server with the function type of a graph computing environment service function.
In a preferred embodiment of the present application, before the step of searching the server corresponding to the function field and the function identifier from the preset database, the method further includes: detecting whether the function represented by the function field is one of graph data query, data routine task, graph algorithm model deployment or graph algorithm model use; if so, judging whether a user initiating the graph data function request has graph data function operation authority or not according to the function identifier and the secret key; and if so, searching a server corresponding to the function field and the function identification from a preset database.
In a preferred embodiment of the present application, the step of determining whether the user initiating the graph data function request has the graph data function operation authority according to the function identifier and the key includes: reading first user information corresponding to the secret key from a preset database and reading second user information corresponding to the function identifier; judging whether the first user information is consistent with the second user information; and if so, determining that the user initiating the graph data function request has the graph data function operation authority.
In a preferred embodiment of the present application, the graph data function request further carries a function parameter; the step of triggering the target server to respond to the graph data function request comprises the following steps: sending the functional parameters in the graph data function request to a target server so that the target server determines graph data function response information corresponding to the graph data function request according to the functional parameters; and receiving graph data function response information returned by the target server.
In a preferred embodiment of the present application, the step of sending the function parameter in the graph data function request to the target server so that the target server determines the graph data function response information corresponding to the graph data function request according to the function parameter includes: checking whether the functional parameter is a query statement; if so, sending the query statement to the target server so that the target server searches a graph data query result corresponding to the query statement; and taking the graph data query result as graph data function response information corresponding to the graph data function request.
In a preferred embodiment of the present application, the step of sending the function parameter in the graph data function request to the target server so that the target server determines the graph data function response information corresponding to the graph data function request according to the function parameter includes: checking whether the function parameter includes only a function identifier; if so, sending the function identifier to the target server so that the target server searches for a version query result corresponding to the function identifier; and taking the version inquiry result as graph data function response information corresponding to the graph data function request.
In a preferred embodiment of the present invention, the server at least includes: the server with the function type of the graph storage environment service function and the server with the function type of the graph computing environment service function; if the function represented by the function field is a version query, a graph data query or a data routine task, the target server corresponding to the function field is a server with a graph storage environment service function; and if the function represented by the function field is deployed by the graph algorithm model or used by the graph algorithm model, the target server corresponding to the function field is a server of the graph computing environment service function.
In a second aspect, an embodiment of the present application further provides a method for responding to a graph data function, where the method is applied to an OpenAPI client device, the OpenAPI client device is connected to a graph data service device, the graph data service device is connected to a graph data function service device, the graph data function service device includes at least one server for implementing a graph data function, and the method includes: responding to a graph data function trigger operation aiming at the OpenAPI client; sending a graph data function request corresponding to graph data function triggering operation to graph data service equipment; wherein, the graph data function request carries a secret key and a graph data function service address; and receiving graph data function response information returned by the graph data service equipment, wherein the graph data function response information is obtained by determining a server corresponding to the graph data function service address as a target server and triggering the target server to respond to the graph data function request after the graph data service equipment successfully authenticates the graph data function request according to the secret key.
In a third aspect, an embodiment of the present application further provides a response system for a graph data function, where the system includes: the system comprises OpenAPI client equipment, graph data service equipment and graph data function service equipment; the graph data service equipment is respectively connected with the OpenAPI client equipment and the graph data function service equipment; the graph data function service device comprises at least one server for realizing graph data functions; the graph data service device is used for executing the steps of the response method of the graph data function in the first aspect; the OpenAPI client device is configured to perform the steps of the response method for graph data functions described in the second aspect.
In a fourth aspect, embodiments of the present application further provide an electronic device, which includes a processor and a memory, where the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the method in the first aspect or the second aspect.
In a fifth aspect, embodiments of the present application further provide a computer-readable storage medium storing computer-executable instructions that, when invoked and executed by a processor, cause the processor to implement the method of the first or second aspect.
The embodiment of the application brings the following beneficial effects:
the embodiment of the application provides a response method and a response system for a graph data function and electronic equipment, wherein the method is applied to graph data service equipment, the graph data service equipment is respectively connected with OpenAPI client equipment and the graph data function service equipment, and the graph data function service equipment comprises at least one server for realizing the graph data function. During specific implementation, firstly, a graph data function request sent by an OpenAPI client device is received, the graph data function request carries a secret key and a graph data function service address, the graph data function request is authenticated through the secret key, after the authentication is successful, a server corresponding to the graph data function service address is determined as a target server, then the target server is triggered to respond to the graph data function request, graph data function response information corresponding to the graph data function request is obtained, and finally the graph data function response information is returned to the OpenAPI client device. Through the interaction among the graph data service equipment, the OpenAPI client equipment and the graph data function service equipment, the development cost can be reduced and the development efficiency can be improved on the basis of realizing various graph data functions related in the whole processes of graph data storage, calculation and application.
Drawings
In order to more clearly illustrate the detailed description of the present application or the technical solutions in the prior art, the drawings needed to be used in the detailed description of the present application or the prior art description will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a response method of a graph data function according to an embodiment of the present application;
FIG. 2 is a flow chart of another response method for the graph data function provided by the embodiments of the present application;
FIG. 3 is a flow chart of another response method for the graph data function provided by the embodiments of the present application;
FIG. 4 is a flow chart of another response method for the graph data function provided by the embodiments of the present application;
fig. 5 is a schematic diagram illustrating downloading an OpenAPI client and a key in a response method of a graph data function according to an embodiment of the present application;
FIG. 6 is a schematic structural diagram of a response system for a graph data function according to an embodiment of the present application;
fig. 7 is a block diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions of the present application will be described clearly and completely with reference to the following embodiments, and it should be understood that the described embodiments are some, but not all embodiments of 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 application.
In consideration of the fact that functions such as updating of graph data and service deployment are lacked in the research and development process from storage of existing graph data to calculation to application, automation development is not easy to perform in the process of flow access, and operability is lacked in practical application. Based on this, embodiments of the present application provide a method, a system, and an electronic device for responding to a graph data function, which can improve data security, reduce development cost, and improve development efficiency on the basis of implementing multiple graph data functions involved in a whole process of graph data storage, calculation, and application.
For the convenience of understanding the present embodiment, a detailed description will be given to a response method of a graph data function disclosed in the embodiments of the present application.
Fig. 1 shows a flowchart of a response method of a graph data function provided in an embodiment of the present application, where the method is applied to a graph data service device, such as: a graph data service platform, a graph data server, an OpenAPI server, etc. The graph data service device is respectively connected to the OpenAPI client device and the graph data function service device, where the graph data function service device includes at least one server for implementing a graph data function, such as: a server providing a graph storage environment service function or a server providing a graph computing environment service function. The graph data function includes at least one of: version queries, graph data queries, data routine tasks, graph algorithm model deployment, or graph algorithm model usage. As can be seen from fig. 1, the response method of the graph data function specifically includes the following steps:
step S102, receiving a graph data function request sent by an OpenAPI client device; the graph data function request carries a key and a graph data function service address.
The OpenAPI client device may be a mobile terminal, a computer, or the like, and the OpenAPI client may be an APP installed on the mobile terminal or the computer, or may also be a code set, that is, a code compression package. The client package may have different forms in different programming languages, but the functions realized by the client package are the same and are all media used by the user to connect to the server.
In specific implementation, the graph data service device first receives a graph data function request sent by an OpenAPI client device, where the graph data function request may include any one of a version query request, a graph data query request, a data routine task request, a graph algorithm model deployment request, and a graph algorithm model use request. The graph data function request carries a key and a graph data function service address.
The key is a one-to-one unique and authenticable character string provided by the graph data service device to the user, and is loaded in a specified location of the OpenAPI client, so that the graph data service device authenticates the request. The graph data function service address is composed of a prefix and a suffix, the prefix is a normal server address such as www.163.com, and the suffix can be set differently according to different graph data functions, such as:
(1) data routine function/graph/load _ route;
(2) version query/graph id/versions;
(3) graph data query/graph id/gremline { };
(4) model deployment/graph/TrainID/deployment;
(5) model usage/graph/model id/infer;
the suffixes corresponding to the different graph data functions include function identifiers and function fields, or may also include corresponding function parameters, so that the graph data service device finds the corresponding target server through parsing to implement the corresponding function.
Step S104, the graph data function request is authenticated based on the secret key.
After the graph data service device receives the graph data function request, the graph data service device authenticates the request further according to the secret key carried in the graph data function request. In this embodiment, the key and the OpenAPI client may be automatically generated by a platform after a user logs in a graph data service platform. The user can download the secret key and the OpenAPI client from the platform, and then input the obtained secret key into a specific position of the OpenAPI client, so that the graph data service equipment performs authentication operation.
And step S106, after the authentication is successful, determining the server corresponding to the graph data function service address as a target server, and triggering the target server to respond to the graph data function request to obtain graph data function response information corresponding to the graph data function request.
Since the graph data function service device includes at least one server for implementing the graph data function, specifically, when responding to the graph data function request, which server is used to implement the corresponding function, a determination process of the target server is required, that is, the server corresponding to the graph data function service address is determined as the target server.
After the target server is determined, the graph data service device sends the function parameters carried in the graph data function request, or the function parameters analyzed from the graph data function service address, to the target server, and the target server further determines graph data function response information corresponding to the graph data function request according to the function parameters and sends the graph data function response information to the graph data service device.
Step S108, returns the graph data function response information to the OpenAPI client device.
And after receiving the graph data function response information sent by the target server, the graph data service equipment returns the graph data function response information to the OpenAPI client equipment.
The graph data function response method provided by the embodiment of the application is applied to graph data service equipment, the graph data service equipment is respectively connected with OpenAPI client equipment and the graph data function service equipment, the graph data function service equipment comprises at least one server for realizing a graph data function, when the graph data function request is specifically realized, a graph data function request sent by the OpenAPI client equipment is received, the graph data function request is authenticated through a secret key carried in the request, after the authentication is successful, a server corresponding to a graph data function service address carried in the request is determined as a target server, then the target server is triggered to respond to the graph data function request, graph data function response information corresponding to the graph data function request is obtained, and finally the graph data function response information is returned to the OpenAPI client equipment. According to the embodiment of the application, through interaction among the graph data service device, the OpenAPI client device and the graph data function service device, on the basis of realizing multiple graph data functions related in the whole processes of graph data storage, calculation and application, data security is improved, development cost is reduced, and development efficiency is improved.
In the present exemplary embodiment, the above step S104: the step of authenticating the graph data function request based on the key may further comprise the steps of: judging whether the secret key exists in a preset database or not; if so, the authentication is successful; and if the key does not exist, sending prompt information that the key does not exist to the OpenAPI client equipment.
Specifically, after a secret key is loaded in the user OpenAPI client, the secret key is transmitted to the graph data service device through the API interface, after the graph data service device obtains the secret key, it is first verified whether the secret key already exists through the database, if so, the authentication is successful, and then a subsequent function response is performed, otherwise, it is prompted that the user secret key does not exist.
In this embodiment, authentication is performed at the graph data server through the OpenAPI client and the distributed key, so that the operation permissions of different users can be effectively controlled.
In an optional implementation manner, the step of determining the server corresponding to the graph data function service address as the target server may include the following steps, as shown in fig. 2:
step S202, the graph data function service address is analyzed to obtain a function field and a function identifier corresponding to the graph data function request.
When determining the target server, firstly, the graph data function service address is analyzed, for example, the graph data function service address is: www.163.com/graph Id/versions, and obtaining the function field versions corresponding to the graph data function request and the function identification graph Id after analysis.
Step S204: and searching a server corresponding to the function field and the function identifier from a preset database, and taking the searched server as a target server.
The database stores each function field in advance, and the corresponding relation between each function identification and each server. And then searching the servers corresponding to the versions and the GraphId from the database to be used as target servers.
In a preferred embodiment, if the function identifier corresponding to the graph data function request is a graph data identifier, such as: and the graph ID is used for searching a server corresponding to the function field and the function identification from the server with the function type of the graph storage environment service function.
If the function identifier corresponding to the graph data function request is a graph training environment identifier, such as a TrainID or a model deployment identifier, such as a ModelID, a server corresponding to the function field and the function identifier is searched from a server with the function type being a graph computing environment service function.
Namely, the server at least comprises: the server with the function type of the graph storage environment service function and the server with the function type of the graph computing environment service function are adopted. Besides the above-mentioned selection of servers with different functions by function identifiers, different servers can be directly selected according to the functions indicated by the function fields, such as:
if the function represented by the function field is a version query, a graph data query or a data routine task, the target server corresponding to the function field is a server of a graph storage environment service function; and if the function represented by the functional field is deployed by the graph algorithm model or used by the graph algorithm model, the target server corresponding to the functional field is a server of the graph computing environment service function.
Through the two modes, the target server corresponding to the graph data function request can be obtained on the graph data service platform, the request is uniformly distributed and the response is received, and the error rate is reduced.
In this exemplary embodiment, for some graph data function requests, it may be possible to directly respond to the corresponding function of the graph data function request after successful authentication through the key, for example, when the graph data function request is a version query request; for some other graph data function requests, a function authority determination process is required, as shown in fig. 2:
in the above step S204: before the step of searching the server corresponding to the function field and the function identifier from the preset database, the method further comprises the following steps:
step S206, detecting whether the function represented by the function field is one of graph data query, data routine task, graph algorithm model deployment or graph algorithm model use.
If yes, step S208 is executed to determine whether the user initiating the graph data function request has the graph data function operation authority according to the function identifier and the key. If not, returning to the step S204, searching a server corresponding to the function field and the function identifier from a preset database, and taking the searched server as a target server.
If the graph data function operation authority exists, executing step S204: and searching a server corresponding to the function field and the function identifier from a preset database, and taking the searched server as a target server.
If there is no graph data function operation authority, execute step S210: and sending prompt information without the operation authority of the graph data function to the OpenAPI client device.
In a preferred embodiment of the present invention, the step S208: according to the function identifier and the key, it is determined whether the user initiating the graph data function request has the graph data function operation authority, which specifically includes the following steps, as shown in fig. 3:
step S302, reading first user information corresponding to the key and second user information corresponding to the function identifier from a preset database.
Step S304, determining whether the first user information and the second user information are consistent.
If yes, step S306 is executed to determine that the user initiating the graph data function request has the graph data function operation authority. If not, step S308 is executed to determine that the user initiating the graph data function request has no graph data function operation authority.
Since the user has registered and logged in the graph data service platform (whether an independently developed platform or a public open platform) before obtaining the key and the OpenAPI client, the background database, that is, the preset database, has recorded the key, the user, and other related information. When a user is connected to the graph data service platform through the OpenAPI client, the graph data service platform can analyze first user information according to the secret key, then searches corresponding second user information from the database according to the GraphID in the graph data function request added in the OpenAPI client, judges whether the first user information and the second user information are consistent, and if the first user information and the second user information are consistent, the graph data function operation authority of the user is indicated.
In a preferred embodiment of the present application, the graph data function request further carries a function parameter. The function parameter may be added to the map data function request separately in parallel with the key and the map data function service address, or may be obtained by analyzing the map data function service address. The function parameters may include a function identifier, a graph algorithm model file path, a model input, and other parameters.
The step of triggering the target server to respond to the graph data function request specifically includes: sending the functional parameters in the graph data function request to a target server so that the target server determines graph data function response information corresponding to the graph data function request according to the functional parameters; and receiving graph data function response information returned by the target server.
The following lists response examples of five common graph data functions provided by the embodiments of the present application:
1. version inquiry function: checking whether the function parameter includes only a function identifier; if so, sending the function identifier to a server with the function type of the graph storage environment service function so as to enable the server to search a version query result corresponding to the function identifier; and taking the version inquiry result as graph data function response information corresponding to the graph data function request.
Such as: after adding a graph data function service address, a secret key and a function identifier GraphID in an OpenAPI client, the graph data service platform firstly authenticates the secret key by reading a database, and returns version information corresponding to the GraphID to the OpenAPI client through a server with a graph storage environment service function after the authentication is passed.
2. Graph data query function: checking whether the functional parameter is a query statement; if so, sending the query statement to the target server so that the target server searches a graph data query result corresponding to the query statement; and taking the graph data query result as graph data function response information corresponding to the graph data function request.
Such as: after adding a graph data function service address, a secret key, a function identifier GraphID and a query statement code in an OpenAPI client, an graph data service platform firstly authenticates the secret key by reading a database, and after the authentication is passed, determines that the user has the authority of the graph data query function by reading user information corresponding to the secret key and user information corresponding to the GraphID in the database, and further returns a result of the query statement code to the OpenAPI client through a server with a graph storage environment service function when the two user information are consistent.
It should be noted that the query statement code includes a graph query statement, such as gremlin, that can be recognized by the server of the graph storage environment service function.
3. Data routine task function: checking whether the function parameters are graph data partition information and graph configuration file information; if so, sending the graph data partition information and the graph configuration file information to a server with the function type of graph storage environment service function, so that the server performs data routine and generates information that the graph data routine is successful; and using the information that the graph data routine succeeds as graph data function response information corresponding to the graph data function request.
Such as: after adding a graph data function service address, a secret key, a function identifier GraphID, graph data partition information (such as according to days or hours) and graph configuration file information into an OpenAPI client, an graph data service platform firstly authenticates the secret key by reading a database, and after the authentication is passed, determines that the user has the authority of a data routine task function by reading user information corresponding to the secret key and user information corresponding to the GraphID in the database, and further returns the information of graph data routine success to the OpenAPI client through a server with a graph storage environment service function when the two user information are consistent.
The data routine task has the functions of meeting the requirements of users on data updating in different scenes and customizing the frequency and time of data updating.
4. The graph algorithm model deployment function: checking whether the functional parameters are graph algorithm model file paths; if so, sending the graph algorithm model file path to a server with the function type of graph computing environment service function, so that the server deploys the model file corresponding to the graph algorithm model file path in a graph training environment and generates a corresponding model service address; and taking the model service address as graph data function response information corresponding to the graph data function request.
Such as: after adding a graph data function service address, a secret key, a function identifier TrainID and a graph algorithm model file path in an OpenAPI client, an graph data service platform firstly authenticates the secret key by reading a database, and after the authentication is passed, determines that a user has the authority of a graph algorithm model deployment function by reading user information corresponding to the secret key and user information corresponding to the TrainID in the database when the two user information are consistent, and further returns a model service address to the OpenAPI client through a server of a graph computation environment service function.
5. The graph algorithm model uses the functions of: checking whether the function parameter is the model input information; if so, sending the model input information to a server with the function type of the graph computing environment service function, so that the server applies a corresponding model to perform online model prediction based on the model input information to obtain a model prediction result; and taking the model prediction result as graph data function response information corresponding to the graph data function request.
Such as: after adding a graph data function service address, a secret key, a function identifier ModelID and model input information into an OpenAPI client, an graph data service platform firstly authenticates the secret key by reading a database, and after the authentication is passed, determines that a user has the authority of a graph algorithm model deployment function by reading user information corresponding to the secret key and user information corresponding to the TrainID in the database, and further returns a model prediction result to the OpenAPI client through a server with a graph computation environment service function when the two user information are consistent.
The deployment and use functions of the graph algorithm model can directly access the training effect to a specific application scene after a user trains graph data.
Based on the graph data function response method on the graph data service device side, an embodiment of the present application further provides a graph data function response method, where the method is applied to an OpenAPI client device, where the OpenAPI client device is connected to a graph data service device, the graph data service device is connected to a graph data function service device, the graph data function service device includes at least one server for implementing a graph data function, and the graph data service device may be a graph data service platform, a graph data server, an OpenAPI server, or the like. Referring to fig. 4, the method comprises the steps of:
step S402, responding to a graph data function trigger operation for the OpenAPI client.
In specific implementation, a user can register and log on the graph data service platform firstly, and after the login is successful, the OpenAPI client and the key provided by the graph data service platform can be obtained. As shown in fig. 5, a schematic diagram of an OpenAPI client, key, Demo is provided. The OpenAPI client uses python as a programming language, so the OpenAPI client uses whl files, and other languages are also available; the secret key is automatically generated according to the current login user, the same user only generates the secret key once, a new secret key is not generated in the subsequent login, and the first secret key is reused; how the user shown in Demo uses the client and how the user connects to the server for use.
When a user adds a graph data function service address, a key or a function identifier, a function parameter, and the like to the OpenAPI client according to the manner shown in Demo, a graph data function triggering operation is performed on the OpenAPI client. Only three graph data functions are shown in the figure: version queries, graph data queries, and data routine tasks.
Step S404, sending a graph data function request corresponding to the graph data function triggering operation to the graph data service equipment; the graph data function request carries a key and a graph data function service address.
After responding to the graph data function triggering operation aiming at the OpenAPI client, the OpenAPI client device generates a graph data function request corresponding to the graph data function triggering operation based on the series of data added in the OpenAPI client, and sends the graph data function request to the graph data service device.
Step S406, receiving graph data function response information returned by the graph data service device, where the graph data function response information is obtained by determining, by the graph data service device, a server corresponding to the graph data function service address as a target server after the graph data service device successfully authenticates the graph data function request according to the key, and triggering the target server to respond to the graph data function request.
And after the graph data service equipment receives the graph data function request, the graph data service equipment authenticates through the secret key, and after the authentication is successful, the graph data service equipment finds the target server through the graph data function service address so as to further trigger the response of the target server to the function request and obtain a final response result.
The present embodiment includes technical features in the previous embodiment, and therefore, the functions and effects may also be implemented, and for a specific implementation process, reference is made to the method embodiment at the data service device side in the above-mentioned figure, which is not described herein again.
Based on the above method embodiment, an embodiment of the present application further provides a response system for a graph data function, as shown in fig. 6, where the system includes: an OpenAPI client device 602, a graph data service device 604, and a graph data function service device 606; the graph data service device 604 is connected to the OpenAPI client device 602 and the graph data function service device 606, respectively; the drawing data function service 606 includes at least one server for implementing a drawing data function; the graph data service device 604 is used for executing the steps of the response method of the graph data function of the graph data service device side; the OpenAPI client device 602 is configured to execute the steps of the response method for the graph data function on the OpenAPI client device side.
An electronic device is further provided in the embodiment of the present application, as shown in fig. 7, which is a schematic structural diagram of the electronic device, where the electronic device includes a processor 71 and a memory 70, the memory 70 stores computer-executable instructions that can be executed by the processor 71, and the processor 71 executes the computer-executable instructions to implement the response method of the data function of the above-mentioned figure.
In the embodiment shown in fig. 7, the electronic device further comprises a bus 72 and a communication interface 73, wherein the processor 71, the communication interface 73 and the memory 70 are connected by the bus 72.
The Memory 70 may include a high-speed Random Access Memory (RAM) and may also include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The communication connection between the network element of the system and at least one other network element is realized through at least one communication interface 73 (which may be wired or wireless), and the internet, a wide area network, a local network, a metropolitan area network, and the like can be used. The bus 72 may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The bus 72 may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 7, but this does not indicate only one bus or one type of bus.
The processor 71 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 71. The Processor 71 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory, and the processor 71 reads information in the memory and performs the steps of the response method of the graph data function of the foregoing embodiment in combination with hardware thereof.
Embodiments of the present application further provide a computer-readable storage medium, where the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are called and executed by a processor, the computer-executable instructions cause the processor to implement the response method of the above-mentioned graph data function, and specific implementation may refer to the foregoing method embodiments, and is not described herein again.
The response method of the graph data function, the response system of the graph data function, and the computer program product of the electronic device provided in the embodiments of the present application include a computer-readable storage medium storing program codes, where instructions included in the program codes may be used to execute the response method of the graph data function described in the foregoing method embodiments, and specific implementations may refer to the method embodiments and are not described herein again.
Unless specifically stated otherwise, the relative steps, numerical expressions, and values of the components and steps set forth in these embodiments do not limit the scope of the present application.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In the description of the present application, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only for convenience of description and simplicity of description, and do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be construed as limiting the present application. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present application, and are used for illustrating the technical solutions of the present application, but not limiting the same, and the scope of the present application is not limited thereto, and although the present application is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope disclosed in the present application; such modifications, changes or substitutions do not depart from the spirit and scope of the exemplary embodiments of the present application, and are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (14)

1. A response method of a graph data function is applied to a graph data service device, and is characterized in that the graph data service device is respectively connected with an OpenAPI client device and a graph data function service device, the graph data function service device comprises at least one server for realizing the graph data function, and the method comprises the following steps:
receiving a graph data function request sent by the OpenAPI client device; wherein, the graph data function request carries a key and a graph data function service address; the graph data function service address consists of a prefix and a suffix, the prefix is a conventional server address, and the suffix comprises a function identifier and a function field;
authenticating the graph data function request based on the secret key;
after the authentication is successful, determining a server corresponding to the graph data function service address as a target server, and triggering the target server to respond to the graph data function request to obtain graph data function response information corresponding to the graph data function request;
and returning the graph data function response information to the OpenAPI client device.
2. The method of claim 1, wherein authenticating the graph data function request based on the key comprises:
judging whether the secret key exists in a preset database or not;
if yes, the authentication is successful;
and if the key does not exist, sending prompt information that the key does not exist to the OpenAPI client equipment.
3. The method according to claim 1, wherein the step of determining the server corresponding to the graph data function service address as the target server comprises:
analyzing the graph data function service address to obtain a function field and a function identifier corresponding to the graph data function request;
and searching a server corresponding to the function field and the function identifier from a preset database, and taking the searched server as the target server.
4. The method of claim 3, wherein the step of searching the server corresponding to the function field and the function identifier from a preset database comprises:
if the function identifier corresponding to the graph data function request is the graph data identifier, searching a server corresponding to the function field and the function identifier from a server with the function type of graph storage environment service function;
and if the function identifier corresponding to the graph data function request is a graph training environment identifier or a model deployment identifier, searching the function field and a server corresponding to the function identifier from a server with the function type of a graph computing environment service function.
5. The method of claim 3, wherein before the step of searching the server corresponding to the function field and the function identifier from a preset database, the method further comprises:
detecting whether the function represented by the function field is one of graph data query, data routine task, graph algorithm model deployment or graph algorithm model use;
if so, judging whether a user initiating the graph data function request has graph data function operation authority or not according to the function identifier and the secret key;
and if so, executing the step of searching the server corresponding to the function field and the function identification from a preset database.
6. The method according to claim 5, wherein the step of determining whether the user initiating the graph data function request has graph data function operation authority according to the function identifier and the key comprises:
reading first user information corresponding to the secret key from a preset database, and reading second user information corresponding to the function identifier;
judging whether the first user information is consistent with the second user information;
and if so, determining that the user initiating the graph data function request has the graph data function operation authority.
7. The method according to claim 1, wherein the graph data function request further carries a function parameter;
the step of triggering the target server to respond to the graph data function request comprises the following steps:
sending the function parameters in the graph data function request to the target server so that the target server determines graph data function response information corresponding to the graph data function request according to the function parameters;
and receiving the graph data function response information returned by the target server.
8. The method according to claim 7, wherein the step of sending the function parameters in the graph data function request to the target server so that the target server determines the graph data function response information corresponding to the graph data function request according to the function parameters comprises:
checking whether the functional parameter is a query statement;
if so, sending the query statement to the target server so that the target server searches a graph data query result corresponding to the query statement;
and taking the graph data query result as graph data function response information corresponding to the graph data function request.
9. The method according to claim 7, wherein the step of sending the function parameters in the graph data function request to the target server so that the target server determines the graph data function response information corresponding to the graph data function request according to the function parameters comprises:
checking whether the function parameter includes only a function identification;
if so, sending the function identifier to the target server so that the target server searches for a version query result corresponding to the function identifier;
and taking the version inquiry result as graph data function response information corresponding to the graph data function request.
10. The method according to claim 4, characterized in that the server comprises at least: the server with the function type of the graph storage environment service function and the server with the function type of the graph computing environment service function;
if the function represented by the function field is a version query, a graph data query or a data routine task, the target server corresponding to the function field is a server of the graph storage environment service function;
and if the function represented by the function field is the deployment of the graph algorithm model or the use of the graph algorithm model, the target server corresponding to the function field is a server of the graph computing environment service function.
11. A response method of a graph data function is applied to an OpenAPI client device, the OpenAPI client device is connected with a graph data service device, the graph data service device is connected with a graph data function service device, the graph data function service device comprises at least one server for realizing the graph data function, and the method comprises the following steps:
responding to a graph data function trigger operation aiming at the OpenAPI client;
sending a graph data function request corresponding to the graph data function triggering operation to the graph data service equipment; wherein, the graph data function request carries a key and a graph data function service address; the graph data function service address consists of a prefix and a suffix, the prefix is a conventional server address, and the suffix comprises a function identifier and a function field;
and receiving graph data function response information returned by the graph data service equipment, wherein the graph data function response information is obtained by determining a server corresponding to the graph data function service address as a target server and triggering the target server to respond to the graph data function request after the graph data service equipment successfully authenticates the graph data function request according to the secret key.
12. A response system for graph data functions, the system comprising: the system comprises OpenAPI client equipment, graph data service equipment and graph data function service equipment;
the graph data service device is respectively connected with the OpenAPI client device and the graph data function service device; the graph data function service equipment comprises at least one server for realizing graph data functions;
the graph data serving apparatus being adapted to perform the steps of the response method of the graph data function of any of claims 1-10;
the OpenAPI client device is configured to perform the steps of the response method for graph data functions of claim 11.
13. An electronic device comprising a processor and a memory, the memory storing computer-executable instructions executable by the processor, the processor executing the computer-executable instructions to implement the method of any one of claims 1 to 10 or claim 11.
14. A computer-readable storage medium having stored thereon computer-executable instructions which, when invoked and executed by a processor, cause the processor to carry out the method of any one of claims 1 to 10 or claim 11.
CN201910780762.0A 2019-08-22 2019-08-22 Response method and system of graph data function and electronic equipment Active CN110489986B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910780762.0A CN110489986B (en) 2019-08-22 2019-08-22 Response method and system of graph data function and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910780762.0A CN110489986B (en) 2019-08-22 2019-08-22 Response method and system of graph data function and electronic equipment

Publications (2)

Publication Number Publication Date
CN110489986A CN110489986A (en) 2019-11-22
CN110489986B true CN110489986B (en) 2021-03-23

Family

ID=68553020

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910780762.0A Active CN110489986B (en) 2019-08-22 2019-08-22 Response method and system of graph data function and electronic equipment

Country Status (1)

Country Link
CN (1) CN110489986B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105760447A (en) * 2016-02-03 2016-07-13 网易(杭州)网络有限公司 Mind map processing method, server and client side
WO2017048303A1 (en) * 2015-09-18 2017-03-23 Linkedin Corporation Graph-based queries
CN107358118A (en) * 2017-07-03 2017-11-17 中兴通讯股份有限公司 SFS access control methods and system, SFS and terminal device
CN109670089A (en) * 2018-12-29 2019-04-23 颖投信息科技(上海)有限公司 Knowledge mapping system and its figure server
CN110083455A (en) * 2019-05-07 2019-08-02 网易(杭州)网络有限公司 Figure computation processing method, device, medium and electronic equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103078751B (en) * 2011-12-13 2016-05-18 上海寰创通信科技股份有限公司 The efficient internal memory querying method of network management system and in batches loading method
CN108052834B (en) * 2017-12-11 2019-09-27 东北大学 A kind of approximate shortest distance querying method towards close state graph structure

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017048303A1 (en) * 2015-09-18 2017-03-23 Linkedin Corporation Graph-based queries
CN105760447A (en) * 2016-02-03 2016-07-13 网易(杭州)网络有限公司 Mind map processing method, server and client side
CN107358118A (en) * 2017-07-03 2017-11-17 中兴通讯股份有限公司 SFS access control methods and system, SFS and terminal device
CN109670089A (en) * 2018-12-29 2019-04-23 颖投信息科技(上海)有限公司 Knowledge mapping system and its figure server
CN110083455A (en) * 2019-05-07 2019-08-02 网易(杭州)网络有限公司 Figure computation processing method, device, medium and electronic equipment

Also Published As

Publication number Publication date
CN110489986A (en) 2019-11-22

Similar Documents

Publication Publication Date Title
US8689276B2 (en) System and method for controlling access to files
CN105337997B (en) Login method of application client and related equipment
CN110430205B (en) Single sign-on method, device, equipment and computer readable storage medium
CN107704260B (en) Method and system for updating software development kit of application software
KR20150040325A (en) Cloud-assisted method and service for application security verification
CN107835228B (en) Instruction processing method and device based on dynamic generalized routing
CN111104677B (en) Vulnerability patch detection method and device based on CPE specification
CN107104924B (en) Verification method and device for website backdoor file
CN111176794A (en) Container management method and device and readable storage medium
CN109302394A (en) A kind of anti-simulation login method of terminal, device, server and storage medium
CN112100536A (en) Webpage access method, device and equipment and readable storage medium
CN110149212B (en) Database security reinforcement method and device and electronic equipment
CN109818972B (en) Information security management method and device for industrial control system and electronic equipment
CN111259368A (en) Method and equipment for logging in system
CN112751804A (en) Method, device and equipment for identifying counterfeit domain name
CN108600259B (en) Authentication and binding method of equipment, computer storage medium and server
CN112699034B (en) Virtual login user construction method, device, equipment and storage medium
CN111935107B (en) Identity authentication method, device, system, electronic equipment and storage medium
CN110489986B (en) Response method and system of graph data function and electronic equipment
CN110865774A (en) Information security detection method and device for printing equipment
US20040122877A1 (en) Permission token managemnet system, permission token management method, program and recording medium
CN112600864A (en) Verification code verification method, device, server and medium
CN108965335B (en) Method for preventing malicious access to login interface, electronic device and computer medium
CN111949363A (en) Service access management method, computer equipment, storage medium and system
CN115952515A (en) Data security processing method and device based on big data

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
GR01 Patent grant
GR01 Patent grant