[go: up one dir, main page]

CN110554958A - Graph database testing method, system, device and storage medium - Google Patents

Graph database testing method, system, device and storage medium Download PDF

Info

Publication number
CN110554958A
CN110554958A CN201910709047.8A CN201910709047A CN110554958A CN 110554958 A CN110554958 A CN 110554958A CN 201910709047 A CN201910709047 A CN 201910709047A CN 110554958 A CN110554958 A CN 110554958A
Authority
CN
China
Prior art keywords
test
data
graph
graph database
tested
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.)
Granted
Application number
CN201910709047.8A
Other languages
Chinese (zh)
Other versions
CN110554958B (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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology 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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201910709047.8A priority Critical patent/CN110554958B/en
Publication of CN110554958A publication Critical patent/CN110554958A/en
Application granted granted Critical
Publication of CN110554958B publication Critical patent/CN110554958B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9024Graphs; Linked lists

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Debugging And Monitoring (AREA)

Abstract

本申请公开了一种图数据库测试方法、系统、设备和存储介质,其中方法包括:根据目标业务场景需求,生成满足目标业务场景的图数据;确定针对待测试图数据库的测试类型;根据测试类型和满足目标业务场景的图数据,生成适用于测试类型的测试数据;根据适用于测试类型的测试数据,对待测试图数据库进行测试。即通过不同业务场景需求动态生成满足不同业务场景的图数据,并基于满足不同业务场景的图数据对待测试图数据库进行测试,解决了现有技术中图数据测试的难题,实现了对图数据库进行测试的功能,并可以覆盖诸多场景的复杂关系,实现了图数据库系统在不同场景下的表现差异,极大扩展了本申请实施例的测试方案的适用场景,提高了测试系统的复用度。

The present application discloses a graph database testing method, system, device and storage medium, wherein the method includes: generating graph data satisfying the target business scenario according to the requirements of the target business scenario; determining the test type for the graph database to be tested; and the graph data that meets the target business scenario, generate test data suitable for the test type; test the to-be-tested graph database according to the test data suitable for the test type. That is, the graph data that meets different business scenarios is dynamically generated through the requirements of different business scenarios, and the graph database to be tested is tested based on the graph data that meets different business scenarios. The test function can cover the complex relationship of many scenarios, realize the performance difference of the graph database system in different scenarios, greatly expand the applicable scenarios of the test solution of the embodiment of the present application, and improve the reusability of the test system.

Description

图数据库测试方法、系统、设备和存储介质Graph database testing method, system, device and storage medium

技术领域technical field

本申请涉及数据库测试技术领域,尤其涉及一种图数据库测试方法、系统、设备和计算机可读存储介质。The present application relates to the technical field of database testing, and in particular, to a graph database testing method, system, device, and computer-readable storage medium.

背景技术Background technique

目前,图数据库是所有数据管理系统中成长最快的分类。通过节点、属性、边的图格式存储,图数据库克服了其他数据库无法解决的大而复杂的数据难题,在复杂问题的处理上有着明显的优势,其优势主要体现在:更好,更快速的查询和分析;更简单和更自然的数据建模;同时支持实时更新和查询;更加灵活的数据结构。因此,市场上也涌现了越来越多的基于图数据库的产品、分析系统。Currently, graph databases are the fastest growing category of all data management systems. Through the graph format storage of nodes, attributes and edges, the graph database overcomes the large and complex data problems that other databases cannot solve, and has obvious advantages in dealing with complex problems. Its advantages are mainly reflected in: better and faster query and analysis; simpler and more natural data modeling; support for both real-time updates and queries; more flexible data structures. Therefore, more and more graph database-based products and analysis systems have emerged on the market.

对于传统的数据库目前已经有一些相对成熟的功能、性能自动化测试方案和系统。由于图数据库与传统数据库相比,数据建模、存储、表达应用的场景均不同,传统数据库的测试方案均不能适用于图数据库的测试。此外,由于图数据库属于近几年流行的新兴数据库形态,对于该类数据并未出现体系化的测试方法。For traditional databases, there are already some relatively mature functions and performance automation testing solutions and systems. Compared with traditional databases, graph databases have different scenarios for data modeling, storage, and expression applications, and the test solutions of traditional databases cannot be applied to the testing of graph databases. In addition, since the graph database belongs to the emerging database form that has become popular in recent years, there is no systematic testing method for this type of data.

因此,如何实现图数据库的测试,已经成为一个亟待解决的问题。Therefore, how to implement graph database testing has become an urgent problem to be solved.

发明内容SUMMARY OF THE INVENTION

本申请的目的旨在至少在一定程度上解决相关技术中的技术问题之一。The purpose of this application is to solve one of the technical problems in the related art at least to a certain extent.

为此,本申请的第一个目的在于提出一种图数据库测试方法,该方法能够解决图数据测试的难题,从而可以实现对图数据库进行测试的功能。Therefore, the first purpose of the present application is to propose a graph database testing method, which can solve the difficult problem of graph data testing, so as to realize the function of testing graph databases.

本申请的第二个目的在于提出一种图数据库测试系统。The second purpose of this application is to propose a graph database testing system.

本申请的第三个目的在于提出一种基于图数据库测试方法的设备。The third purpose of this application is to propose a device based on the graph database testing method.

本申请的第四个目的在于提出一种计算机可读存储介质。A fourth object of the present application is to propose a computer-readable storage medium.

为达上述目的,本申请第一方面实施例提出了一种图数据库测试方法,包括:根据目标业务场景需求,生成满足所述目标业务场景的图数据;确定针对待测试图数据库的测试类型;根据所述测试类型和所述满足所述目标业务场景的图数据,生成适用于所述测试类型的测试数据;根据所述适用于所述测试类型的测试数据,对所述待测试图数据库进行测试。In order to achieve the above purpose, an embodiment of the first aspect of the present application proposes a method for testing a graph database, including: generating graph data satisfying the target business scenario according to the requirements of a target business scenario; determining a test type for the graph database to be tested; Generate test data suitable for the test type according to the test type and the graph data that meets the target business scenario; test.

本申请实施例的图数据库测试方法,根据目标业务场景需求,生成满足目标业务场景的图数据,并确定针对待测试图数据库的测试类型,根据测试类型和满足目标业务场景的图数据,生成适用于测试类型的测试数据,并根据适用于测试类型的测试数据,对待测试图数据库进行测试。即通过不同的业务场景需求动态生成满足不同业务场景的图数据,并基于满足不同业务场景的图数据对待测试图数据库进行测试,解决了现有技术中图数据测试的难题,实现了对图数据库进行测试的功能,并可以覆盖诸多场景的复杂关系,可以实现图数据库系统在不同场景下的表现差异,极大扩展了本申请实施例的测试方案的适用场景,提高了测试系统的复用度。The graph database testing method of the embodiment of the present application generates graph data that meets the target business scenario according to the requirements of the target business scenario, determines the test type for the graph database to be tested, and generates graph data suitable for the target business scenario according to the test type and graph data that meets the target business scenario. Test data for the test type, and test the database to be tested according to the test data for the test type. That is, the graph data that meets different business scenarios is dynamically generated through the requirements of different business scenarios, and the graph database to be tested is tested based on the graph data that meets different business scenarios, which solves the problem of graph data testing in the prior art and realizes the graph database. The test function can cover the complex relationship of many scenarios, and can realize the performance difference of the graph database system in different scenarios, greatly expand the applicable scenarios of the test solution of the embodiment of the present application, and improve the reusability of the test system. .

为达上述目的,本申请第二方面实施例提出了一种图数据库测试系统,包括:图数据生成模块,用于根据目标业务场景需求,生成满足所述目标业务场景的图数据;图数据库测试模块,用于确定针对待测试图数据库的测试类型,并根据所述测试类型和所述满足所述目标业务场景的图数据,生成适用于所述测试类型的测试数据,以及根据所述适用于所述测试类型的测试数据,对所述待测试图数据库进行测试。In order to achieve the above purpose, a second aspect embodiment of the present application proposes a graph database testing system, including: a graph data generating module for generating graph data satisfying the target business scenario according to the requirements of the target business scenario; graph database testing The module is used to determine the test type for the graph database to be tested, and generate test data suitable for the test type according to the test type and the graph data that meets the target business scenario, and The test data of the test type is used to test the to-be-tested graph database.

本申请实施例的图数据库测试系统,根据目标业务场景需求,生成满足所述目标业务场景的图数据;确定针对待测试图数据库的测试类型;根据所述测试类型和所述满足所述目标业务场景的图数据,生成适用于所述测试类型的测试数据;根据所述适用于所述测试类型的测试数据,对所述待测试图数据库进行测试。即通过不同的业务场景需求动态生成满足不同业务场景的图数据,并基于满足不同业务场景的图数据对待测试图数据库进行测试,解决了现有技术中图数据测试的难题,实现了对图数据库进行测试的功能,并可以覆盖诸多场景的复杂关系,可以实现图数据库系统在不同场景下的表现差异,极大扩展了本申请实施例的测试方案的适用场景,提高了测试系统的复用度。The graph database testing system of the embodiment of the present application generates graph data satisfying the target business scenario according to the requirements of the target business scenario; determines the test type for the graph database to be tested; The graph data of the scene is generated to generate test data suitable for the test type; according to the test data suitable for the test type, the to-be-tested graph database is tested. That is, the graph data that meets different business scenarios is dynamically generated through the requirements of different business scenarios, and the graph database to be tested is tested based on the graph data that meets different business scenarios, which solves the problem of graph data testing in the prior art and realizes the graph database. The test function can cover the complex relationship of many scenarios, and can realize the performance difference of the graph database system in different scenarios, greatly expand the applicable scenarios of the test solution of the embodiment of the present application, and improve the reusability of the test system. .

为达上述目的,本申请第三方面实施例提出了一种基于图数据库测试方法的设备,包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时,实现本申请第一方面实施例所述的图数据库测试方法。In order to achieve the above purpose, an embodiment of the third aspect of the present application proposes a device based on a graph database testing method, including: a memory, a processor, and a computer program stored on the memory and running on the processor, When the processor executes the computer program, the graph database testing method described in the embodiments of the first aspect of the present application is implemented.

为达上述目的,本申请第四方面实施例提出了一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现本申请第一方面实施例所述的图数据库测试方法。To achieve the above purpose, the fourth aspect of the present application provides a computer-readable storage medium on which a computer program is stored, characterized in that, when the computer program is executed by a processor, the first aspect of the present application is implemented. The described graph database testing method.

本申请附加的方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本申请的实践了解到。Additional aspects and advantages of the present application will be set forth, in part, in the following description, and in part will be apparent from the following description, or learned by practice of the present application.

附图说明Description of drawings

本申请上述的和/或附加的方面和优点从下面结合附图对实施例的描述中将变得明显和容易理解,其中:The above and/or additional aspects and advantages of the present application will become apparent and readily understood from the following description of embodiments taken in conjunction with the accompanying drawings, wherein:

图1为根据本申请第一个实施例的图数据库测试方法的流程示意图;1 is a schematic flowchart of a graph database testing method according to a first embodiment of the present application;

图2为根据本申请第二个实施例的图数据库测试方法的流程示意图;2 is a schematic flowchart of a graph database testing method according to a second embodiment of the present application;

图3为根据本申请第三个实施例的图数据库测试方法的流程示意图;3 is a schematic flowchart of a graph database testing method according to a third embodiment of the present application;

图4为根据本申请第四个实施例的图数据库测试方法的流程示意图;4 is a schematic flowchart of a graph database testing method according to a fourth embodiment of the present application;

图5为根据本申请第一个实施例的图数据库测试系统的结构示意图;5 is a schematic structural diagram of a graph database testing system according to the first embodiment of the present application;

图6为根据本申请第二个实施例的图数据库测试系统的结构示意图;6 is a schematic structural diagram of a graph database testing system according to a second embodiment of the present application;

图7为根据本申请第三个实施例的图数据库测试系统的结构示意图;7 is a schematic structural diagram of a graph database testing system according to a third embodiment of the present application;

图8为根据本申请第四个实施例的图数据库测试系统的结构示意图;8 is a schematic structural diagram of a graph database testing system according to a fourth embodiment of the present application;

图9为根据本申请第五个实施例的图数据库测试系统的结构示意图;9 is a schematic structural diagram of a graph database testing system according to a fifth embodiment of the present application;

图10为根据本申请第六个实施例的图数据库测试系统的结构示意图;10 is a schematic structural diagram of a graph database testing system according to a sixth embodiment of the present application;

图11示出了适于用来实现本申请实施方式的基于图数据库测试方法的设备的框图。FIG. 11 shows a block diagram of a device suitable for implementing the graph database-based testing method of the embodiments of the present application.

具体实施方式Detailed ways

下面详细描述本申请的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,旨在用于解释本申请,而不能理解为对本申请的限制。The following describes in detail the embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary, and are intended to be used to explain the present application, but should not be construed as a limitation to the present application.

下面参考附图描述本申请实施例的图数据库测试方法、系统、设备和计算机可读存储介质。其中,本申请实施例的图数据库测试方法可应用于本申请实施例的图数据库测试系统,以使该图数据库测试系统可以执行图数据库测试方法。其中,本申请实施例的图数据库测试系统可以应用任意依托于图数据库的业务场景,例如,金融交易场景、电商交易场景、网络管理场景等。The graph database testing method, system, device, and computer-readable storage medium of the embodiments of the present application are described below with reference to the accompanying drawings. The graph database testing method of the embodiment of the present application can be applied to the graph database testing system of the embodiment of the present application, so that the graph database testing system can execute the graph database testing method. Wherein, the graph database testing system of the embodiment of the present application can be applied to any business scenarios relying on the graph database, for example, financial transaction scenarios, e-commerce transaction scenarios, network management scenarios, and the like.

图1为根据本申请一个实施例的图数据库测试方法的流程示意图。FIG. 1 is a schematic flowchart of a graph database testing method according to an embodiment of the present application.

如图1所示,该图数据库测试方法包括以下步骤:As shown in Figure 1, the graph database testing method includes the following steps:

步骤101,根据目标业务场景需求,生成满足目标业务场景的图数据。Step 101 , according to the requirements of the target business scenario, generate graph data that meets the target business scenario.

可以理解的是,本申请实施例的图数据库测试系统可以应用任意依托于图数据库的业务场景,例如,金融交易场景、电商交易场景、网络管理场景等。因此,目标业务场景为图数据库测试系统应用的依托于图数据库的业务场景。It can be understood that the graph database testing system of the embodiment of the present application can be applied to any business scenarios relying on the graph database, for example, financial transaction scenarios, e-commerce transaction scenarios, network management scenarios, and the like. Therefore, the target business scenario is the business scenario that relies on the graph database for the application of the graph database test system.

在本申请实施例中,为了方便生成图数据库的测试数据,首先可根据目标业务场景需求,生成满足目标业务场景的图数据。其中,满足目标业务场景的图数据格式可包含但不限于CSV(Comma-Separated Values,逗号分隔值)文件格式、JSON(JavaScript ObjectNotation,JavaScript对象简谱)文件格式等。In the embodiment of the present application, in order to facilitate the generation of the test data of the graph database, first, according to the requirements of the target business scenario, graph data satisfying the target business scenario can be generated. The graph data format that meets the target business scenario may include, but is not limited to, a CSV (Comma-Separated Values, comma-separated value) file format, a JSON (JavaScript ObjectNotation, JavaScript Object Notation) file format, and the like.

可选地,如图2所示,根据目标业务场景需求,生成满足目标业务场景的图数据的具体步骤如下:Optionally, as shown in FIG. 2 , according to the requirements of the target business scenario, the specific steps for generating graph data satisfying the target business scenario are as follows:

步骤201,根据目标业务场景需求,获取用于生成图数据所需的配置信息;其中,配置信息包括图数据中实体数据模式定义信息、每类实体的规模定义信息、故事情景模板的定义信息和关系密度设置信息。Step 201, according to the requirements of the target business scenario, obtain the configuration information required for generating the graph data; wherein, the configuration information includes the entity data schema definition information in the graph data, the scale definition information of each type of entity, the definition information of the story scenario template and Relationship density setting information.

在本申请实施例中,为了方便生成满足目标业务场景的图数据,首先可根据目标业务场景需求,获取用于生成图数据所需的配置信息;其中,配置信息可包括图数据中实体数据模式定义信息、每类实体的规模定义信息、故事情景模板的定义信息和关系密度设置信息。可以理解,配置信息可由相关技术人员预先进行配置。In this embodiment of the present application, in order to facilitate the generation of graph data that meets the target business scenario, first, configuration information required for generating graph data may be obtained according to the requirements of the target business scenario; wherein the configuration information may include entity data patterns in the graph data Definition information, scale definition information for each type of entity, definition information for story scenario templates, and relationship density setting information. It can be understood that the configuration information can be pre-configured by those skilled in the art.

举例而言,配置信息中的图数据中实体数据模式定义信息可以是客户信息、账号信息、设备信息等;对应的每类实体的规模定义信息可以是客户信息的规模为50万,账号信息的规模为100万,设备信息的规模为10万;故事情景模板的定义信息的获取可基于故事情景模板以获取,其中,故事情景模板可包括简单故事情景模板和复杂故事情景模板,比如,简单故事情景模版为:客户A拥有账号C,对应的故事情景模板的定义信息为:客户A--(拥有)--账号C;复杂故事情景模版为:账号C使用设备D转账账号M,对应的故事情景模板的定义信息为:账号C--(使用)--设备D--((转账))--账号M。For example, the entity data schema definition information in the graph data in the configuration information may be customer information, account information, device information, etc.; the corresponding scale definition information for each type of entity may be that the scale of customer information is 500,000, and the size of account information is 500,000. The scale is 1 million, and the scale of device information is 100,000; the definition information of the story scenario template can be obtained based on the story scenario template, wherein the story scenario template can include simple story scenario templates and complex story scenario templates, such as simple story The scenario template is: customer A has account C, and the definition information of the corresponding story scenario template is: customer A--(owned)--account C; the complex story scenario template is: account C uses device D to transfer account M, the corresponding story The definition information of the scenario template is: account C--(use)--device D--((transfer))--account M.

另外,为方便图数据中每类实体之间关系的生成,配置信息中根据不同出度的实体所占的比例可进行关系密度设置信息的设置,例如:可设置出度为0-10区间的占50%,出度为10-100区间的占30%,出度为100-10000区间的占20%。其中,出度表示从实体出发连接其他实体的边数量。In addition, in order to facilitate the generation of the relationship between each type of entities in the graph data, the relationship density setting information can be set according to the proportion of entities with different out-degrees in the configuration information. For example, the out-degree can be set to 0-10. 50%, 30% for the 10-100 range, and 20% for the 100-10000 range. Among them, the out-degree represents the number of edges from an entity to connect other entities.

步骤202,根据配置信息中的实体数据模式定义信息和每类实体的规模定义信息,生成实体数据信息。Step 202: Generate entity data information according to the entity data schema definition information and the scale definition information of each type of entity in the configuration information.

进一步地,在获取到用于生成图数据所需的配置信息之后,可根据配置信息中的实体数据模式定义信息和每类实体的规模定义信息,生成实体数据信息。Further, after obtaining the configuration information required for generating the graph data, entity data information can be generated according to the entity data schema definition information and the scale definition information of each type of entity in the configuration information.

举例而言,以转账场景为例:配置信息中的实体数据模式定义信息为客户信息、账号信息、设备信息,每类实体的规模定义信息为客户信息的规模为50万,账号信息的规模为100万,设备信息的规模为10万,从而可基于该配置信息中的实体数据模式定义信息和每类实体的规模定义信息,生成实体数据信息为50万客户信息,100万账号信息,10万ATM设备信息。For example, take the transfer scenario as an example: the entity data mode in the configuration information defines the information as customer information, account information, and device information, and the scale definition information for each type of entity is that the scale of customer information is 500,000, and the scale of account information is 500,000. 1 million, and the scale of device information is 100,000, so based on the entity data schema definition information and the scale definition information of each type of entity in the configuration information, the generated entity data information is 500,000 customer information, 1 million account information, 100,000 ATM device information.

步骤203,根据故事情景模板的定义信息、关系密度设置信息和实体数据信息,将故事情景模板对应的实例化成多条故事情景数据。Step 203 , according to the definition information, relationship density setting information and entity data information of the story scenario template, instantiate the corresponding story scenario template into multiple pieces of story scenario data.

具体地,可根据配置信息中的故事情景模板的定义信息、关系密度设置信息和生成的实体数据信息,将故事情景模板对应的实例化成多条故事情景数据。Specifically, according to the definition information of the story scene template, the relationship density setting information and the generated entity data information in the configuration information, the corresponding instance of the story scene template can be instantiated into a plurality of pieces of story scene data.

例如,假设生成的实体数据信息为“50万客户信息,100万账号信息”,假设配置信息中的故事情景模板的定义信息为“客户A--(拥有)--账户C”,关系密度设置信息为“设置出度为0-10区间的占50%,出度为10-100区间的占30%,出度为100-10000区间的占20%”,则可根据这些信息,将配置的故事情景模板实例化成多条完成的故事情景数据。其中,该多条故事情景数据满足如下条件:该多条故事情景数据中包含了50万客户实体和100万账号实体,且客户实体与账号实体满足如下故事情景:某客户实体--(拥有)--某账户实体;该50万客户实体和100万账号实体中,出度为0-10区间的实体数所占总实体数的比例为50%,出度为10-100区间的实体数所占总实体数的比例为30%,出度为100-10000区间实体数所占总实体数的比例为20%。For example, assume that the generated entity data information is "500,000 customer information, 1 million account information", assume that the definition information of the story scenario template in the configuration information is "customer A--(owned)--account C", the relationship density is set If the information is "Set the out-degree to 0-10, 50%, 10-100 to 30%, and 100-10000 to 20%", you can configure the configuration based on this information. The story scenario template is instantiated into multiple pieces of completed story scenario data. Among them, the multiple pieces of story scenario data meet the following conditions: the multiple pieces of story scenario data include 500,000 customer entities and 1 million account entities, and the customer entities and account entities meet the following story scenarios: a customer entity -- (owned) --An account entity; among the 500,000 customer entities and 1 million account entities, the number of entities with an out-degree range of 0-10 accounts for 50% of the total number of entities, and the number of entities with an out-degree range of 10-100 accounts for 50% of the total number of entities. The proportion of the total number of entities is 30%, and the proportion of the number of entities in the range of 100-10000 is 20% of the total number of entities.

步骤204,确定故事情景模板中包含的关系,并根据故事情景模板中包含的关系,将多条故事情景数据解析成对应的关系数据,得到满足目标业务场景的图数据。Step 204: Determine the relationships included in the story scenario template, and parse multiple pieces of story scenario data into corresponding relationship data according to the relationships included in the story scenario template to obtain graph data satisfying the target business scenario.

可以理解的是,故事情景模板中包含配置信息中的实体之间的对应关系,因此,获取到多条故事情景数据之后,可根据故事情景模板中包含的关系,将多条故事情景数据解析成对应的关系数据,将解析得到的对应的关系数据作为满足目标业务场景的图数据,从而得到满足目标业务场景的图数据。It is understandable that the story scenario template contains the correspondence between entities in the configuration information. Therefore, after obtaining multiple pieces of story scenario data, the multiple story scenario data can be parsed into For the corresponding relational data, the corresponding relational data obtained by analysis is used as graph data satisfying the target business scenario, thereby obtaining graph data satisfying the target business scenario.

举例而言,以故事情景模板为:账号C--(使用)--设备D--((转账))--账号M为例,可先根据该故事情景模板解析出该故事情景模板中包含的2类关系,即:账号使用设备,账号转账给账号。之后,可根据该故事情景模板中包含的关系,将实例化后得到的多条故事情景数据解析成具体的关系数据,从而得到满足目标业务场景的图数据。For example, taking the story scenario template as: Account C--(Use)--Device D--((Transfer))--Account M as an example, we can first analyze the story scenario template according to the story scenario template and find out that the story scenario template contains There are two types of relationships, namely: the account uses the device, and the account is transferred to the account. Afterwards, according to the relationship contained in the story scenario template, the multiple pieces of story scenario data obtained after the instantiation can be parsed into specific relationship data, so as to obtain graph data satisfying the target business scenario.

另外,还需要说明的是,在本申请实施例中,步骤201-204生成的数据格式为CSV,如果用户需要该生成的数据为JSON格式,则将CSV格式的数据转换成对应的JSON格式。另外,由于CSV格式的数据,没有表头属性值,所以,如果用户需要该生成的数据为CSV时,需初始化对应的实体属性信息,以将生成的关系数据对应地补充各个实体的属性值。In addition, it should also be noted that, in the embodiment of the present application, the data format generated in steps 201-204 is CSV. If the user needs the generated data to be in JSON format, the data in CSV format is converted into corresponding JSON format. In addition, since the data in CSV format has no header attribute value, if the user needs the generated data to be CSV, the corresponding entity attribute information needs to be initialized, so that the generated relational data can be supplemented with the attribute value of each entity correspondingly.

步骤102,确定针对待测试图数据库的测试类型。Step 102: Determine the test type for the graph database to be tested.

在本申请实施例中,为了进一步地构建图数据产品完整的测试体系,在生成满足目标业务场景的图数据之后,需对待测试图数据库的测试类型进行判断,确定出针对待测试图数据库的测试类型。比如,可根据待测图数据库的测试需求,从而确定出针对待测试图数据库的测试类型。例如:当待测图数据库的测试需求为:待测图数据库是否满足指定存储目标时,可根据该需求确定出针对待测试图数据库的测试类型为存储测试类型;当待测图数据库的测试需求为:待测图数据库是否具有查询分析功能时,可确定出针对待测试图数据库的测试类型为查询分析测试类型。其中,需要说明的是,测试类型可包括但不限于存储测试类型和查询分析测试类型。其中,存储测试类型可包括但不限于批量离线数据加载测试,流式数据写入测试等;查询分析测试类型可包括但不限于基础查询功能测试,路径分析测试,中心度分析测试,群体分析测试等。步骤103,根据测试类型和满足目标业务场景的图数据,生成适用于测试类型的测试数据。In the embodiment of the present application, in order to further build a complete test system for graph data products, after generating graph data that meets the target business scenario, it is necessary to judge the test type of the graph database to be tested, and determine the test for the graph database to be tested. type. For example, the test type for the to-be-tested graph database can be determined according to the test requirements of the to-be-tested graph database. For example: when the test requirement of the graph database to be tested is: whether the graph database to be tested meets the specified storage target, the test type for the graph database to be tested can be determined as the storage test type according to the requirement; when the test requirement of the graph database to be tested To be: when the graph database to be tested has a query analysis function, it can be determined that the test type for the graph database to be tested is the query analysis test type. Among them, it should be noted that the test types may include but are not limited to storage test types and query analysis test types. Among them, storage test types may include but are not limited to batch offline data loading tests, streaming data writing tests, etc.; query analysis test types may include but are not limited to basic query function tests, path analysis tests, centrality analysis tests, and group analysis tests. Wait. Step 103 , according to the test type and graph data satisfying the target business scenario, generate test data suitable for the test type.

进一步地,在生成满足目标业务场景的图数据和确定针对待测试图数据库的测试类型之后,则可根据测试类型和满足目标业务场景的图数据,生成适用于测试类型的测试数据。Further, after generating graph data satisfying the target business scenario and determining the test type for the graph database to be tested, test data suitable for the test type can be generated according to the test type and graph data satisfying the target business scenario.

不难理解的是,测试类型不同,生成适用于测试类型的测试数据的所使用的方式也不同。例如,当测试类型为存储测试类型时,可根据待测试图数据库所支持的数据输入格式,对满足目标业务场景的图数据进行数据预处理,以生成对应的测试数据;当测试类型为查询分析测试类型时,可根据预先设定的测试需求生成对应的图检索语法,再生成对应图检索语法的具体请求内容,以生成对应的测试数据。具体实现方式可参见后续实施例的描述。It is not difficult to understand that different test types are used in different ways to generate test data suitable for the test type. For example, when the test type is storage test type, data preprocessing can be performed on the graph data that meets the target business scenario according to the data input format supported by the graph database to be tested to generate corresponding test data; when the test type is query analysis When testing the type, the corresponding graph retrieval syntax can be generated according to the preset test requirements, and then the specific request content corresponding to the graph retrieval syntax can be generated to generate corresponding test data. For the specific implementation, reference may be made to the descriptions of the subsequent embodiments.

步骤104,根据适用于测试类型的测试数据,对待测试图数据库进行测试。Step 104: Test the database to be tested according to the test data applicable to the test type.

进一步地,生成适用于测试类型的测试数据之后,根据适用于测试类型的测试数据,对待测试图数据库进行测试。Further, after the test data suitable for the test type is generated, the database to be tested is tested according to the test data suitable for the test type.

为了兼容并支持多种图数据库的测试和屏蔽不同数据库系统之间的内部差异,提高图数据库测试系统的复用度,可选地,在本申请的一个实施例中,所述根据适用于测试类型的测试数据,对待测试图数据库进行测试的具体过程可包括如下步骤:确定针对待测试图数据库的适配应用程序接口;根据适用于测试类型的测试数据,通过适配应用程序接口对待测试图数据库进行测试。In order to be compatible with and support the testing of multiple graph databases, shield the internal differences between different database systems, and improve the reusability of the graph database testing system, optionally, in an embodiment of the present application, the test method is suitable for testing For the type of test data, the specific process of testing the database to be tested may include the following steps: determine an adaptive application program interface for the database to be tested; database for testing.

也就是说,根据待测试图数据库的应用程序接口类型进行适配开发,之后,根据适用于测试类型的测试数据,通过适配应用程序接口对待测试图数据库进行测试。例如,图数据库的应用程序接口可分为三类,如:服务获取类应用程序接口、数据加载类应用程序接口、查询类应用程序接口。在该三类应用程序接口对应支持后,可通过统一以上应用程序接口的方式以访问不同的图数据库系统,进而可以支持多种图数据库的测试和屏蔽不同数据库系统之间的内部差异。That is to say, the adaptation development is performed according to the application program interface type of the graph database to be tested, and then, the test graph database to be tested is tested through the adaptation application program interface according to the test data suitable for the test type. For example, the application program interface of the graph database can be divided into three categories, such as: service acquisition application program interface, data loading application program interface, and query application program interface. After the three types of application program interfaces are correspondingly supported, different graph database systems can be accessed by unifying the above application program interfaces, thereby supporting the testing of various graph databases and shielding the internal differences between different database systems.

为了更好地提高测试的效率和质量,可对每次测试产生的指标数据进行分析。因此,在完成对待测试图数据库的测试时,可收集本次测试所产生的指标数据。需要说明的是,测试类型不同,测试所产生的指标数据也不同,测试类型为存储测试类型时,测试所产生的指标数据可包括但不限于:数据载入的成功率、吞吐量、加载后磁盘和内存空间的占用情况等,测试类型为查询分析测试类型时,测试所产生的指标数据可包括但不限于:查询分析的成功率、耗时情况、并发性能等。In order to better improve the efficiency and quality of the test, the indicator data generated by each test can be analyzed. Therefore, when the test of the database to be tested is completed, the indicator data generated by this test can be collected. It should be noted that the indicator data generated by the test is different depending on the test type. When the test type is the storage test type, the indicator data generated by the test may include but are not limited to: data loading success rate, throughput, post-loading Occupation of disk and memory space, etc. When the test type is the query analysis test type, the indicator data generated by the test may include but are not limited to: query analysis success rate, time-consuming, concurrent performance, etc.

另外,还需要说明的是,为了进一步提高测试的效率,还需随时了解对待测试图数据库进行测试的过程中服务器的环境数据信息,因此,在对待测试图数据库进行测试的过程中,需收集待测试图数据库所在服务器的环境数据信息。比如:监控测试过程中服务的健康状态、服务是否存在、有无核心文件,内存使用情况、磁盘使用情况,中央处理器使用情况,并分别给出在不同测试场景下系统资源的消耗情况等。In addition, it should be noted that, in order to further improve the efficiency of the test, it is necessary to know the environmental data information of the server in the process of testing the database to be tested. Therefore, in the process of testing the database to be tested, it is necessary to collect the Environment data information of the server where the test graph database is located. For example: monitor the health status of the service during the test, whether the service exists, whether there are core files, memory usage, disk usage, CPU usage, and the consumption of system resources in different test scenarios.

在本申请实施例中,为了增强测试结果的可读性,在收集到本次测试所产生的指标数据和环境数据之后,可选地,根据收集到的本次测试所产生的指标数据和环境数据信息,生成针对待测试图数据库的测试结果,并输出测试结果。In this embodiment of the present application, in order to enhance the readability of the test results, after collecting the indicator data and environment data generated by this test, optionally, according to the collected indicator data and environment data generated by this test Data information, generate test results against the graph database to be tested, and output the test results.

也就是说,收集到本次测试所产生的指标数据和环境数据之后,可根据收集到的本次测试所产生的指标数据和环境数据信息,对测试结果进行整合,将整合后的测试结果作为对待测试图数据库的测试结果,使得该测试结果可读性强。That is to say, after collecting the index data and environmental data generated by this test, the test results can be integrated according to the collected index data and environmental data information generated by this test, and the integrated test results can be used as The test results of the test chart database are treated to make the test results highly readable.

本申请实施例的图数据库测试方法,根据目标业务场景需求,生成满足目标业务场景的图数据;确定针对待测试图数据库的测试类型;根据测试类型和满足目标业务场景的图数据,生成适用于测试类型的测试数据;根据适用于测试类型的测试数据,对待测试图数据库进行测试。即通过不同的业务场景需求动态生成满足不同业务场景的图数据,并基于满足不同业务场景的图数据对待测试图数据库进行测试,解决了现有技术中图数据测试的难题,实现了对图数据库进行测试的功能,并可以覆盖诸多场景的复杂关系,可以实现图数据库系统在不同场景下的表现差异,极大扩展了本申请实施例的测试方案的适用场景,提高了测试系统的复用度。此外,本申请实施例中提出基于故事情景模式生成图数据,解决了图数据库在多种业务场景下复杂关系数据生成的难题。最后,本申请通过图数据库的应用程序接口的适配有效兼容了了各类图数据库产品的测试,极大扩展了该测试方案的适用场景,提高系统复用度。The graph database testing method of the embodiment of the present application generates graph data that meets the target business scenario according to the requirements of the target business scenario; determines the test type for the graph database to be tested; Test data of the test type; according to the test data applicable to the test type, the test graph database is to be tested. That is, the graph data that meets different business scenarios is dynamically generated through the requirements of different business scenarios, and the graph database to be tested is tested based on the graph data that meets different business scenarios, which solves the problem of graph data testing in the prior art and realizes the graph database. The test function can cover the complex relationship of many scenarios, and can realize the performance difference of the graph database system in different scenarios, greatly expand the applicable scenarios of the test solution of the embodiment of the present application, and improve the reusability of the test system. . In addition, in the embodiments of the present application, it is proposed to generate graph data based on the story scenario mode, which solves the problem of generating complex relational data in a graph database in various business scenarios. Finally, the present application effectively complies with the testing of various graph database products through the adaptation of the application program interface of the graph database, which greatly expands the applicable scenarios of the test scheme and improves the system reuse.

需要说明的是,测试类型不同,生成适用于测试类型的测试数据的所使用的方式也不同,下面将结合图3和图4给出两种不同的实现方式。It should be noted that, with different test types, the manners used to generate test data suitable for the test types are also different. Two different implementation manners will be given below with reference to FIG. 3 and FIG. 4 .

图3是根据本申请一个实施例的图数据库测试方法的流程图。需要说明的是,本申请实施例的图数据库测试方法以测试类型为存储测试类型的情况进行描述,如图3所示,该图数据库测试方法可以包括:FIG. 3 is a flowchart of a graph database testing method according to an embodiment of the present application. It should be noted that the graph database testing method in the embodiment of the present application is described in the case that the test type is the storage test type. As shown in FIG. 3 , the graph database testing method may include:

步骤301,根据目标业务场景需求,生成满足目标业务场景的图数据。Step 301 , according to the requirements of the target business scenario, generate graph data that meets the target business scenario.

步骤302,确定待测试图数据库的测试类型为存储测试类型。Step 302, determining that the test type of the graph database to be tested is the storage test type.

步骤303,确定待测试图数据库所支持的数据输入格式。Step 303 , determine the data input format supported by the database to be tested.

步骤304,根据待测试图数据库所支持的数据输入格式,对满足目标业务场景的图数据进行数据预处理,生成适用于存储测试类型的测试数据。Step 304 , according to the data input format supported by the graph database to be tested, perform data preprocessing on graph data that meets the target business scenario, and generate test data suitable for storing the test type.

可以理解的是,满足目标业务场景的图数据的数据可以是但不限于离线图数据,离线图数据格式可包含但不限于CSV、JSON格式等。因此,在对存储测试类型的待测试图数据库进行测试时,需确定出待测试图数据库所支持的数据输入格式,之后,根据待测试图数据库所支持的数据输入格式,对满足目标业务场景的图数据进行数据预处理,以生成适用于存储测试类型的测试数据。It can be understood that the data of the graph data satisfying the target business scenario may be, but not limited to, offline graph data, and the offline graph data format may include, but is not limited to, CSV, JSON format, and the like. Therefore, when testing the graph database to be tested that stores the test type, it is necessary to determine the data input format supported by the graph database to be tested. Graph data undergoes data preprocessing to generate test data suitable for storage test types.

步骤305,根据适用于测试类型的测试数据,对待测试图数据库进行测试。Step 305: Test the database to be tested according to the test data suitable for the test type.

具体地,可根据适用于测试类型的测试数据,执行相应的测试数据,对待测试图数据库进行测试。其中,执行相应的测试数据可包括但不限于批量的数据加载,流式的数据写入等。Specifically, according to the test data applicable to the test type, the corresponding test data can be executed to test the to-be-tested graph database. Wherein, executing the corresponding test data may include, but is not limited to, batch data loading, streaming data writing, and the like.

根据本申请实施例的图数据库测试方法,根据目标业务场景需求,生成满足目标业务场景的图数据;确定待测试图数据库的测试类型为存储测试类型;确定待测试图数据库所支持的数据输入格式;根据待测试图数据库所支持的数据输入格式,对满足目标业务场景的图数据进行数据预处理,生成适用于存储测试类型的测试数据;根据适用于测试类型的测试数据,对待测试图数据库进行测试。即通过不同的业务场景需求动态生成满足不同业务场景的图数据,并基于满足不同业务场景的图数据对待测试图数据库进行测试,解决了现有技术中图数据测试的难题,实现了对图数据库进行测试的功能,并可以覆盖诸多场景的复杂关系,可以实现图数据库系统在不同场景下的表现差异,极大扩展了本申请实施例的测试方案的适用场景,提高了测试系统的复用度。According to the graph database testing method of the embodiment of the present application, according to the requirements of the target business scenario, graph data satisfying the target business scenario is generated; the test type of the graph database to be tested is determined as the storage test type; the data input format supported by the graph database to be tested is determined ;According to the data input format supported by the graph database to be tested, perform data preprocessing on graph data that meets the target business scenario, and generate test data suitable for storing test types; test. That is, the graph data that meets different business scenarios is dynamically generated through the requirements of different business scenarios, and the graph database to be tested is tested based on the graph data that meets different business scenarios, which solves the problem of graph data testing in the prior art and realizes the graph database. The test function can cover the complex relationship of many scenarios, and can realize the performance difference of the graph database system in different scenarios, greatly expand the applicable scenarios of the test solution of the embodiment of the present application, and improve the reusability of the test system. .

图4是根据本申请另一个具体实施例的图数据库测试方法的流程图。需要说明的是,本申请实施例的图数据库测试方法以测试类型为查询分析测试类型的情况进行描述,如图4所示,该图数据库测试方法可以包括:FIG. 4 is a flowchart of a graph database testing method according to another specific embodiment of the present application. It should be noted that the graph database testing method in the embodiment of the present application is described with the test type being the query analysis testing type. As shown in FIG. 4 , the graph database testing method may include:

步骤401,根据目标业务场景需求,生成满足目标业务场景的图数据。Step 401 , according to the requirements of the target business scenario, generate graph data that meets the target business scenario.

步骤402,确定待测试图数据库的测试类型为查询分析测试类型。Step 402: Determine the test type of the graph database to be tested as the query analysis test type.

步骤403,根据预先设定的测试需求生成对应的图检索语法。Step 403: Generate a corresponding graph retrieval grammar according to preset test requirements.

步骤404,根据满足目标业务场景的图数据,生成对应图检索语法的具体请求内容,并将对应图检索语法的具体请求内容作为适用于查询分析测试类型的测试数据。Step 404: Generate specific request content corresponding to the graph retrieval syntax according to the graph data satisfying the target business scenario, and use the specific request content corresponding to the graph retrieval syntax as test data suitable for the query analysis test type.

在本申请实施例中,在对查询分析测试类型的待测试图数据库进行测试时,可根据预先设定的测试需求生成对应的图检索语法,比如:邻居查询的out语法。之后,根据满足目标业务场景的图数据和图检索语法,生成对应检索语法的具体请求内容,例如具体需要进行邻居查询的实体id列表。接着,将对应图检索语法的具体请求内容作为适用于查询分析测试类型的测试数据。其中,预先设定的测试需求可以是但不限于用户的测试需求。In the embodiment of the present application, when testing the graph database to be tested of the query analysis test type, a corresponding graph retrieval grammar, such as the out grammar of neighbor query, can be generated according to preset test requirements. Afterwards, according to the graph data and graph retrieval syntax that satisfy the target business scenario, specific request content corresponding to the retrieval syntax is generated, for example, a list of entity IDs for which neighbor query needs to be performed specifically. Next, the specific request content corresponding to the graph retrieval syntax is used as the test data suitable for the query analysis test type. Wherein, the preset test requirement may be, but not limited to, the user's test requirement.

步骤405,根据适用于测试类型的测试数据,对待测试图数据库进行测试。Step 405: Test the database to be tested according to the test data applicable to the test type.

具体地,可根据适用于测试类型的测试数据,执行相应的测试数据,对待测试图数据库进行测试。之后,为了进一步确认测试结果的正确性,可在图数据库测试完成后,将测试结果与基线结果进行接口差异(简称Diff)测试,也就是比对相同接口在不同版本或不同环境下面的返回内容是否符合预期,从而可以验证结果的正确性。Specifically, according to the test data applicable to the test type, the corresponding test data can be executed to test the to-be-tested graph database. After that, in order to further confirm the correctness of the test results, after the graph database test is completed, the test results and the baseline results can be tested for interface difference (Diff for short), that is, to compare the returned content of the same interface in different versions or different environments. Whether it meets the expectations, so that the correctness of the results can be verified.

根据本申请实施例的图数据库测试方法,根据目标业务场景需求,生成满足目标业务场景的图数据;确定待测试图数据库的测试类型为查询分析测试类型;根据预先设定的测试需求生成对应的图检索语法;根据满足目标业务场景的图数据,生成对应图检索语法的具体请求内容,并将对应图检索语法的具体请求内容作为适用于查询分析测试类型的测试数据;根据适用于测试类型的测试数据,对待测试图数据库进行测试。即通过不同的业务场景需求动态生成满足不同业务场景的图数据,并基于满足不同业务场景的图数据对待测试图数据库进行测试,解决了现有技术中图数据测试的难题,实现了对图数据库进行测试的功能,并可以覆盖诸多场景的复杂关系,可以实现图数据库系统在不同场景下的表现差异,极大扩展了本申请实施例的测试方案的适用场景,提高了测试系统的复用度。According to the graph database testing method of the embodiment of the present application, graph data satisfying the target business scenario is generated according to the requirements of the target business scenario; the test type of the graph database to be tested is determined as the query analysis test type; and the corresponding test requirements are generated according to the preset test requirements. Graph retrieval syntax; according to the graph data satisfying the target business scenario, generate the specific request content corresponding to the graph retrieval syntax, and use the specific request content corresponding to the graph retrieval syntax as the test data suitable for the query analysis test type; Test data, to be tested against the test graph database. That is, the graph data that meets different business scenarios is dynamically generated through the requirements of different business scenarios, and the graph database to be tested is tested based on the graph data that meets different business scenarios, which solves the problem of graph data testing in the prior art and realizes the graph database. The test function can cover the complex relationship of many scenarios, and can realize the performance difference of the graph database system in different scenarios, greatly expand the applicable scenarios of the test solution of the embodiment of the present application, and improve the reusability of the test system. .

与上述几种实施例提供的图数据库测试方法相对应,本申请的一种实施例还提供一种图数据库测试系统,由于本申请实施例提供的图数据库测试系统与上述几种实施例提供的图数据库测试方法相对应,因此在前述图数据库测试方法的实施方式也适用于本实施例提供的图数据库测试系统,在本实施例中不再详细描述。图5为根据本申请一个实施例的图数据库测试系统的结构示意图。如图5所示,该图数据库测试系统包括:图数据生成模块510、图数据库测试模块520。Corresponding to the graph database testing methods provided by the above-mentioned embodiments, an embodiment of the present application further provides a graph database testing system. The graph database testing method corresponds to the graph database testing method, so the foregoing embodiments of the graph database testing method are also applicable to the graph database testing system provided in this embodiment, which will not be described in detail in this embodiment. FIG. 5 is a schematic structural diagram of a graph database testing system according to an embodiment of the present application. As shown in FIG. 5 , the graph database testing system includes: a graph data generating module 510 and a graph database testing module 520 .

其中,图数据生成模块510,用于根据目标业务场景需求,生成满足目标业务场景的图数据;Wherein, the graph data generation module 510 is configured to generate graph data satisfying the target business scenario according to the requirements of the target business scenario;

图数据库测试模块520,用于确定针对待测试图数据库的测试类型,并根据测试类型和满足目标业务场景的图数据,生成适用于测试类型的测试数据,以及根据适用于测试类型的测试数据,对待测试图数据库进行测试。The graph database testing module 520 is configured to determine the test type for the graph database to be tested, and generate test data suitable for the test type according to the test type and the graph data satisfying the target business scenario, and according to the test data suitable for the test type, Test against a database of test graphs.

作为本申请实施例的一种可能的实现方式,图数据生成模块510具体用于:根据目标业务场景需求,获取用于生成图数据所需的配置信息;其中,配置信息包括图数据中实体数据模式定义信息、每类实体的规模定义信息、故事情景模板的定义信息和关系密度设置信息;根据配置信息中的实体数据模式定义信息和每类实体的规模定义信息,生成实体数据信息;根据故事情景模板的定义信息、关系密度设置信息和所述实体数据信息,将故事情景模板对应的实例化成多条故事情景数据;确定故事情景模板中包含的关系,并根据故事情景模板中包含的关系,将多条故事情景数据解析成对应的关系数据,得到满足目标业务场景的图数据。As a possible implementation manner of the embodiment of the present application, the graph data generation module 510 is specifically configured to: obtain configuration information required for generating graph data according to the requirements of the target business scenario; wherein the configuration information includes entity data in the graph data Schema definition information, scale definition information for each type of entity, story scenario template definition information, and relationship density setting information; according to the entity data schema definition information in the configuration information and the scale definition information for each type of entity, the entity data information is generated; according to the story The definition information, relationship density setting information and the entity data information of the scenario template, instantiate the corresponding story scenario template into multiple pieces of story scenario data; determine the relationship included in the story scenario template, and according to the relationship included in the story scenario template, Parse multiple story scenario data into corresponding relational data to obtain graph data that satisfies the target business scenario.

作为本申请实施例的一种可能的实现方式,测试类型包括存储测试类型和查询分析测试类型。As a possible implementation manner of the embodiment of the present application, the test type includes a storage test type and a query analysis test type.

作为本申请实施例的一种可能的实现方式,如图6所示,在图5所示基础上,图数据库测试模块520包括:图存储测试单元521和图查询分析测试单元522。As a possible implementation of the embodiment of the present application, as shown in FIG. 6 , on the basis of FIG. 5 , the graph database testing module 520 includes: a graph storage testing unit 521 and a graph query analysis testing unit 522 .

其中,图存储测试单元521用于确定待测试图数据库所支持的数据输入格式,并根据待测试图数据库所支持的数据输入格式,对满足目标业务场景的图数据进行数据预处理,生成适用于存储测试类型的测试数据,并根据适用于存储测试类型的测试数据对待测试图数据库进行测试。图查询分析测试单元522用于根据预先设定的测试需求生成对应的图检索语法,并根据满足目标业务场景的图数据,生成对应图检索语法的具体请求内容,并将对应图检索语法的具体请求内容作为适用于查询分析测试类型的测试数据,并根据适用于查询分析测试类型的测试数据,对待测试图数据库进行测试。Among them, the graph storage testing unit 521 is used to determine the data input format supported by the graph database to be tested, and according to the data input format supported by the graph database to be tested, perform data preprocessing on graph data that meets the target business scenario, and generate data suitable for Store test data for the test type and test against the test chart database against the test data suitable for storing the test type. The graph query analysis and testing unit 522 is configured to generate the corresponding graph retrieval grammar according to the preset test requirements, and generate the specific request content corresponding to the graph retrieval grammar according to the graph data that meets the target business scenario, and generate the specific request content corresponding to the graph retrieval grammar. The content of the request is the test data suitable for the query analysis test type, and the test graph database is tested according to the test data suitable for the query analysis test type.

作为本申请实施例的一种可能的实现方式,如图7所示,在图6所示基础上,图数据库测试系统还包括:指标数据收集模块530。As a possible implementation manner of the embodiment of the present application, as shown in FIG. 7 , on the basis of that shown in FIG. 6 , the graph database testing system further includes: an indicator data collection module 530 .

具体地,指标数据收集模块530,用于在完成对待测试图数据库的测试时,收集本次测试所产生的指标数据。Specifically, the indicator data collection module 530 is configured to collect the indicator data generated in this test when the test of the database to be tested is completed.

作为本申请实施例的一种可能的实现方式,如图8所示,在图7所示基础上,图数据库测试系统还包括:环境数据信息监控模块540。As a possible implementation manner of the embodiment of the present application, as shown in FIG. 8 , on the basis of that shown in FIG. 7 , the graph database testing system further includes: an environmental data information monitoring module 540 .

具体地,环境数据信息监控模块540,用于在对待测试图数据库进行测试的过程中,收集待测试图数据库所在服务器的环境数据信息。Specifically, the environmental data information monitoring module 540 is configured to collect environmental data information of the server where the to-be-tested graph database is located in the process of testing the to-be-tested graph database.

作为本申请实施例的一种可能的实现方式,如图9所示,在图8所示基础上,图数据库测试系统还包括:测试结果生成模块550。As a possible implementation manner of the embodiment of the present application, as shown in FIG. 9 , on the basis of that shown in FIG. 8 , the graph database testing system further includes: a test result generating module 550 .

具体地,测试结果生成模块550,用于根据收集到的本次测试所产生的指标数据和环境数据信息,生成针对待测试图数据库的测试结果,并输出测试结果。Specifically, the test result generation module 550 is configured to generate a test result for the graph database to be tested according to the collected index data and environmental data information generated by this test, and output the test result.

作为本申请实施例的一种可能的实现方式,如图10所示,在图5所示基础上,图数据库测试系统还包括:图数据库系统接入模块560。As a possible implementation manner of the embodiment of the present application, as shown in FIG. 10 , on the basis of FIG. 5 , the graph database testing system further includes: a graph database system access module 560 .

具体地,图数据库系统接入模块560具有多种图数据库的适配应用程序接口;其中,图数据库测试模块520具体用于:确定针对待测试图数据库的适配应用程序接口,并根据适用于测试类型的测试数据,通过适配应用程序接口对待测试图数据库进行测试。Specifically, the graph database system access module 560 has a variety of adaptation application program interfaces for graph databases; wherein, the graph database testing module 520 is specifically used for: determining the adaptation application program interface for the graph database to be tested, and according to the application program interface suitable for the graph database to be tested The test data of the test type is tested against the test graph database by adapting the application program interface.

根据本申请实施例的图数据库测试系统,根据目标业务场景需求,生成满足目标业务场景的图数据;确定待测试图数据库的测试类型为查询分析测试类型;根据预先设定的测试需求生成对应的图检索语法;根据满足目标业务场景的图数据,生成对应图检索语法的具体请求内容,并将对应图检索语法的具体请求内容作为适用于查询分析测试类型的测试数据;根据适用于测试类型的测试数据,对待测试图数据库进行测试。即通过不同的业务场景需求动态生成满足不同业务场景的图数据,并基于满足不同业务场景的图数据对待测试图数据库进行测试,解决了现有技术中图数据测试的难题,实现了对图数据库进行测试的功能,并可以覆盖诸多场景的复杂关系,可以实现图数据库系统在不同场景下的表现差异,极大扩展了本申请实施例的测试方案的适用场景,提高了测试系统的复用度。According to the graph database testing system of the embodiment of the present application, graph data satisfying the target business scenario is generated according to the requirements of the target business scenario; the test type of the graph database to be tested is determined as the query analysis test type; and the corresponding test requirements are generated according to the preset test requirements. Graph retrieval syntax; according to the graph data satisfying the target business scenario, generate the specific request content corresponding to the graph retrieval syntax, and use the specific request content corresponding to the graph retrieval syntax as the test data suitable for the query analysis test type; Test data, to be tested against the test graph database. That is, the graph data that meets different business scenarios is dynamically generated through the requirements of different business scenarios, and the graph database to be tested is tested based on the graph data that meets different business scenarios, which solves the problem of graph data testing in the prior art and realizes the graph database. The test function can cover the complex relationship of many scenarios, and can realize the performance difference of the graph database system in different scenarios, greatly expand the applicable scenarios of the test solution of the embodiment of the present application, and improve the reusability of the test system. .

为了实现上述实施例,本申请实施例还提出一种基于图数据库测试方法的设备,图11为本申请实施例提供的基于图数据库测试方法的设备结构示意图。该基于图数据库测试方法的设备包括:存储器1001、处理器1002及存储在存储器1001上并可在处理器1002上运行的计算机程序。In order to realize the above-mentioned embodiment, the embodiment of the present application further proposes a device based on the graph database test method, and FIG. 11 is a schematic structural diagram of the device based on the graph database test method provided by the embodiment of the present application. The apparatus based on the graph database testing method includes: a memory 1001 , a processor 1002 and a computer program stored in the memory 1001 and running on the processor 1002 .

处理器1002执行所述程序时实现上述实施例中提供的图数据库测试方法。When the processor 1002 executes the program, the graph database testing method provided in the above embodiment is implemented.

进一步地,基于图数据库测试方法的设备还包括:Further, the equipment based on the graph database testing method also includes:

通信接口1003,用于存储器1001和处理器1002之间的通信。The communication interface 1003 is used for communication between the memory 1001 and the processor 1002 .

存储器1001,用于存放可在处理器1002上运行的计算机程序。The memory 1001 is used to store computer programs that can be executed on the processor 1002 .

存储器1001可能包含高速RAM存储器,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。The memory 1001 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk memory.

处理器1002,用于执行所述程序时实现上述实施例所述的图数据库测试方法。The processor 1002 is configured to implement the graph database testing method described in the foregoing embodiment when executing the program.

如果存储器1001、处理器1002和通信接口1003独立实现,则通信接口1003、存储器1001和处理器1002可以通过总线相互连接并完成相互间的通信。所述总线可以是工业标准体系结构(Industry Standard Architecture,简称为ISA)总线、外部设备互连(Peripheral Component,简称为PCI)总线或扩展工业标准体系结构(Extended IndustryStandard Architecture,简称为EISA)总线等。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图11中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。If the memory 1001, the processor 1002 and the communication interface 1003 are independently implemented, the communication interface 1003, the memory 1001 and the processor 1002 can be connected to each other through a bus and complete communication with each other. The bus may be an Industry Standard Architecture (referred to as ISA) bus, a Peripheral Component (referred to as PCI) bus, or an Extended Industry Standard Architecture (referred to as EISA) bus, etc. . The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of presentation, only one thick line is used in FIG. 11, but it does not mean that there is only one bus or one type of bus.

可选的,在具体实现上,如果存储器1001、处理器1002及通信接口1003,集成在一块芯片上实现,则存储器1001、处理器1002及通信接口1003可以通过内部接口完成相互间的通信。Optionally, in terms of specific implementation, if the memory 1001, the processor 1002 and the communication interface 1003 are integrated on one chip, the memory 1001, the processor 1002 and the communication interface 1003 can communicate with each other through an internal interface.

处理器1002可能是一个中央处理器(Central Processing Unit,简称为CPU),或者是特定集成电路(Application Specific Integrated Circuit,简称为ASIC),或者是被配置成实施本申请实施例的一个或多个集成电路。The processor 1002 may be a central processing unit (Central Processing Unit, referred to as CPU), or a specific integrated circuit (Application Specific Integrated Circuit, referred to as ASIC), or is configured to implement one or more of the embodiments of the present application integrated circuit.

为了实现上述实施例,本申请还提出一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现本申请实施例所述的图数据库测试方法。In order to implement the above embodiments, the present application further provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, implements the graph database testing method described in the embodiments of the present application.

在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本申请的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不必须针对的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任一个或多个实施例或示例中以合适的方式结合。此外,在不相互矛盾的情况下,本领域的技术人员可以将本说明书中描述的不同实施例或示例以及不同实施例或示例的特征进行结合和组合。In the description of this specification, description with reference to the terms "one embodiment," "some embodiments," "example," "specific example," or "some examples", etc., mean specific features described in connection with the embodiment or example , structure, material or feature is included in at least one embodiment or example of the present application. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, those skilled in the art may combine and combine the different embodiments or examples described in this specification, as well as the features of the different embodiments or examples, without conflicting each other.

此外,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。在本申请的描述中,“多个”的含义是至少两个,例如两个,三个等,除非另有明确具体的限定。In addition, the terms "first" and "second" are only used for descriptive purposes, and should not be construed as indicating or implying relative importance or implying the number of indicated technical features. Thus, a feature delimited with "first", "second" may expressly or implicitly include at least one of that feature. In the description of the present application, "plurality" means at least two, such as two, three, etc., unless expressly and specifically defined otherwise.

流程图中或在此以其他方式描述的任何过程或方法描述可以被理解为,表示包括一个或更多个用于实现定制逻辑功能或过程的步骤的可执行指令的代码的模块、片段或部分,并且本申请的优选实施方式的范围包括另外的实现,其中可以不按所示出或讨论的顺序,包括根据所涉及的功能按基本同时的方式或按相反的顺序,来执行功能,这应被本申请的实施例所属技术领域的技术人员所理解。Any process or method description in the flowcharts or otherwise described herein may be understood to represent a module, segment or portion of code comprising one or more executable instructions for implementing custom logical functions or steps of the process , and the scope of the preferred embodiments of the present application includes alternative implementations in which the functions may be performed out of the order shown or discussed, including performing the functions substantially concurrently or in the reverse order depending upon the functions involved, which should It is understood by those skilled in the art to which the embodiments of the present application belong.

在流程图中表示或在此以其他方式描述的逻辑和/或步骤,例如,可以被认为是用于实现逻辑功能的可执行指令的定序列表,可以具体实现在任何计算机可读介质中,以供指令执行系统、装置或设备(如基于计算机的系统、包括处理器的系统或其他可以从指令执行系统、装置或设备取指令并执行指令的系统)使用,或结合这些指令执行系统、装置或设备而使用。就本说明书而言,"计算机可读介质"可以是任何可以包含、存储、通信、传播或传输程序以供指令执行系统、装置或设备或结合这些指令执行系统、装置或设备而使用的装置。计算机可读介质的更具体的示例(非穷尽性列表)包括以下:具有一个或多个布线的电连接部(电子装置),便携式计算机盘盒(磁装置),随机存取存储器(RAM),只读存储器(ROM),可擦除可编辑只读存储器(EPROM或闪速存储器),光纤装置,以及便携式光盘只读存储器(CDROM)。另外,计算机可读介质甚至可以是可在其上打印所述程序的纸或其他合适的介质,因为可以例如通过对纸或其他介质进行光学扫描,接着进行编辑、解译或必要时以其他合适方式进行处理来以电子方式获得所述程序,然后将其存储在计算机存储器中。The logic and/or steps represented in flowcharts or otherwise described herein, for example, may be considered an ordered listing of executable instructions for implementing the logical functions, may be embodied in any computer-readable medium, For use with, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other system that can fetch instructions from and execute instructions from an instruction execution system, apparatus, or apparatus) or equipment. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport the program for use by or in connection with an instruction execution system, apparatus, or apparatus. More specific examples (non-exhaustive list) of computer readable media include the following: electrical connections with one or more wiring (electronic devices), portable computer disk cartridges (magnetic devices), random access memory (RAM), Read Only Memory (ROM), Erasable Editable Read Only Memory (EPROM or Flash Memory), Fiber Optic Devices, and Portable Compact Disc Read Only Memory (CDROM). In addition, the computer readable medium may even be paper or other suitable medium on which the program may be printed, as the paper or other medium may be optically scanned, for example, followed by editing, interpretation, or other suitable medium as necessary process to obtain the program electronically and then store it in computer memory.

应当理解,本申请的各部分可以用硬件、软件、固件或它们的组合来实现。在上述实施方式中,多个步骤或方法可以用存储在存储器中且由合适的指令执行系统执行的软件或固件来实现。如,如果用硬件来实现和在另一实施方式中一样,可用本领域公知的下列技术中的任一项或他们的组合来实现:具有用于对数据信号实现逻辑功能的逻辑门电路的离散逻辑电路,具有合适的组合逻辑门电路的专用集成电路,可编程门阵列(PGA),现场可编程门阵列(FPGA)等。It should be understood that various parts of this application may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented by any one of the following techniques known in the art, or a combination thereof: discrete with logic gates for implementing logic functions on data signals Logic circuits, application specific integrated circuits with suitable combinational logic gates, Programmable Gate Arrays (PGA), Field Programmable Gate Arrays (FPGA), etc.

本技术领域的普通技术人员可以理解实现上述实施例方法携带的全部或部分步骤是可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,该程序在执行时,包括方法实施例的步骤之一或其组合。Those skilled in the art can understand that all or part of the steps carried by the methods of the above embodiments can be completed by instructing the relevant hardware through a program, and the program can be stored in a computer-readable storage medium, and the program can be stored in a computer-readable storage medium. When executed, one or a combination of the steps of the method embodiment is included.

此外,在本申请各个实施例中的各功能单元可以集成在一个处理模块中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。In addition, each functional unit in each embodiment of the present application may be integrated into one processing module, or each unit may exist physically alone, or two or more units may be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware, and can also be implemented in the form of software function modules. If the integrated modules are implemented in the form of software functional modules and sold or used as independent products, they may also be stored in a computer-readable storage medium.

上述提到的存储介质可以是只读存储器,磁盘或光盘等。尽管上面已经示出和描述了本申请的实施例,可以理解的是,上述实施例是示例性的,不能理解为对本申请的限制,本领域的普通技术人员在本申请的范围内可以对上述实施例进行变化、修改、替换和变型。The above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, and the like. Although the embodiments of the present application have been shown and described above, it should be understood that the above embodiments are exemplary and should not be construed as limitations to the present application. Embodiments are subject to variations, modifications, substitutions and variations.

Claims (19)

1.一种图数据库测试方法,其特征在于,包括:1. a graph database testing method, is characterized in that, comprises: 根据目标业务场景需求,生成满足所述目标业务场景的图数据;According to the requirements of the target business scenario, graph data satisfying the target business scenario is generated; 确定针对待测试图数据库的测试类型;Determine the test type for the graph database to be tested; 根据所述测试类型和所述满足所述目标业务场景的图数据,生成适用于所述测试类型的测试数据;generating test data suitable for the test type according to the test type and the graph data satisfying the target business scenario; 根据所述适用于所述测试类型的测试数据,对所述待测试图数据库进行测试。According to the test data suitable for the test type, test the to-be-tested graph database. 2.根据权利要求1所述的图数据库测试方法,其特征在于,所述根据目标业务场景需求,生成满足所述目标业务场景的图数据,包括:2. The graph database testing method according to claim 1, wherein generating graph data satisfying the target business scenario according to the requirements of the target business scenario, comprising: 根据所述目标业务场景需求,获取用于生成所述图数据所需的配置信息;其中,所述配置信息包括所述图数据中实体数据模式定义信息、每类实体的规模定义信息、故事情景模板的定义信息和关系密度设置信息;According to the requirements of the target business scenario, the configuration information required for generating the graph data is obtained; wherein, the configuration information includes entity data schema definition information in the graph data, scale definition information of each type of entity, and story scenarios Template definition information and relationship density setting information; 根据所述配置信息中的所述实体数据模式定义信息和每类实体的规模定义信息,生成实体数据信息;generating entity data information according to the entity data schema definition information and the scale definition information of each type of entity in the configuration information; 根据所述故事情景模板的定义信息、所述关系密度设置信息和所述实体数据信息,将所述故事情景模板对应的实例化成多条故事情景数据;According to the definition information of the story scenario template, the relationship density setting information and the entity data information, the corresponding instantiation of the story scenario template into multiple pieces of story scenario data; 确定所述故事情景模板中包含的关系,并根据所述故事情景模板中包含的关系,将所述多条故事情景数据解析成对应的关系数据,得到所述满足所述目标业务场景的图数据。Determine the relationship contained in the story scenario template, and parse the multiple pieces of story scenario data into corresponding relationship data according to the relationship contained in the story scenario template, and obtain the graph data that satisfies the target business scenario . 3.根据权利要求1所述的图数据库测试方法,其特征在于,所述测试类型包括存储测试类型和查询分析测试类型。3 . The graph database testing method according to claim 1 , wherein the test types include storage test types and query analysis test types. 4 . 4.根据权利要求3所述的图数据库测试方法,其特征在于,当所述测试类型为存储测试类型时,所述根据所述测试类型和所述满足所述目标业务场景的图数据,生成适用于所述测试类型的测试数据,包括:4. The graph database testing method according to claim 3, wherein when the test type is a storage test type, the graph data that satisfies the target business scenario is generated according to the test type and the graph data. Test data applicable to the described test types, including: 确定所述待测试图数据库所支持的数据输入格式;Determine the data input format supported by the to-be-tested graph database; 根据所述待测试图数据库所支持的数据输入格式,对所述满足所述目标业务场景的图数据进行数据预处理,生成适用于所述存储测试类型的测试数据。According to the data input format supported by the to-be-tested graph database, data preprocessing is performed on the graph data satisfying the target business scenario to generate test data suitable for the storage test type. 5.根据权利要求3所述的图数据库测试方法,其特征在于,当所述测试类型为查询分析测试类型时,所述根据所述测试类型和所述满足所述目标业务场景的图数据,生成适用于所述测试类型的测试数据,包括:5. The graph database testing method according to claim 3, wherein when the test type is a query analysis test type, the graph data satisfying the target business scenario according to the test type, Generate test data suitable for the described test types, including: 根据预先设定的测试需求生成对应的图检索语法;Generate the corresponding graph retrieval grammar according to the preset test requirements; 根据所述满足所述目标业务场景的图数据,生成对应图检索语法的具体请求内容,并将所述对应图检索语法的具体请求内容作为适用于所述查询分析测试类型的测试数据。According to the graph data satisfying the target business scenario, specific request content corresponding to the graph retrieval syntax is generated, and the specific request content corresponding to the graph retrieval syntax is used as test data suitable for the query analysis test type. 6.根据权利要求1至5中任一项所述的图数据库测试方法,其特征在于,还包括:6. The graph database testing method according to any one of claims 1 to 5, characterized in that, further comprising: 在完成对所述待测试图数据库的测试时,收集本次测试所产生的指标数据。When the test of the graph database to be tested is completed, the indicator data generated by this test is collected. 7.根据权利要求6所述的图数据库测试方法,其特征在于,还包括:7. graph database testing method according to claim 6, is characterized in that, also comprises: 在对所述待测试图数据库进行测试的过程中,收集所述待测试图数据库所在服务器的环境数据信息。During the process of testing the graph database to be tested, the environment data information of the server where the graph database to be tested is located is collected. 8.根据权利要求7所述的图数据库测试方法,其特征在于,还包括:8. graph database testing method according to claim 7, is characterized in that, also comprises: 根据收集到的所述本次测试所产生的指标数据和所述环境数据信息,生成针对所述待测试图数据库的测试结果,并输出所述测试结果。According to the collected indicator data and the environmental data information generated by the current test, a test result for the to-be-tested graph database is generated, and the test result is output. 9.根据权利要求1所述的图数据库测试方法,其特征在于,所述根据所述适用于所述测试类型的测试数据,对所述待测试图数据库进行测试,包括:9. The graph database testing method according to claim 1, wherein the testing the graph database to be tested according to the test data applicable to the test type, comprising: 确定针对所述待测试图数据库的适配应用程序接口;determining an adaptation API for the graph database to be tested; 根据所述适用于所述测试类型的测试数据,通过所述适配应用程序接口对所述待测试图数据库进行测试。According to the test data suitable for the test type, test the graph database to be tested through the adaptation application program interface. 10.一种图数据库测试系统,其特征在于,包括:10. A graph database testing system, comprising: 图数据生成模块,用于根据目标业务场景需求,生成满足所述目标业务场景的图数据;A graph data generation module, configured to generate graph data satisfying the target business scenario according to the requirements of the target business scenario; 图数据库测试模块,用于确定针对待测试图数据库的测试类型,并根据所述测试类型和所述满足所述目标业务场景的图数据,生成适用于所述测试类型的测试数据,以及根据所述适用于所述测试类型的测试数据,对所述待测试图数据库进行测试。The graph database testing module is used to determine the test type for the graph database to be tested, and generate test data suitable for the test type according to the test type and the graph data that meets the target business scenario, and The test data applicable to the test type described above is used to test the to-be-tested graph database. 11.根据权利要求10所述的图数据库测试系统,其特征在于,所述图数据生成模块具体用于:11. The graph database testing system according to claim 10, wherein the graph data generation module is specifically used for: 根据所述目标业务场景需求,获取用于生成所述图数据所需的配置信息;其中,所述配置信息包括所述图数据中实体数据模式定义信息、每类实体的规模定义信息、故事情景模板的定义信息和关系密度设置信息;According to the requirements of the target business scenario, the configuration information required for generating the graph data is obtained; wherein, the configuration information includes entity data schema definition information in the graph data, scale definition information of each type of entity, and story scenarios Template definition information and relationship density setting information; 根据所述配置信息中的所述实体数据模式定义信息和每类实体的规模定义信息,生成实体数据信息;generating entity data information according to the entity data schema definition information and the scale definition information of each type of entity in the configuration information; 根据所述故事情景模板的定义信息、所述关系密度设置信息和所述实体数据信息,将所述故事情景模板对应的实例化成多条故事情景数据;According to the definition information of the story scenario template, the relationship density setting information and the entity data information, the corresponding instantiation of the story scenario template into multiple pieces of story scenario data; 确定所述故事情景模板中包含的关系,并根据所述故事情景模板中包含的关系,将所述多条故事情景数据解析成对应的关系数据,得到所述满足所述目标业务场景的图数据。Determine the relationship contained in the story scenario template, and parse the multiple pieces of story scenario data into corresponding relationship data according to the relationship contained in the story scenario template, and obtain the graph data that satisfies the target business scenario . 12.根据权利要求10所述的图数据库测试系统,其特征在于,所述测试类型包括存储测试类型和查询分析测试类型。12 . The graph database testing system according to claim 10 , wherein the test types include storage test types and query analysis test types. 13 . 13.根据权利要求12所述的图数据库测试系统,其特征在于,所述图数据库测试模块包括:13. The graph database testing system according to claim 12, wherein the graph database testing module comprises: 图存储测试单元,用于确定所述待测试图数据库所支持的数据输入格式,并根据所述待测试图数据库所支持的数据输入格式,对所述满足所述目标业务场景的图数据进行数据预处理,生成适用于所述存储测试类型的测试数据,并根据所述适用于所述存储测试类型的测试数据对所述待测试图数据库进行测试;The graph storage testing unit is used to determine the data input format supported by the graph database to be tested, and perform data analysis on the graph data that meets the target business scenario according to the data input format supported by the graph database to be tested. preprocessing, generating test data suitable for the storage test type, and testing the graph database to be tested according to the test data suitable for the storage test type; 图查询分析测试单元,用于根据预先设定的测试需求生成对应的图检索语法,并根据所述满足所述目标业务场景的图数据,生成对应图检索语法的具体请求内容,并将所述对应图检索语法的具体请求内容作为适用于所述查询分析测试类型的测试数据,并根据所述适用于所述查询分析测试类型的测试数据,对所述待测试图数据库进行测试。The graph query analysis and testing unit is used to generate the corresponding graph retrieval syntax according to the preset test requirements, and generate the specific request content corresponding to the graph retrieval syntax according to the graph data satisfying the target business scenario, and use the The specific request content corresponding to the graph retrieval syntax is used as the test data suitable for the query analysis test type, and the graph database to be tested is tested according to the test data suitable for the query analysis test type. 14.根据权利要求10至13中任一项所述的图数据库测试系统,其特征在于,还包括:14. The graph database testing system according to any one of claims 10 to 13, characterized in that, further comprising: 指标数据收集模块,用于在完成对所述待测试图数据库的测试时,收集本次测试所产生的指标数据。The index data collection module is configured to collect the index data generated by this test when the test of the graph database to be tested is completed. 15.根据权利要求14所述的图数据库测试系统,其特征在于,还包括:15. The graph database testing system according to claim 14, further comprising: 环境数据信息监控模块,用于在对所述待测试图数据库进行测试的过程中,收集所述待测试图数据库所在服务器的环境数据信息。The environmental data information monitoring module is used for collecting environmental data information of the server where the to-be-tested graph database is located in the process of testing the to-be-tested graph database. 16.根据权利要求15所述的图数据库测试系统,其特征在于,还包括:16. The graph database testing system according to claim 15, further comprising: 测试结果生成模块,用于根据收集到的所述本次测试所产生的指标数据和所述环境数据信息,生成针对所述待测试图数据库的测试结果,并输出所述测试结果。The test result generation module is configured to generate a test result for the to-be-tested graph database according to the collected index data and the environment data information generated by the current test, and output the test result. 17.根据权利要求10所述的图数据库测试系统,其特征在于,还包括:图数据库系统接入模块;所述图数据库系统接入模块具有多种图数据库的适配应用程序接口;17. The graph database testing system according to claim 10, further comprising: a graph database system access module; the graph database system access module has an adaptation application program interface for multiple graph databases; 其中,所述图数据库测试模块具体用于:确定针对所述待测试图数据库的适配应用程序接口,并根据所述适用于所述测试类型的测试数据,通过所述适配应用程序接口对所述待测试图数据库进行测试。Wherein, the graph database testing module is specifically used for: determining an adaptation application program interface for the graph database to be tested, and, according to the test data applicable to the test type, through the adaptation application program interface The to-be-tested graph database is tested. 18.一种基于图数据库测试方法的设备,其特征在于,包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时,实现如权利要求1至9中任一项所述的图数据库测试方法。18. A device based on a graph database testing method, characterized in that it comprises: a memory, a processor, and a computer program stored on the memory and running on the processor, the processor executing the computer When the program is executed, the graph database testing method according to any one of claims 1 to 9 is realized. 19.一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至9中任一项所述的图数据库测试方法。19. A computer-readable storage medium on which a computer program is stored, characterized in that, when the computer program is executed by a processor, the graph database testing method according to any one of claims 1 to 9 is implemented.
CN201910709047.8A 2019-08-01 2019-08-01 Graph database testing method, system, device and storage medium Active CN110554958B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910709047.8A CN110554958B (en) 2019-08-01 2019-08-01 Graph database testing method, system, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910709047.8A CN110554958B (en) 2019-08-01 2019-08-01 Graph database testing method, system, device and storage medium

Publications (2)

Publication Number Publication Date
CN110554958A true CN110554958A (en) 2019-12-10
CN110554958B CN110554958B (en) 2023-04-04

Family

ID=68736839

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910709047.8A Active CN110554958B (en) 2019-08-01 2019-08-01 Graph database testing method, system, device and storage medium

Country Status (1)

Country Link
CN (1) CN110554958B (en)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111259205A (en) * 2020-01-15 2020-06-09 北京百度网讯科技有限公司 Graph database traversal method, device, equipment and storage medium
CN111679990A (en) * 2020-06-17 2020-09-18 北京字节跳动网络技术有限公司 Test data generation method and device, readable medium and electronic equipment
CN111858506A (en) * 2020-06-30 2020-10-30 北京百度网讯科技有限公司 Test data processing method, device, electronic device and storage medium
CN112015645A (en) * 2020-08-27 2020-12-01 云账户技术(天津)有限公司 Function test method and device of web system and electronic equipment
CN112073709A (en) * 2020-07-27 2020-12-11 武汉旷视金智科技有限公司 Test data generation method and device and electronic equipment
CN112181816A (en) * 2020-09-22 2021-01-05 建信金融科技有限责任公司 Interface testing method and device based on scene, computer equipment and medium
CN112256587A (en) * 2020-11-10 2021-01-22 恩亿科(北京)数据科技有限公司 Data testing method and device based on SCRM system, electronic equipment and storage medium
CN112380167A (en) * 2020-11-17 2021-02-19 深圳市和讯华谷信息技术有限公司 Batch data verification method and device, computer equipment and storage medium
CN112882956A (en) * 2021-03-30 2021-06-01 中信银行股份有限公司 Method and device for automatically generating full-scene automatic test case through data combination calculation, storage medium and electronic equipment
CN113656315A (en) * 2021-08-19 2021-11-16 北京百度网讯科技有限公司 Data testing method and device, electronic equipment and storage medium
CN113919883A (en) * 2021-10-25 2022-01-11 中国联合网络通信集团有限公司 Data generation method, device, device and storage medium
CN114090414A (en) * 2020-08-24 2022-02-25 阿里巴巴集团控股有限公司 Data processing system and method, data testing system, data system
CN114185789A (en) * 2021-12-13 2022-03-15 中国农业银行股份有限公司 A test method, device, computer equipment and storage medium
CN114218112A (en) * 2021-12-20 2022-03-22 建信金融科技有限责任公司 A distributed database non-functional testing method and system
CN115237772A (en) * 2022-07-22 2022-10-25 中国银行股份有限公司 Test data generation method and device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103425578A (en) * 2012-05-18 2013-12-04 日立汽车系统株式会社 Test support system, test support method, method and program for testing support
CN103729361A (en) * 2012-10-12 2014-04-16 百度在线网络技术(北京)有限公司 Method and device for testing performance of database
CN105224458A (en) * 2015-10-09 2016-01-06 上海瀚银信息技术有限公司 A kind of database method of testing and system
US20180089252A1 (en) * 2016-09-28 2018-03-29 Linkedin Corporation Verifying correctness in graph databases
CN107894953A (en) * 2017-11-21 2018-04-10 中国银行股份有限公司 A kind of generation method and device of Bank application test data
CN109254909A (en) * 2018-08-06 2019-01-22 四川蜀天梦图数据科技有限公司 A kind of test big drawing generating method and system
CN109800147A (en) * 2018-12-14 2019-05-24 平安普惠企业管理有限公司 A kind of test cases generation method and terminal device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103425578A (en) * 2012-05-18 2013-12-04 日立汽车系统株式会社 Test support system, test support method, method and program for testing support
CN103729361A (en) * 2012-10-12 2014-04-16 百度在线网络技术(北京)有限公司 Method and device for testing performance of database
CN105224458A (en) * 2015-10-09 2016-01-06 上海瀚银信息技术有限公司 A kind of database method of testing and system
US20180089252A1 (en) * 2016-09-28 2018-03-29 Linkedin Corporation Verifying correctness in graph databases
CN107894953A (en) * 2017-11-21 2018-04-10 中国银行股份有限公司 A kind of generation method and device of Bank application test data
CN109254909A (en) * 2018-08-06 2019-01-22 四川蜀天梦图数据科技有限公司 A kind of test big drawing generating method and system
CN109800147A (en) * 2018-12-14 2019-05-24 平安普惠企业管理有限公司 A kind of test cases generation method and terminal device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
RAQUEL BLANCO 等: ""Modelling Test Views for Graph Database Applications"", 《IEEE LATIN AMERICA TRANSACTIONS》 *
吕冰清: ""大规模图数据库中的模式查询算法研究"", 《中国博士学位论文全文数据库信息科技辑》 *
德哥: ""使用facebook linkbench 测试PostgreSQL社交关系图谱场景性能"", 《HTTPS://DEVELOPER.ALIYUN.COM/ARTICLE/60731》 *

Cited By (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111259205A (en) * 2020-01-15 2020-06-09 北京百度网讯科技有限公司 Graph database traversal method, device, equipment and storage medium
CN111259205B (en) * 2020-01-15 2023-10-20 北京百度网讯科技有限公司 Graph database traversal method, device, equipment and storage medium
CN111679990A (en) * 2020-06-17 2020-09-18 北京字节跳动网络技术有限公司 Test data generation method and device, readable medium and electronic equipment
CN111679990B (en) * 2020-06-17 2023-08-08 北京字节跳动网络技术有限公司 Test data generation method and device, readable medium and electronic equipment
CN111858506A (en) * 2020-06-30 2020-10-30 北京百度网讯科技有限公司 Test data processing method, device, electronic device and storage medium
CN111858506B (en) * 2020-06-30 2024-03-22 北京百度网讯科技有限公司 Test data processing methods, devices, electronic equipment and storage media
CN112073709A (en) * 2020-07-27 2020-12-11 武汉旷视金智科技有限公司 Test data generation method and device and electronic equipment
CN112073709B (en) * 2020-07-27 2023-04-14 武汉旷视金智科技有限公司 Test data generation method and device and electronic equipment
CN114090414A (en) * 2020-08-24 2022-02-25 阿里巴巴集团控股有限公司 Data processing system and method, data testing system, data system
CN114090414B (en) * 2020-08-24 2025-01-10 阿里巴巴集团控股有限公司 Data processing system and method, data testing system, data system
CN112015645A (en) * 2020-08-27 2020-12-01 云账户技术(天津)有限公司 Function test method and device of web system and electronic equipment
CN112181816A (en) * 2020-09-22 2021-01-05 建信金融科技有限责任公司 Interface testing method and device based on scene, computer equipment and medium
CN112181816B (en) * 2020-09-22 2023-06-02 建信金融科技有限责任公司 Scene-based interface testing method and device, computer equipment and medium
CN112256587A (en) * 2020-11-10 2021-01-22 恩亿科(北京)数据科技有限公司 Data testing method and device based on SCRM system, electronic equipment and storage medium
CN112380167A (en) * 2020-11-17 2021-02-19 深圳市和讯华谷信息技术有限公司 Batch data verification method and device, computer equipment and storage medium
CN112882956A (en) * 2021-03-30 2021-06-01 中信银行股份有限公司 Method and device for automatically generating full-scene automatic test case through data combination calculation, storage medium and electronic equipment
CN112882956B (en) * 2021-03-30 2024-04-16 中信银行股份有限公司 Method and device for automatically generating full-scene automatic test cases through data combination calculation, storage medium and electronic equipment
CN113656315A (en) * 2021-08-19 2021-11-16 北京百度网讯科技有限公司 Data testing method and device, electronic equipment and storage medium
CN113919883A (en) * 2021-10-25 2022-01-11 中国联合网络通信集团有限公司 Data generation method, device, device and storage medium
CN114185789A (en) * 2021-12-13 2022-03-15 中国农业银行股份有限公司 A test method, device, computer equipment and storage medium
CN114218112A (en) * 2021-12-20 2022-03-22 建信金融科技有限责任公司 A distributed database non-functional testing method and system
CN114218112B (en) * 2021-12-20 2024-12-10 建信金融科技有限责任公司 A distributed database non-functional testing method and system
CN115237772A (en) * 2022-07-22 2022-10-25 中国银行股份有限公司 Test data generation method and device

Also Published As

Publication number Publication date
CN110554958B (en) 2023-04-04

Similar Documents

Publication Publication Date Title
CN110554958A (en) Graph database testing method, system, device and storage medium
CN112559525B (en) Data checking system, method, device and server
CN113010489B (en) Data migration method and system
CN112445692B (en) A use case testing method and terminal
WO2023065847A1 (en) Computational logic processing method, electronic device, and readable storage medium
CN115686467A (en) Type inference in dynamic languages
CN113360300B (en) Interface call link generation method, device, equipment and readable storage medium
CN113742231A (en) Protobuf protocol dynamic analysis-based number making method and device
CN114880176A (en) A kind of aviation data conversion unit testing system, method and device
CN116016270A (en) A switch test management method, device, electronic equipment and storage medium
CN116911240A (en) Command configuration method, device, equipment and media for electronic automation design software
US10073938B2 (en) Integrated circuit design verification
CN116644078A (en) Data quality inspection method, inspection device, inspection equipment and storage medium
CN112416333A (en) Software model training method, apparatus, system, equipment and storage medium
CN115617819A (en) Data storage method, system, computer device and storage medium
CN118051779B (en) Automatic parameter search method, device and electronic device for large model training
CN118733313A (en) A method of error handling in parallel programming
CN112685316A (en) Code execution path acquisition method and device, computer equipment and storage medium
CN117235527A (en) End-to-end containerized big data model construction method, device, equipment and media
US12093686B2 (en) Code maintenance system
CN116401113A (en) Environment verification method, device and medium for heterogeneous many-core architecture acceleration card
CN115185577A (en) Data service configuration system, method, electronic device and storage medium
CN116701175A (en) GDS system read and write performance test method, device and electronic equipment of server
CN114117915A (en) Model deployment method and device and electronic equipment
CN114168456A (en) Front-end performance automatic testing method based on 3D-GIS

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