Graph data query method and device, storage medium and electronic equipment

By employing a combination of column-based and row-based replication in the graph database, and selecting the appropriate storage method based on the query type to execute GQL statements, the problem of low graph data query efficiency is solved, achieving more efficient graph data querying.

CN121350318APending Publication Date: 2026-01-16ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511685631.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-17
Publication Date
2026-01-16

AI Technical Summary

Technical Problem

How to efficiently query graph data in graph databases is an urgent problem to be solved in the existing technology, especially the efficiency of performing analytical and non-analytical queries.

Method used

A combination of column-oriented and row-oriented storage methods is used to execute GQL statements in different replicas of the graph database instance based on the query type. Column-oriented replicas are used for analytical queries, while row-oriented replicas are used for non-analytical queries, in order to improve query efficiency.

Benefits of technology

This method significantly improves the efficiency of querying graph data, especially when performing analytical queries, enabling faster retrieval of the required analytical results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121350318A_ABST
    Figure CN121350318A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a graph data query method, which comprises the following steps of: when a GQL (Graphics Query Language) statement executes analysis query, executing a query corresponding to the GQL statement in a column storage copy corresponding to a graph database instance, and when the GQL statement executes non-analysis query, executing the query corresponding to the GQL statement in a row storage copy corresponding to the graph database instance. Through the method, the query efficiency of the graph data can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present specification relates to the technical field of computers, and particularly relates to a graph data query method and device, a storage medium and an electronic device. BACKGROUND

[0002] With the development of the times, the application of graph data is also more and more extensive.

[0003] In logic, graph data is usually composed of points and edges, and the points represent the data corresponding to different objects, and the edges represent the relationship between different objects. Unlike traditional data that only stores the attributes of an object as data, graph data not only includes the attributes of an object, but also focuses on storing the relationship between different objects.

[0004] A graph database is a database used to store graph data, and the graph data stored in the graph database can be queried through a GQL statement used to query graph data. How to efficiently query graph data in a graph database is a problem to be solved. SUMMARY

[0005] Embodiments of the present specification provide a graph data query method, device, storage medium and electronic device to partially solve the problems existing in the prior art.

[0006] Embodiments of the present specification adopt the following technical solutions: The present specification provides a graph data query method, which comprises: obtaining a GQL statement for querying graph data in a graph database instance; if the query type performed by the GQL statement is an analytical query, performing the query corresponding to the GQL statement in a column store replica corresponding to the graph database instance; the column store replica stores graph data in the graph database instance in a column store form; if the query type performed by the GQL statement is a non-analytical query, performing the query corresponding to the GQL statement in a row store replica corresponding to the graph database instance; the row store replica stores graph data in the graph database instance in a row store form.

[0007] The present specification provides a graph data query device, which comprises: an obtaining module configured to obtain a GQL statement for querying graph data in a graph database instance; The query module is configured to execute a query corresponding to the GQL statement in a columnar storage replica corresponding to the graph database instance if the query type performed by the GQL statement is an analytical query, and execute the query corresponding to the GQL statement in a row storage replica corresponding to the graph database instance if the query type performed by the GQL statement is a non-analytical query.

[0008] The present specification provides a computer readable storage medium storing a computer program, and the computer program is executed by a processor to implement the query method of graph data.

[0009] The present specification provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the query method of graph data when executing the program.

[0010] The present specification provides a computer program product containing a computer program, and the computer program is executed by a processor to implement the query method of graph data.

[0011] The above at least one technical solution adopted by the embodiments of the present specification can achieve the following beneficial effects: The present specification discloses a query method of graph data, which executes a query corresponding to a GQL statement in a columnar storage replica corresponding to a graph database instance if the query type performed by the GQL statement is an analytical query, and executes the query corresponding to the GQL statement in a row storage replica corresponding to the graph database instance if the query type performed by the GQL statement is a non-analytical query. Through the above method, the query efficiency of graph data can be effectively improved. BRIEF DESCRIPTION OF DRAWINGS

[0012] The accompanying drawings explained herein are used to provide further understanding of the present specification, and form a part of the present specification. The illustrative embodiments of the present specification and their descriptions serve to explain the present specification, and do not constitute an improper limitation on the present specification. In the drawings: Figure 1 The query method of graph data provided by the embodiments of the present specification is shown in a flowchart; Figure 2 The query device of graph data provided by the embodiments of the present specification is shown in a schematic diagram; Figure 3 The structure of the electronic device provided by the embodiments of the present specification is shown in a schematic diagram. DETAILED DESCRIPTION

[0013] For the purposes of the present description, the technical solutions and advantages thereof will be more apparent from the following description of specific embodiments thereof, taken in conjunction with the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present description, rather than all the embodiments. Based on the embodiments in the present description, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present description.

[0014] The technical solutions provided by the embodiments of the present description will be described in detail below with reference to the accompanying drawings.

[0015] Figure 1 The flowchart of the method for querying the graph data provided by the embodiments of the present description specifically includes the following steps: S100: Obtain a GQL statement for querying graph data in a graph database instance.

[0016] In the embodiments of the present description, the method for querying the graph data is executed by a device as shown in the method. Figure 1 The device for executing the method for querying the graph data can be a device carrying a graph database system. The graph database system can include a graph platform and a graph cluster.

[0017] The graph platform is configured to write graph data into the graph cluster, query the graph data stored in the graph cluster, and manage the graph data stored in the graph cluster.

[0018] The graph cluster is a storage cluster composed of multiple storage nodes. Different storage nodes can be carried by the same device or different devices, and the storage nodes are configured to store graph data.

[0019] When querying the graph data in the graph database system through the GQL statement, the GQL statement for querying the graph data in the graph database instance can be obtained through the graph platform. The GQL statement includes a GQL statement sent by an external device independent of the graph database system (such as a GQL statement sent by a user through a terminal) and a GQL statement generated by the graph platform itself through a computer program.

[0020] S101: Determine whether the query type executed by the GQL statement is an analytical query. If yes, execute step S102; otherwise, execute step S103.

[0021] In the embodiments of the present specification, a graph database instance is data of a graph composed of a plurality of points and edges between the points, the points are used to represent objects, and the edges are used to represent relationships between different objects, and the graph database instance not only stores attribute data of the points and the edges, but also stores structure data of the points and the edges, the structure data is data used to represent connection relationships between the points and the edges, so that through a GQL statement, not only attribute data of the points and / or the edges can be queried, but also other points or edges having a connection relationship with a certain point can be queried based on the above structure data.

[0022] In actual application scenarios, the query types of queries that can be performed by a GQL statement include many types, such as point query, edge query, point-edge one-degree query or n-degree query, and analysis query. Among them, the point query is used to query the attribute data of the points, the edge query is used to query the attribute data of the edges, the point-edge one-degree query or n-degree query can be used to query the attribute data of other points or edges having a one-degree or n-degree connection relationship with a certain point or edge, and the analysis query is a query that needs to perform secondary calculation on the attribute data of the points or edges that are queried, so as to obtain an analysis result.

[0023] For example, assuming that a graph database instance stores data of relationships between users and movies, the points represent the users and the movies, and the edges represent the relationships between the users and the movies, the attribute data of the points representing the users can include attribute data such as names, genders, and ages of the users, the attribute data of the points representing the movies can include attribute data such as names, release times, and box office of the movies, and the attribute data of the edges between the users and the movies can include attribute data such as acting, directing, and watching, which means that a relationship between a user and a movie includes that the user acted in or directed or watched the movie.

[0024] Based on the above graph database instance, if a GQL statement is: MATCH (p:Person)-[r:ACTED_IN]->(m:Movie {name: "XXX"}) RETURN p The GQL statement means to query attribute data of users who acted in a movie named "XXX" in the graph database instance. The GQL is a one-degree query of a point, and the attribute data of the points corresponding to the users having a one-degree connection relationship with the point corresponding to the movie named "XXX" is queried in the graph composed of the above users and movies as points and the relationships between the users and the movies as edges, and the connection relationship is ACTED_IN, that is, acting. However, since the attribute data of the users who acted in the movie "XXX" is directly returned after being queried, without any secondary calculation on the attribute data, the GQL statement is not an analysis query.

[0025] If the GQL statement is: MATCH (p:Person)-[r:ACTED_IN]->(m:Movie {name: "XXX"}) RETURN avg(p.age) it means that the GQL statement queries the average age of the users who acted in the movie named "XXX" in the graph database instance. The GQL statement not only queries the ages of the users who acted in the movie "XXX", but also needs to perform a secondary calculation on the ages of all the users queried to obtain the average age, which is an analysis result, and therefore, the GQL statement is an analysis query.

[0026] The analysis query described in the embodiments of the present specification includes aggregation queries such as counting, summing, averaging, maximizing, and minimizing, and also includes other analysis queries that need to perform secondary calculations. Any GQL statement whose query type is an OLAP task on the data queried from the graph database instance can be determined as a GQL statement whose query type is an analysis query. GQL statements that perform OLTP tasks and GQL statements that perform point queries, edge queries, point-edge one-degree or n-degree queries can be determined as GQL statements whose query types are non-analysis queries.

[0027] In the embodiments of the present specification, after the graph platform obtains the GQL statement through the above step S100, it can determine whether the query type of the GQL statement is an analysis query according to the keyword in the GQL statement. The keyword can include the function name of a function for performing an aggregation operation or secondary calculation on the attribute data queried.

[0028] Specifically, the keyword can be preset as the function name of a counting function (such as COUNT()), the function name of a summing function (such as SUM()), the function name of an averaging function (such as AVG()), the function name of a maximizing function (such as MAX()), the function name of a minimizing function (such as MIN()), and the like.

[0029] If the graph platform determines that the GQL statement contains the keyword, it can determine that the query type of the GQL statement is an analysis query, and execute the subsequent step S102. If the graph platform determines that the GQL statement does not contain the keyword, it can determine that the query type of the GQL statement is a non-analysis query, and execute the subsequent step S103.

[0030] S102: Execute the query corresponding to the GQL statement in the columnar replica corresponding to the graph database instance.

[0031] In the embodiments of the present disclosure, for a graph database instance, at least one column store replica and at least one row store replica corresponding to the graph database instance need to be stored in the graph cluster. The column store replica stores graph data in the graph database instance in the form of column store, and the row store replica stores graph data in the graph database instance in the form of row store.

[0032] In the graph database, when data of an object, such as point or edge data, is stored in the form of row store, all attribute data of the object is stored in a data block. That is, the data of each object stored in a fixed-size data block is relatively complete data. When reading the data in the data block, all attribute data in the data block is read first, and then column projection is performed according to column data required by the query statement, so that when the query statement requires all attribute data of an object, the efficiency of executing the query in the row store replica stored in the form of row store is relatively high.

[0033] When data of an object is stored in the form of column store, only one or several attribute data of the object is stored in a data block, and different attribute data is stored in different data blocks. That is, the data of each object stored in a fixed-size data block is incomplete data, and only one or several attribute data of the object. If the query statement requires one or several attribute data of multiple objects, and the attribute data is stored in the data block, the required attribute data of multiple objects in the data block can be directly read without reading all attribute data of multiple objects and then performing column projection, so that when the query statement requires one or several attribute data of multiple objects, the efficiency of executing the query in the column store replica stored in the form of column store is relatively high.

[0034] In the row store replica of the graph database instance, attribute data of each attribute used to represent points and edges in the graph data and structure data used to represent connection relationships between points and edges are stored in each data block in the form of row store.

[0035] For the GQL statement of the analysis query type, usually, data required for secondary calculation is one or several attribute data of points and / or edges, rather than structure data of points and / or edges (for example, the GQL statement shown in the above example requires aggregation of avg(p.age), that is, the age of the user, which is attribute data of the user, rather than structure data used to represent the relationship between the user and the movie), so that in the column store replica of the graph database instance, the structure data used to represent connection relationships between points and edges can be stored in the form of row store or column store, which is not limited in the embodiments of the present disclosure, and attribute data used to represent each attribute of points and edges needs to be stored in each data block in the form of column store.

[0036] When the graph platform determines that the GQL statement is a GQL statement for executing an analytical query through step S101, an execution request for executing the GQL statement can be sent to a storage node in the graph cluster for storing a columnar copy of the graph database instance, and the storage node executes the analytical query corresponding to the GQL statement to improve the efficiency of the analytical query.

[0037] Specifically, in the embodiments of the present specification, different copies corresponding to one graph database instance can be stored on different storage nodes. When the graph platform determines that the GQL statement is a GQL statement for executing an analytical query, the graph platform can first find a storage node storing a columnar copy corresponding to the graph database instance in each storage node of the graph cluster, and send an execution request for executing the GQL statement to the found storage node, so that the found storage node executes a query corresponding to the GQL statement in the stored columnar copy.

[0038] S103: executing a query corresponding to the GQL statement in the row store copy corresponding to the graph database instance.

[0039] Correspondingly, when the graph platform determines that the GQL statement is not a GQL statement for executing an analytical query through step S101, it indicates that the statement executed by the GQL statement can be a point query, an edge query, or a point-edge one-degree or n-degree query. These queries usually do not query only one or several attribute data of points and / or edges, and therefore, an execution request for executing the GQL statement can be sent to a storage node in the graph cluster for storing a row store copy of the graph database instance, and the storage node executes a query corresponding to the GQL statement to improve the query efficiency.

[0040] Specifically, when the graph platform determines that the GQL statement is not a GQL statement for executing an analytical query, the graph platform can first find a storage node storing a row store copy corresponding to the graph database instance in each storage node of the graph cluster, and send an execution request for executing the GQL statement to the found storage node, so that the found storage node executes a query corresponding to the GQL statement in the stored row store copy.

[0041] Through the above method, when a GQL statement executes an analytical query, a query corresponding to the GQL statement is executed in a columnar copy corresponding to a graph database instance, and when a GQL statement executes a non-analytical query, a query corresponding to the GQL statement is executed in a row store copy corresponding to a graph database instance. Through the above method, the query efficiency of graph data can be effectively improved.

[0042] Further, in the embodiments of the present disclosure, at least one columnar copy and at least one row store copy corresponding to the graph database instance can be generated in advance. Specifically, the copies corresponding to the graph database instance can be configured on the graph platform in advance, and at least one columnar copy, at least one row store copy and metadata of the graph database instance are configured. The metadata of the graph database instance includes labels of points in the graph database instance (for example, in the graph database instance for storing users and movies, the labels of points include users and movies), definitions of attribute data of points and edges, and storage types (row store or columnar store) and storage nodes of each copy corresponding to the graph database instance.

[0043] After the graph database instance is configured as described above, the metadata can be stored locally on the graph platform, and the graph data in the graph database instance is imported into the corresponding storage nodes in the graph cluster according to the above configuration, so as to generate the corresponding copies on the storage nodes. Specifically, when importing the graph data in the graph database instance, the storage nodes can obtain structure data for representing the connection relationship between points and edges in the graph database instance, and attribute data of points and edges. If the storage node stores a columnar copy according to the above configuration, the storage node can generate at least one columnar copy corresponding to the graph database instance according to the structure data and the attribute data, and store it locally. If the storage node stores a row store copy according to the above configuration, the storage node can generate at least one row store copy corresponding to the graph database instance according to the structure data and the attribute data, and store it locally.

[0044] The attribute data of points and edges in the columnar copy can be stored in columnar form, and the attribute data of points and edges in the row store copy can be stored in row form. The storage form of the structure data is not limited. That is, each columnar copy can include structure data and attribute data stored in columnar form, and each row store copy can include structure data and attribute data stored in row form. Since the structure data is used to represent the connection relationship between points and edges in the graph database instance, the structure data is the same for the row store copy and the columnar copy. Therefore, in order to save storage space, all copies (including row store copies and columnar copies) corresponding to the graph database instance can share the same structure data.

[0045] When all the replicas in the graph database instance collectively reuse the same structure data, the structure data and the attribute data can be stored separately, that is, each column storage replica can only contain attribute data stored in a column storage form, each row storage replica can only contain attribute data stored in a row storage form, neither the row storage replica nor the column storage replica contains the structure data, and the structure data is stored as a separate file. Specifically, the storage node in the graph cluster can obtain the structure data representing the connection relationship between the points and the edges in the graph database instance, and the attribute data of the points and the edges, and then generate at least one column storage replica storing the attribute data in a column storage form and at least one row storage replica storing the attribute data in a row storage form according to the attribute data. Finally, each column storage replica and each row storage replica are stored locally, and the above structure data is stored as shared structure data corresponding to all column storage replicas and all row storage replicas, and only one structure data is stored separately. At this time, logically, a column storage replica is still composed of the structure data and the attribute data stored in a column storage form, and a row storage replica is still composed of the structure data and the attribute data stored in a row storage form, but the attribute data stored in a column storage form and the attribute data stored in a row storage form are stored separately, and the structure data is only stored in a shared form, so as to save storage space. Correspondingly, when executing the GQL query statement, the graph cluster can first query the required points and / or edges in the structure data according to the GQL query statement. After the required points and / or edges are queried, if the GQL query statement is an analytical query, the attribute data of the required points and / or edges is queried in the column storage replica, and the attribute data of the required points and / or edges is calculated according to the function for secondary calculation contained in the GQL query statement, to obtain an analytical result. If the GQL query statement is not an analytical query, the attribute data of the required points and / or edges is queried in the row storage replica.

[0046] The above is a merging method of an SSTable provided by an embodiment of the present specification. Based on the same idea, the present specification also provides a corresponding device, a storage medium, and an electronic device.

[0047] Figure 2 A graph data query device provided by an embodiment of the present specification is shown in a schematic diagram, and the device includes: The acquisition module 201 is configured to acquire a GQL query statement for querying graph data in a graph database instance. The determination module 202 is configured to determine whether the query type of the GQL query statement is an analytical query. The query module 203 is configured to: when the determination result of the determination module 202 is yes, execute a query corresponding to the GQL statement in a column storage copy corresponding to the graph database instance, the column storage copy storing graph data in the graph database instance in a column storage form; and when the determination result of the determination module 202 is no, execute the query corresponding to the GQL statement in a row storage copy corresponding to the graph database instance, the row storage copy storing the graph data in the graph database instance in a row storage form.

[0048] Optionally, the apparatus further includes: The storage module 200 is configured to: before the determination module 202 determines whether a query type of the GQL statement is an analytical query, acquire structure data used to represent a connection relationship between points and edges in the graph database instance and attribute data of the points and the edges; and generate at least one column storage copy and at least one row storage copy corresponding to the graph database instance according to the structure data and the attribute data, the column storage copy containing the structure data and the attribute data stored in a column storage form, and the row storage copy containing the structure data and the attribute data stored in a row storage form.

[0049] Optionally, the non-analytical query is a point query, an edge query, a point-edge one-degree query, or an n-degree query. Optionally, the storage module 200 is configured to: before the determination module 202 determines whether a query type of the GQL statement is an analytical query, acquire structure data used to represent a connection relationship between points and edges in the graph database instance and attribute data of the points and the edges; generate at least one column storage copy storing the attribute data in a column storage form and at least one row storage copy storing the attribute data in a row storage form according to the attribute data; and store the column storage copy and the row storage copy, and store the structure data as shared structure data corresponding to the column storage copy and the row storage copy.

[0050] Optionally, the determination module 202 is specifically configured to: determine whether a function name of a preset function is included in the GQL statement; if yes, determine that a query type of the GQL statement is an analytical query; otherwise, determine that the query type of the GQL statement is not an analytical query.

[0051] Optionally, different copies corresponding to the graph database instance are stored in different storage nodes. The query module 203 is specifically configured to: in each storage node, find a storage node storing a column storage copy corresponding to the graph database instance. Send an execution request to the found storage node to execute the GQL statement, so that the found storage node executes the query corresponding to the GQL statement in the stored columnar copy.

[0052] Optionally, different replicas of the graph database instance are stored on different storage nodes; The query module 203 is specifically used to: locate, among the storage nodes, the storage node that stores the row copy corresponding to the graph database instance; send an execution request to the located storage node to execute the GQL statement, so that the located storage node executes the query corresponding to the GQL statement in the stored row copy.

[0053] This specification also provides a computer-readable storage medium storing a computer program that, when executed by a processor, can be used to perform the graph data query method provided above.

[0054] This specification also provides a computer program product, which includes a computer program that, when executed by a processor, implements the graph data query method provided above.

[0055] based on Figure 1 The method for querying graph data shown in this specification is further provided in the embodiments. Figure 3 The diagram shows the structure of the electronic device. Figure 3 At the hardware level, the electronic device includes a processor, internal bus, network interface, memory, and non-volatile storage, and may also include other hardware required for the business. The processor reads the corresponding computer program from the non-volatile storage into memory and then runs it to implement the above-mentioned method for querying graph data.

[0056] The above description is merely an embodiment of this specification and is not intended to limit this specification. Various modifications and variations can be made to this specification by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of the claims of this specification.

Claims

1. A method for querying graph data, the method comprising: obtaining a GQL statement for querying graph data in a graph database instance; if a query type performed by the GQL statement is an analytic query, performing a query corresponding to the GQL statement in a column store replica corresponding to the graph database instance; the column store replica storing graph data in the graph database instance in a column store form; if the query type performed by the GQL statement is a non-analytic query, performing the query corresponding to the GQL statement in a row store replica corresponding to the graph database instance; the row store replica storing graph data in the graph database instance in a row store form. 2.The method of claim 1, wherein the non-analytic query is a point query, an edge query, a point-edge-one-degree query, or an n-degree query. 3.The method of claim 1, before obtaining the GQL statement for querying graph data in the graph database instance, the method further comprising: obtaining structure data for representing a connection relationship between points and edges in the graph database instance, and attribute data of the points and the edges; and generating at least one column store replica and at least one row store replica corresponding to the graph database instance according to the structure data and the attribute data; the column store replica containing the structure data and storing the attribute data in a column store form; the row store replica containing the structure data and storing the attribute data in a row store form. 4.The method of claim 1, before obtaining the GQL statement for querying graph data in the graph database instance, the method further comprising: obtaining structure data for representing a connection relationship between points and edges in the graph database instance, and attribute data of the points and the edges; generating at least one column store replica storing the attribute data in a column store form, and at least one row store replica storing the attribute data in a row store form according to the attribute data; and storing the column store replica and the row store replica, and storing the structure data as shared structure data corresponding to the column store replica and the row store replica. 5.The method of claim 1, the method further comprising: determining whether a function name of a preset function is contained in the GQL statement; if yes, determining that the query type performed by the GQL statement is an analytic query; otherwise, determining that the query type performed by the GQL statement is a non-analytic query. 6.The method of claim 1, different replicas corresponding to the graph database instance are stored in different storage nodes; and performing the query corresponding to the GQL statement in the column store replica corresponding to the graph database instance comprises: in each storage node, finding a storage node storing the column store replica corresponding to the graph database instance; and sending an execution request of executing the GQL statement to the found storage node, so that the found storage node performs the query corresponding to the GQL statement in the stored column store replica. 7.The method of claim 1, different replicas corresponding to the graph database instance are stored in different storage nodes. ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ executing the GQL statement in the row-store copy corresponding to the graph database instance, specifically comprising: in each storage node, finding a storage node storing the row-store copy corresponding to the graph database instance; sending an execution request of the GQL statement to the found storage node, so that the found storage node executes the query corresponding to the GQL statement in the stored row-store copy.

8. A device for querying graph data, the device comprising: an obtaining module, configured to obtain a GQL statement for querying graph data in a graph database instance; a querying module, configured to if a query type executed by the GQL statement is an analytical query, execute a query corresponding to the GQL statement in a column-store copy corresponding to the graph database instance; the column-store copy stores graph data in the graph database instance in a column-store form; if the query type executed by the GQL statement is a non-analytical query, execute the query corresponding to the GQL statement in a row-store copy corresponding to the graph database instance; the row-store copy stores graph data in the graph database instance in a row-store form.

9. A computer-readable storage medium, the storage medium storing a computer program, the computer program being executed by a processor to implement the method of any one of claims 1-7.

10. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor executing the program to implement the method of any one of claims 1-7.

11. A computer program product, the computer program product containing a computer program, the computer program being executed by a processor to implement the method of any one of claims 1-7.