CN113836018B - A test environment configuration parameter backup method and related device - Google Patents

A test environment configuration parameter backup method and related device Download PDF

Info

Publication number
CN113836018B
CN113836018B CN202111120272.1A CN202111120272A CN113836018B CN 113836018 B CN113836018 B CN 113836018B CN 202111120272 A CN202111120272 A CN 202111120272A CN 113836018 B CN113836018 B CN 113836018B
Authority
CN
China
Prior art keywords
feature code
parameter item
feature
value
value range
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111120272.1A
Other languages
Chinese (zh)
Other versions
CN113836018A (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.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
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 China Construction Bank Corp filed Critical China Construction Bank Corp
Priority to CN202111120272.1A priority Critical patent/CN113836018B/en
Publication of CN113836018A publication Critical patent/CN113836018A/en
Application granted granted Critical
Publication of CN113836018B publication Critical patent/CN113836018B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3698Environments for analysis, debugging or testing of software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a backup method and a related device for configuration parameters of a test environment, which can obtain the test environment to be backed up, wherein the test environment comprises the following steps: operating system resources, basic software resources, application installation package resources, general operation and maintenance monitoring tool resources and test data resources; respectively extracting the multi-dimensional feature codes of the configuration parameter items of each resource according to a pre-established feature code extraction rule so as to respectively obtain at least one feature code combination corresponding to each resource; determining a value range corresponding to the parameter item feature codes in each feature code combination according to a pre-established value rule; for any resource: compressing each feature code combination and each corresponding value range into at least one compressed feature code according to a pre-established compression rule; and storing each compression feature code to backup configuration parameter items of each resource of the test environment. The invention saves and records the configuration parameters of the test environment through the compressed feature codes, and occupies less storage resources.

Description

一种测试环境配置参数的备份方法及相关装置A test environment configuration parameter backup method and related device

技术领域Technical Field

本发明涉及测试领域,特别涉及一种测试环境配置参数的备份方法及相关装置。The present invention relates to the field of testing, and in particular to a method for backing up test environment configuration parameters and a related device.

背景技术Background technique

一个项目通常需要多套测试环境进行不同阶段测试,若各套环境长期保留备用,会造成资源浪费,因此要求测试环境能够按需、高效供给、回收,一方面要求测试环境具有快速部署能力,同时也要求测试环境在回收之前能够进行全方位的备份,为快速部署提供基础数据保障。A project usually requires multiple test environments for testing at different stages. If each environment is kept as a backup for a long time, it will cause a waste of resources. Therefore, the test environment must be able to be supplied and recycled on demand and efficiently. On the one hand, the test environment must have the ability to be deployed quickly, and on the other hand, the test environment must be able to perform a comprehensive backup before recycling to provide basic data protection for rapid deployment.

一套测试环境由操作系统资源、基础软件资源(如数据库、中间件、各领域开源产品)、应用安装包资源(包含应用版本信息)、通用运维监控工具资源(安装及配置)、测试数据资源等五个方面的配置、数据组成,因此在测试资源回收前,如有备份需求,需要对上述五类资源分别进行备份。目前,主要通过制作镜像的方式保存基本测试环境、通过数据归档保存测试数据,但这种方案需要占用大量的存储资源,比较消耗存储资源。A test environment consists of five aspects of configuration and data: operating system resources, basic software resources (such as databases, middleware, and open source products in various fields), application installation package resources (including application version information), general operation and maintenance monitoring tool resources (installation and configuration), and test data resources. Therefore, before the test resources are recycled, if there is a backup requirement, the above five types of resources need to be backed up separately. At present, the basic test environment is mainly saved by making images, and the test data is saved by data archiving, but this solution requires a large amount of storage resources and is relatively consuming.

发明内容Summary of the invention

鉴于上述问题,本发明提供一种克服上述问题或者至少部分地解决上述问题的一种测试环境配置参数的备份方法及相关装置。In view of the above problems, the present invention provides a method and related apparatus for backing up test environment configuration parameters that overcome the above problems or at least partially solve the above problems.

第一方面,一种测试环境配置参数的备份方法,包括:In a first aspect, a method for backing up test environment configuration parameters includes:

获得待备份的测试环境,所述测试环境包括:操作系统资源、基础软件资源、应用安装包资源、通用运维监控工具资源和测试数据资源;Obtaining a test environment to be backed up, the test environment including: operating system resources, basic software resources, application installation package resources, general operation and maintenance monitoring tool resources, and test data resources;

根据预先建立的特征码提取规则,对各所述资源的配置参数项分别进行多维度的特征码提取,以分别获得各所述资源对应的至少一个特征码组合,其中,所述配置参数项与特征码组合一一对应,每个所述特征码组合均包括:参数项特征码、参数项集合特征码和层次特征码,所述参数项集合特征码表征所述参数项特征码对应的所述配置参数项所在的参数项集合,所述层次特征码表征所述参数项集合所归属的所述资源;According to the pre-established feature code extraction rules, multi-dimensional feature code extraction is performed on the configuration parameter items of each resource to obtain at least one feature code combination corresponding to each resource, wherein the configuration parameter items correspond to the feature code combinations one by one, and each feature code combination includes: a parameter item feature code, a parameter item set feature code and a hierarchical feature code, wherein the parameter item set feature code represents the parameter item set to which the configuration parameter item corresponding to the parameter item feature code belongs, and the hierarchical feature code represents the resource to which the parameter item set belongs;

根据预先建立的取值规则,确定各所述特征码组合中的参数项特征码对应的取值范围;Determine the value range corresponding to the parameter item feature code in each feature code combination according to the pre-established value selection rule;

对于任一所述资源:按照预先建立的压缩规则,将各所述特征码组合和相应的各所述取值范围压缩成至少一个压缩特征码,其中,同一个所述压缩特征码在进行压缩的过程中所使用的各所述取值范围不重复,所述压缩特征码至少包括特征码部分和取值范围部分,所述特征码部分为所述压缩特征码在进行压缩的过程中所使用的各所述特征码组合的集合,所述取值范围部分为所述压缩特征码在进行压缩的过程中所使用的各所述取值范围的集合;For any of the resources: according to a pre-established compression rule, compress each of the feature code combinations and the corresponding value ranges into at least one compressed feature code, wherein the value ranges used by the same compressed feature code in the process of compression are not repeated, and the compressed feature code at least includes a feature code part and a value range part, the feature code part is a set of the feature code combinations used by the compressed feature code in the process of compression, and the value range part is a set of the value ranges used by the compressed feature code in the process of compression;

将各所述压缩特征码进行存储,以备份所述测试环境的各所述资源的配置参数项。Each of the compressed feature codes is stored to back up the configuration parameter items of each of the resources in the test environment.

结合第一方面,在某些可选的实施方式中,所述特征码提取规则,包括:In combination with the first aspect, in some optional implementations, the feature code extraction rule includes:

对于任一测试环境,均按照操作系统资源、基础软件资源、应用安装包资源、通用运维监控工具资源和测试数据资源五个层次进行层次特征码的划分,不同的所述资源对应的所述层次特征码均不相同;For any test environment, hierarchical feature codes are divided into five levels: operating system resources, basic software resources, application installation package resources, general operation and maintenance monitoring tool resources, and test data resources. Different resources correspond to different hierarchical feature codes.

其中,所述操作系统资源对应第一层次特征码;Wherein, the operating system resource corresponds to the first level feature code;

所述基础软件资源对应第二层次特征码;The basic software resources correspond to the second-level feature code;

所述应用安装包资源对应第三层次特征码;The application installation package resource corresponds to the third level feature code;

所述通用运维监控工具资源对应第四层次特征码;The general operation and maintenance monitoring tool resource corresponds to the fourth level feature code;

所述测试数据资源对应第五层次特征码;The test data resource corresponds to the fifth level feature code;

对于任一所述资源,均按照不同的所述参数项集合对应不同的所述参数项集合特征码进行参数项集合特征码的划分;For any of the resources, parameter item set feature codes are divided according to different parameter item sets corresponding to different parameter item set feature codes;

其中,第一类参数项集合对应第一参数项集合特征码;The first type of parameter item set corresponds to the first parameter item set feature code;

第二类参数项集合对应第二参数项集合特征码;The second type of parameter item set corresponds to the second parameter item set feature code;

第三类参数项集合对应第三参数项集合特征码,以此类推;The third type of parameter item set corresponds to the third parameter item set feature code, and so on;

对于任一所述参数项集合,均按照不同的所述参数项对应不同的所述参数项特征进行划分;For any set of parameter items, the parameter items are divided according to different parameter items corresponding to different parameter item features;

其中,第一参数项对应第一参数项特征码;Wherein, the first parameter item corresponds to the first parameter item feature code;

第二参数项对应第二参数项特征码;The second parameter item corresponds to the second parameter item feature code;

第三参数项对应第三参数项特征码,以此类推。The third parameter item corresponds to the third parameter item feature code, and so on.

结合第一方面,在某些可选的实施方式中,所述根据预先建立的取值规则,确定各所述特征码组合中的参数项特征码对应的取值范围,包括:In combination with the first aspect, in some optional implementations, determining the value range corresponding to the parameter item feature code in each feature code combination according to a pre-established value rule includes:

查询预先建立的取值对照表,从而查询获得各所述特征码组合中的参数项特征码对应的取值范围,其中,所述取值对照表记录各所述参数项特征码对应的取值范围。A pre-established value comparison table is queried to obtain the value range corresponding to the parameter item feature code in each of the feature code combinations, wherein the value comparison table records the value range corresponding to each of the parameter item feature codes.

结合第一方面,在某些可选的实施方式中,所述根据预先建立的取值规则,确定各所述特征码组合中的参数项特征码对应的取值范围,包括:In conjunction with the first aspect, in some optional implementations, determining the value range corresponding to the parameter item feature code in each feature code combination according to a pre-established value rule includes:

根据预先建立的取值计算公式,计算得到各所述特征码组合中的参数项特征码对应的取值范围,其中,所述取值计算公式与所述参数项特征码相匹配。The value range corresponding to the parameter item feature code in each feature code combination is calculated according to a pre-established value calculation formula, wherein the value calculation formula matches the parameter item feature code.

结合第一方面,在某些可选的实施方式中,所述按照预先建立的压缩规则,将各所述特征码组合和相应的各所述取值范围压缩成至少一个压缩特征码,包括:In combination with the first aspect, in some optional implementations, compressing each of the feature code combinations and the corresponding value ranges into at least one compressed feature code according to a pre-established compression rule includes:

若各所述取值范围均不重复,则将各所述特征码组合和相应的各所述取值范围划分为N组,其中,每组均包括至少一对:所述特征码组合和相应的所述取值范围,所述N为大于0的整数;If the value ranges are not repeated, the feature code combinations and the corresponding value ranges are divided into N groups, wherein each group includes at least one pair: the feature code combination and the corresponding value range, and N is an integer greater than 0;

对于每一组:将所包括的所述特征码组合和相应的所述取值范围压缩成一个所述压缩特征码。For each group: compress the included feature code combination and the corresponding value range into one compressed feature code.

结合第一方面,在某些可选的实施方式中,所述按照预先建立的压缩规则,将各所述特征码组合和相应的各所述取值范围压缩成至少一个压缩特征码,包括:In combination with the first aspect, in some optional implementations, compressing each of the feature code combinations and the corresponding value ranges into at least one compressed feature code according to a pre-established compression rule includes:

若各所述取值范围中存在相同的取值,则将各所述特征码组合和相应的所述取值范围划分为M组,其中,每组均包括至少一对:所述特征码组合和相应的所述取值范围,且每组所包括的各所述取值范围不重复,所述M为大于0的整数;If there are identical values in each of the value ranges, each of the feature code combinations and the corresponding value ranges are divided into M groups, wherein each group includes at least one pair: the feature code combination and the corresponding value range, and the value ranges included in each group are not repeated, and M is an integer greater than 0;

对于每一组:将所包括的所述特征码组合和相应的所述取值范围压缩成一个所述压缩特征码。For each group: compress the included feature code combination and the corresponding value range into one compressed feature code.

结合第一方面,在某些可选的实施方式中,所述按照预先建立的压缩规则,将各所述特征码组合和相应的各所述取值范围压缩成至少一个压缩特征码,包括:In combination with the first aspect, in some optional implementations, compressing each of the feature code combinations and the corresponding value ranges into at least one compressed feature code according to a pre-established compression rule includes:

若各所述参数项特征码对应的取值范围中存在相同的取值,则将所述相同的取值映射为其它映射值,以更新存在相同的取值的所述取值范围,其中,更新后的各所述取值范围之间不重复,且更新后的各所述取值范围与原先未存在相同的取值的各所述取值范围之间不重复;If there are identical values in the value ranges corresponding to the characteristic codes of the parameter items, the identical values are mapped to other mapping values to update the value ranges with identical values, wherein the updated value ranges are not repeated, and the updated value ranges are not repeated with the original value ranges without identical values;

将更新后的各所述取值范围和/或原先未存在相同的取值的各所述取值范围,以及相应的各所述特征码组合划分为K组,其中,每组均包括至少一对:所述特征码组合和相应的更新后的所述取值范围,或者每组均包括至少一对:所述特征码组合和相应的原先未存在相同的取值的各所述取值范围,所述K为大于0的整数;Divide the updated value ranges and/or the value ranges that did not originally have the same value, and the corresponding feature code combinations into K groups, wherein each group includes at least one pair: the feature code combination and the corresponding updated value range, or each group includes at least one pair: the feature code combination and the corresponding value ranges that did not originally have the same value, and K is an integer greater than 0;

对于每一组:将所包括的将更新后的各所述取值范围和/或原先未存在相同的取值的各所述取值范围,以及相应的各所述特征码组合压缩成一个所述压缩特征码。For each group: the updated value ranges and/or the value ranges that did not originally have the same value, and the corresponding feature codes are combined and compressed into one compressed feature code.

第二方面,一种测试环境配置参数的备份装置,包括:测试环境获得单元、特征码提取单元、取值确定单元、特征码压缩单元和特征码存储单元;In a second aspect, a backup device for test environment configuration parameters includes: a test environment acquisition unit, a feature code extraction unit, a value determination unit, a feature code compression unit, and a feature code storage unit;

所述测试环境获得单元,被配置为执行获得待备份的测试环境,所述测试环境包括:操作系统资源、基础软件资源、应用安装包资源、通用运维监控工具资源和测试数据资源;The test environment obtaining unit is configured to obtain a test environment to be backed up, wherein the test environment includes: operating system resources, basic software resources, application installation package resources, general operation and maintenance monitoring tool resources, and test data resources;

所述特征码提取单元,被配置为执行根据预先建立的特征码提取规则,对各所述资源的配置参数项分别进行多个维度的特征码提取,以分别获得各所述资源对应的至少一个特征码组合,其中,所述配置参数项与特征码组合一一对应,每个所述特征码组合均包括:参数项特征码、参数项集合特征码和层次特征码,所述参数项集合特征码表征所述参数项特征码对应的所述配置参数项所在的参数项集合,所述层次特征码表征所述参数项集合所归属的所述资源;The feature code extraction unit is configured to perform feature code extraction of multiple dimensions on the configuration parameter items of each resource according to a pre-established feature code extraction rule, so as to obtain at least one feature code combination corresponding to each resource, wherein the configuration parameter items correspond to the feature code combinations one by one, and each feature code combination includes: a parameter item feature code, a parameter item set feature code and a hierarchical feature code, wherein the parameter item set feature code represents the parameter item set to which the configuration parameter item corresponding to the parameter item feature code belongs, and the hierarchical feature code represents the resource to which the parameter item set belongs;

所述取值确定单元,被配置为执行根据预先建立的取值规则,确定各所述特征码组合中的参数项特征码对应的取值范围;The value determination unit is configured to determine the value range corresponding to the parameter item feature code in each feature code combination according to a pre-established value rule;

所述特征码压缩单元,被配置为执行对于任一所述资源:按照预先建立的压缩规则,将各所述特征码组合和相应的各所述取值范围压缩成至少一个压缩特征码,其中,同一个所述压缩特征码在进行压缩的过程中所使用的各所述取值范围不重复,所述压缩特征码至少包括特征码部分和取值范围部分,所述特征码部分为所述压缩特征码在进行压缩的过程中所使用的各所述特征码组合的集合,所述取值范围部分为所述压缩特征码在进行压缩的过程中所使用的各所述取值范围的集合;The feature code compression unit is configured to perform, for any of the resources: compressing each feature code combination and each corresponding value range into at least one compressed feature code according to a pre-established compression rule, wherein the value ranges used by the same compressed feature code in the process of compression are not repeated, and the compressed feature code at least includes a feature code part and a value range part, the feature code part is a set of each feature code combination used by the compressed feature code in the process of compression, and the value range part is a set of each value range used by the compressed feature code in the process of compression;

所述特征码存储单元,被配置为执行将各所述压缩特征码进行存储,以备份所述测试环境的各所述资源的配置参数项。The feature code storage unit is configured to store the compressed feature codes to back up the configuration parameter items of the resources of the test environment.

第三方面,一种计算机可读存储介质,其上存储有程序,所述程序被处理器执行时实现任一项所述的测试环境配置参数的备份方法。In a third aspect, a computer-readable storage medium stores a program, wherein the program, when executed by a processor, implements any of the test environment configuration parameter backup methods described above.

第四方面,一种电子设备,所述电子设备包括至少一个处理器、以及与所述处理器连接的至少一个存储器、总线;其中,所述处理器、所述存储器通过所述总线完成相互间的通信;所述处理器用于调用所述存储器中的程序指令,以执行任一项所述的测试环境配置参数的备份方法。In a fourth aspect, an electronic device comprises at least one processor, and at least one memory and a bus connected to the processor; wherein the processor and the memory communicate with each other via the bus; and the processor is used to call program instructions in the memory to execute any one of the test environment configuration parameter backup methods described.

借由上述技术方案,本发明提供的一种测试环境配置参数的备份方法及相关装置,可以通过获得待备份的测试环境,所述测试环境包括:操作系统资源、基础软件资源、应用安装包资源、通用运维监控工具资源和测试数据资源;根据预先建立的特征码提取规则,对各所述资源的配置参数项分别进行多维度的特征码提取,以分别获得各所述资源对应的至少一个特征码组合,其中,所述配置参数项与特征码组合一一对应,每个所述特征码组合均包括:参数项特征码、参数项集合特征码和层次特征码,所述参数项集合特征码表征所述参数项特征码对应的所述配置参数项所在的参数项集合,所述层次特征码表征所述参数项集合所归属的所述资源;根据预先建立的取值规则,确定各所述特征码组合中的参数项特征码对应的取值范围;对于任一所述资源:按照预先建立的压缩规则,将各所述特征码组合和相应的各所述取值范围压缩成至少一个压缩特征码,其中,同一个所述压缩特征码在进行压缩的过程中所使用的各所述取值范围不重复,所述压缩特征码至少包括特征码部分和取值范围部分,所述特征码部分为所述压缩特征码在进行压缩的过程中所使用的各所述特征码组合的集合,所述取值范围部分为所述压缩特征码在进行压缩的过程中所使用的各所述取值范围的集合;将各所述压缩特征码进行存储,以备份所述测试环境的各所述资源的配置参数项。由此可以看出,本发明可以通过压缩特征码保存和记录测试环境的配置参数,对于存储资源的占用较少。By means of the above technical scheme, a method and related device for backing up test environment configuration parameters provided by the present invention can obtain a test environment to be backed up, wherein the test environment includes: operating system resources, basic software resources, application installation package resources, general operation and maintenance monitoring tool resources and test data resources; according to a pre-established feature code extraction rule, multi-dimensional feature code extraction is performed on the configuration parameter items of each of the resources respectively, so as to obtain at least one feature code combination corresponding to each of the resources respectively, wherein the configuration parameter items correspond to the feature code combinations one by one, and each of the feature code combinations includes: a parameter item feature code, a parameter item set feature code and a hierarchical feature code, wherein the parameter item set feature code represents the parameter item set to which the configuration parameter item corresponding to the parameter item feature code belongs, and the hierarchical feature code represents the parameter item set to which the configuration parameter item corresponding to the parameter item feature code belongs, and the hierarchical feature code represents the parameter item set to which the configuration parameter item corresponding to the parameter item feature code belongs. The resources to which it belongs; according to the pre-established value-taking rules, determine the value range corresponding to the parameter item feature code in each feature code combination; for any of the resources: according to the pre-established compression rules, compress each feature code combination and the corresponding value range into at least one compressed feature code, wherein the value ranges used by the same compressed feature code in the process of compression are not repeated, and the compressed feature code at least includes a feature code part and a value range part, the feature code part is a set of each feature code combination used by the compressed feature code in the process of compression, and the value range part is a set of each value range used by the compressed feature code in the process of compression; store each compressed feature code to back up the configuration parameter items of each resource of the test environment. It can be seen from this that the present invention can save and record the configuration parameters of the test environment through compressed feature codes, and occupies less storage resources.

上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

图1示出了本发明提供的一种测试环境配置参数的备份方法的流程图;FIG1 shows a flow chart of a method for backing up test environment configuration parameters provided by the present invention;

图2示出了本发明提供的一种测试环境配置参数的备份装置的结构示意图;FIG2 shows a schematic structural diagram of a test environment configuration parameter backup device provided by the present invention;

图3示出了本发明提供的一种电子设备的结构示意图。FIG3 shows a schematic structural diagram of an electronic device provided by the present invention.

具体实施方式Detailed ways

下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

如图1所示,本发明提供了一种测试环境配置参数的备份方法,包括:S100、S200、S300、S400和S500;As shown in FIG1 , the present invention provides a method for backing up test environment configuration parameters, including: S100 , S200 , S300 , S400 , and S500 ;

S100、获得待备份的测试环境,所述测试环境包括:操作系统资源、基础软件资源、应用安装包资源、通用运维监控工具资源和测试数据资源;S100, obtaining a test environment to be backed up, the test environment including: operating system resources, basic software resources, application installation package resources, general operation and maintenance monitoring tool resources and test data resources;

可选的,待备份的测试环境指的是:需要进行配置参数备份的测试环境,本发明对此不做限制。Optionally, the test environment to be backed up refers to: a test environment for which configuration parameters need to be backed up, and the present invention does not impose any limitation on this.

可选的,一套测试环境所涉及的内容较大,将其划分为操作系统资源、基础软件资源、应用安装包资源、通用运维监控工具资源和测试数据资源等五类资源,以便于后续针对这五类资源采用相应的规则进行特征码提取,本发明对此不做限制。Optionally, a test environment involves a large amount of content, and is divided into five types of resources, namely, operating system resources, basic software resources, application installation package resources, general operation and maintenance monitoring tool resources, and test data resources, so as to facilitate the subsequent use of corresponding rules for feature code extraction for these five types of resources. The present invention does not impose any restrictions on this.

S200、根据预先建立的特征码提取规则,对各所述资源的配置参数项分别进行多维度的特征码提取,以分别获得各所述资源对应的至少一个特征码组合;S200, performing multi-dimensional feature code extraction on configuration parameter items of each resource according to a pre-established feature code extraction rule, so as to obtain at least one feature code combination corresponding to each resource;

其中,所述配置参数项与特征码组合一一对应,每个所述特征码组合均包括:参数项特征码、参数项集合特征码和层次特征码,所述参数项集合特征码表征所述参数项特征码对应的所述配置参数项所在的参数项集合,所述层次特征码表征所述参数项集合所归属的所述资源;Wherein, the configuration parameter items correspond to feature code combinations one by one, and each feature code combination includes: a parameter item feature code, a parameter item set feature code, and a hierarchical feature code, wherein the parameter item set feature code represents the parameter item set to which the configuration parameter item corresponding to the parameter item feature code belongs, and the hierarchical feature code represents the resource to which the parameter item set belongs;

可选的,对于任一资源而言,可以有多个参数项集合,每个参数项集合可以有多个配置参数项。所以不同的资源可以用不同的层次特征码进行表征,不同的参数项集合可以用不同参数项集合特征码进行表征,不同的配置参数项可以用不同的参数项特征码进行表征。即每一个参数项特征码、每一个参数项集合特征码和每一个层次特征码可以均是唯一的,本发明对此不做限制。Optionally, for any resource, there may be multiple parameter item sets, and each parameter item set may have multiple configuration parameter items. Therefore, different resources may be characterized by different hierarchical feature codes, different parameter item sets may be characterized by different parameter item set feature codes, and different configuration parameter items may be characterized by different parameter item feature codes. That is, each parameter item feature code, each parameter item set feature code, and each hierarchical feature code may all be unique, and the present invention does not impose any limitation on this.

可选的,本发明所说的对各所述资源的配置参数项分别进行多维度的特征码提取,可以理解为:从参数项特征码、参数项集合特征码和层次特征码这三个度分别提取相应的特征码,本发明对此不做限制。Optionally, the present invention's performing multi-dimensional feature code extraction on the configuration parameter items of each resource can be understood as: extracting corresponding feature codes from three dimensions: parameter item feature code, parameter item set feature code and hierarchical feature code, and the present invention does not impose any limitation on this.

可选的,每个所述特征码组合均至少包括:一个参数项特征码、一个参数项集合特征码和一个层次特征码,本发明对此不做限制。Optionally, each of the feature code combinations includes at least: a parameter item feature code, a parameter item set feature code and a hierarchical feature code, which is not limited in the present invention.

可选的,本发明对于特征码提取规则不做具体限制,任何可行的方式均属于本发明的保护范围。例如,结合图1所示的实施方式,在某些可选的实施方式中,所述特征码提取规则,包括:Optionally, the present invention does not impose any specific restrictions on the feature code extraction rules, and any feasible method belongs to the protection scope of the present invention. For example, in conjunction with the embodiment shown in FIG1 , in some optional embodiments, the feature code extraction rules include:

对于任一测试环境,均按照操作系统资源、基础软件资源、应用安装包资源、通用运维监控工具资源和测试数据资源五个层次进行层次特征码的划分,不同的所述资源对应的所述层次特征码均不相同;For any test environment, hierarchical feature codes are divided into five levels: operating system resources, basic software resources, application installation package resources, general operation and maintenance monitoring tool resources, and test data resources. Different resources correspond to different hierarchical feature codes.

其中,所述操作系统资源对应第一层次特征码;Wherein, the operating system resource corresponds to the first level feature code;

所述基础软件资源对应第二层次特征码;The basic software resources correspond to the second-level feature code;

所述应用安装包资源对应第三层次特征码;The application installation package resource corresponds to the third level feature code;

所述通用运维监控工具资源对应第四层次特征码;The general operation and maintenance monitoring tool resource corresponds to the fourth level feature code;

所述测试数据资源对应第五层次特征码;The test data resource corresponds to the fifth level feature code;

对于任一所述资源,均按照不同的所述参数项集合对应不同的所述参数项集合特征码进行参数项集合特征码的划分;For any of the resources, parameter item set feature codes are divided according to different parameter item sets corresponding to different parameter item set feature codes;

其中,第一类参数项集合对应第一参数项集合特征码;The first type of parameter item set corresponds to the first parameter item set feature code;

第二类参数项集合对应第二参数项集合特征码;The second type of parameter item set corresponds to the second parameter item set feature code;

第三类参数项集合对应第三参数项集合特征码,以此类推;The third type of parameter item set corresponds to the third parameter item set feature code, and so on;

对于任一所述参数项集合,均按照不同的所述参数项对应不同的所述参数项特征进行划分;For any set of parameter items, the parameter items are divided according to different parameter items corresponding to different parameter item features;

其中,第一参数项对应第一参数项特征码;Wherein, the first parameter item corresponds to the first parameter item feature code;

第二参数项对应第二参数项特征码;The second parameter item corresponds to the second parameter item feature code;

第三参数项对应第三参数项特征码,以此类推。The third parameter item corresponds to the third parameter item feature code, and so on.

可选的,本发明对于第一层次特征码、第二层次特征码、第三层次特征码、第四层次特征码和第五层次特征码的具体内容不做限制,任何可行的方式均属于本发明的保护范围。例如,第一层次特征码、第二层次特征码、第三层次特征码、第四层次特征码和第五层次特征码依次分别为:一、二、三、四和五,本发明对此不做限制。Optionally, the present invention does not limit the specific contents of the first-level feature code, the second-level feature code, the third-level feature code, the fourth-level feature code, and the fifth-level feature code, and any feasible manner belongs to the protection scope of the present invention. For example, the first-level feature code, the second-level feature code, the third-level feature code, the fourth-level feature code, and the fifth-level feature code are respectively: one, two, three, four, and five, and the present invention does not limit this.

可选的,本发明对于第一类参数项集合、第二类参数项集合和第三类参数项集合不做具体限制,具体需结合相应的资源对应的内部参数项集合的划分,本发明对此不做限制。Optionally, the present invention does not impose specific restrictions on the first type parameter item set, the second type parameter item set and the third type parameter item set, which needs to be specifically combined with the division of the internal parameter item set corresponding to the corresponding resources, and the present invention does not impose any restrictions on this.

可选的,本发明对于第一参数项集合特征码、第二参数项集合特征码、第三参数项集合特征码···和第Z参数项集合特征码的具体内容不做限制,任何可行的方式均属于本发明的保护范围。例如,第一参数项集合特征码、第二参数项集合特征码和第三参数项集合特征码依次分别为:1、2和3,以此类推,本发明对此不做限制。Optionally, the present invention does not limit the specific contents of the first parameter item set feature code, the second parameter item set feature code, the third parameter item set feature code, and the Zth parameter item set feature code, and any feasible manner belongs to the protection scope of the present invention. For example, the first parameter item set feature code, the second parameter item set feature code, and the third parameter item set feature code are respectively: 1, 2, and 3, and so on, and the present invention does not limit this.

可选的,本发明对于第一参数项、第二参数项和第三参数项不做具体限制,具体需结合不同资源不同参数项集合下的参数项的划分,一般一个参数项对应测试环境中的一个配置参数项,本发明对此不做限制。Optionally, the present invention does not impose specific restrictions on the first parameter item, the second parameter item and the third parameter item. The specific division of parameter items under different parameter item sets in combination with different resources is required. Generally, one parameter item corresponds to a configuration parameter item in the test environment, and the present invention does not impose any restrictions on this.

可选的,本发明对于第一参数项特征码、第二参数项特征码和第三参数项特征码不做具体限制,任何可行的方式均属于本发明的保护范围。例如,第一参数项特征码、第二参数项特征码和第三参数项特征码依次分别为:(1)、(2)和(3),本发明对此不做限制。Optionally, the present invention does not impose any specific restrictions on the first parameter item feature code, the second parameter item feature code, and the third parameter item feature code, and any feasible manner belongs to the protection scope of the present invention. For example, the first parameter item feature code, the second parameter item feature code, and the third parameter item feature code are respectively: (1), (2), and (3), and the present invention does not impose any restrictions on this.

为了便于理解,结合前述的例子,若具体一个特征码组合为:一-1(1),则表明该特征码组合对应为:测试环境中的操作系统资源的第一参数项集合的第一参数项(第一配置参数项),本发明对此不做限制。For ease of understanding, combined with the above example, if a specific feature code combination is: -1 (1), it indicates that the feature code combination corresponds to: the first parameter item (first configuration parameter item) of the first parameter item set of the operating system resources in the test environment, and the present invention does not impose any restrictions on this.

S300、根据预先建立的取值规则,确定各所述特征码组合中的参数项特征码对应的取值范围;S300, determining the value range corresponding to the parameter item feature code in each feature code combination according to a pre-established value selection rule;

可选的,参数项特征码对应的取值范围不是参数项特征码本身,而是用于说明该参数项特征码对应的配置参数项在测试环境中实际含义的参数,本发明对此不做限制。Optionally, the value range corresponding to the parameter item feature code is not the parameter item feature code itself, but a parameter used to illustrate the actual meaning of the configuration parameter item corresponding to the parameter item feature code in the test environment, and the present invention does not impose any limitation on this.

可选的,各参数项特征码对应的取值范围可以是有相关人员根据实际经验进行设计,本发明对此不做限制。Optionally, the value range corresponding to the feature code of each parameter item may be designed by relevant personnel based on actual experience, and the present invention does not impose any limitation on this.

可选的,本发明对于取值规则不做具体限制,任何可行的方式均属于本发明的保护范围。例如,结合图1所示的实施方式,在某些可选的实施方式中,所述S300,包括:查询预先建立的取值对照表,从而查询获得各所述特征码组合中的参数项特征码对应的取值范围,其中,所述取值对照表记录各所述参数项特征码对应的取值范围。Optionally, the present invention does not impose any specific restrictions on the value selection rules, and any feasible method belongs to the protection scope of the present invention. For example, in combination with the embodiment shown in FIG1 , in some optional embodiments, the S300 includes: querying a pre-established value comparison table, thereby querying and obtaining the value range corresponding to the parameter item feature code in each of the feature code combinations, wherein the value comparison table records the value range corresponding to each of the parameter item feature codes.

例如,取值对照表记录:一-1(1)[q1]=1、一-1(1)[q2]=3、一-1(1)[q3]=5,则说明特征码组合一-1(1)的第一参数项集合1的第一参数项(1)的第一个取值[q1]为1、第二个取值[q2]为2和第三个取值[q3]为3,即一-1(1)的取值范围为1、3和5,本发明对此不做限制。For example, the value comparison table records: -1(1)[q1]=1, -1(1)[q2]=3, -1(1)[q3]=5, which means that the first value [q1] of the first parameter item (1) of the first parameter item set 1 of the feature code combination -1(1) is 1, the second value [q2] is 2 and the third value [q3] is 3, that is, the value range of -1(1) is 1, 3 and 5, and the present invention is not limited to this.

又例如,结合图1所示的实施方式,在某些可选的实施方式中,所述S300,包括:根据预先建立的取值计算公式,计算得到各所述特征码组合中的参数项特征码对应的取值范围,其中,所述取值计算公式与所述参数项特征码相匹配。For another example, in combination with the implementation shown in Figure 1, in some optional implementations, the S300 includes: calculating the value range corresponding to the parameter item feature code in each of the feature code combinations according to a pre-established value calculation formula, wherein the value calculation formula matches the parameter item feature code.

可选的,如前所述,取值对照表记录:一-1(1)[q1]=1、一-1(1)[q2]=3、一-1(1)[q3]=5,可以换一种表达方式。即设定一-1(1)的取值范围为:一-1(1)[qi]=2×i-1(0<i<4,i为整数),本发明对此不做限制。Optionally, as mentioned above, the value comparison table records: -1(1)[q1]=1, -1(1)[q2]=3, -1(1)[q3]=5, which can be expressed in another way. That is, the value range of -1(1) is set to: -1(1)[qi]=2×i-1 (0<i<4, i is an integer), and the present invention does not limit this.

S400、对于任一所述资源:按照预先建立的压缩规则,将各所述特征码组合和相应的各所述取值范围压缩成至少一个压缩特征码;S400, for any of the resources: compressing each of the feature code combinations and the corresponding value ranges into at least one compressed feature code according to a pre-established compression rule;

其中,同一个所述压缩特征码在进行压缩的过程中所使用的各所述取值范围不重复,所述压缩特征码至少包括特征码部分和取值范围部分,所述特征码部分为所述压缩特征码在进行压缩的过程中所使用的各所述特征码组合的集合,所述取值范围部分为所述压缩特征码在进行压缩的过程中所使用的各所述取值范围的集合;The value ranges used by the same compression feature code in the compression process are not repeated, the compression feature code at least includes a feature code part and a value range part, the feature code part is a set of feature code combinations used by the compression feature code in the compression process, and the value range part is a set of value ranges used by the compression feature code in the compression process;

可选的,本发明对于将各所述特征码组合和相应的各所述取值范围压缩成至少一个压缩特征码的方式不做具体限制,任何可行的方式均属于本发明的保护范围。例如,若一-1(1)的取值范围为:1、3和5,一-1(2)的取值范围为:2和9;则一-1(1)和一-1(2)拼接形成压缩特征码的特征码部分:一-1(1)一-1(2),取值范围为:1、3和5,以及取值范围为:2和9拼接形成缩特征码的取值范围部分:[1、2、3、5、9],即所述压缩特征码可以为:一-1(1)一-1(2)[1、2、3、5、9],本发明对此不做限制。Optionally, the present invention does not impose any specific restrictions on the manner of compressing each of the feature code combinations and the corresponding each of the value ranges into at least one compressed feature code, and any feasible manner falls within the protection scope of the present invention. For example, if the value range of -1(1) is: 1, 3 and 5, and the value range of -1(2) is: 2 and 9; then -1(1) and -1(2) are spliced to form the feature code portion of the compressed feature code: -1(1)-1(2), the value range is: 1, 3 and 5, and the value range is: 2 and 9 to form the value range portion of the compressed feature code: [1, 2, 3, 5, 9], that is, the compressed feature code can be: -1(1)-1(2)[1, 2, 3, 5, 9], and the present invention does not impose any restrictions on this.

可选的,在进行压缩一个压缩特征码时,所使用的各所述取值范围可能存在重复的情况,为了避免出现混乱,所以需要确保压缩同一个压缩特征码所使用的各所述取值范围不重复,下面分开进行说明。Optionally, when compressing a compression feature code, the value ranges used may be repeated. In order to avoid confusion, it is necessary to ensure that the value ranges used to compress the same compression feature code are not repeated, which are explained separately below.

例如,结合图1所示的实施方式,在某些可选的实施方式中,所述S400,包括:步骤1.1和步骤1.2;For example, in combination with the embodiment shown in FIG1 , in some optional embodiments, the S400 includes: step 1.1 and step 1.2;

步骤1.1、若各所述取值范围均不重复,则将各所述特征码组合和相应的各所述取值范围划分为N组,其中,每组均包括至少一对:所述特征码组合和相应的所述取值范围,所述N为大于0的整数;Step 1.1, if the value ranges are not repeated, then divide the feature code combinations and the corresponding value ranges into N groups, wherein each group includes at least one pair: the feature code combination and the corresponding value range, wherein N is an integer greater than 0;

可选的,步骤1.1所说的若各所述取值范围指的是:对同一个资源提取得到的各特征码组合对应的各所述取值范围。若各所述取值范围均不重复,则可以将同一个资源的各所述特征码组合和相应的各所述取值范围划分为N组,每组所包括的所述特征码组合和相应的所述取值范围是成对的。即若将一-1(1)划分到第一组,也应将其取值范围为:1、3和5划分到第一组,本发明对此不做限制。Optionally, the value ranges mentioned in step 1.1 refer to the value ranges corresponding to the feature code combinations extracted from the same resource. If the value ranges are not repeated, the feature code combinations and the corresponding value ranges of the same resource can be divided into N groups, and the feature code combinations and the corresponding value ranges included in each group are paired. That is, if -1(1) is divided into the first group, its value ranges of 1, 3 and 5 should also be divided into the first group. The present invention does not limit this.

可选的,在这种情况下,同一组内:不存在相同的特征码组合,当然,也不存在重复的取值范围;不同组之间:不存在相同的特征码组合,当然,也不存在重复的取值范围,本发明对此不做限制。Optionally, in this case, within the same group: there is no identical feature code combination, and of course, there is no repeated value range; between different groups: there is no identical feature code combination, and of course, there is no repeated value range, and the present invention does not impose any limitation on this.

步骤1.2、对于每一组:将所包括的所述特征码组合和相应的所述取值范围压缩成一个所述压缩特征码。Step 1.2: for each group: compress the included feature code combination and the corresponding value range into one compressed feature code.

又例如,结合图1所示的实施方式,在某些可选的实施方式中,所述S400,包括:步骤2.1和步骤2.2;For another example, in combination with the embodiment shown in FIG. 1 , in some optional embodiments, the S400 includes: step 2.1 and step 2.2;

步骤2.1、若各所述取值范围中存在相同的取值,则将各所述特征码组合和相应的所述取值范围划分为M组,其中,每组均包括至少一对:所述特征码组合和相应的所述取值范围,且每组所包括的各所述取值范围不重复,所述M为大于0的整数;Step 2.1, if there are identical values in each of the value ranges, then divide each of the feature code combinations and the corresponding value ranges into M groups, wherein each group includes at least one pair: the feature code combination and the corresponding value range, and the value ranges included in each group are not repeated, and M is an integer greater than 0;

可选的,步骤2.1中所说的若各所述取值范围中存在相同的取值,可以理解为:各所述取值范围中、至少有两个取值范围存在重复,则可以在进行分组时,将取值范围重复的特征码组合划分到不同组,剩余的取值范围不重复的特征码组合可以随意组合,本发明对此不做限制。Optionally, in step 2.1, if there are identical values in each of the value ranges, it can be understood that: among the value ranges, at least two value ranges are repeated. Then, when grouping, the feature code combinations with repeated value ranges can be divided into different groups, and the feature code combinations with non-repeated value ranges can be combined at will, and the present invention does not impose any restrictions on this.

例如,特征码组合A的取值范围与特征码组合B的取值范围重复,特征码组合C的取值范围与特征码组合D的取值范围重复;For example, the value range of feature code combination A overlaps with the value range of feature code combination B, and the value range of feature code combination C overlaps with the value range of feature code combination D;

特征码组合A的取值范围与特征码组合C的取值范围不重复,且与特征码组合D的取值范围也不重复;The value range of the feature code combination A does not overlap with the value range of the feature code combination C, and does not overlap with the value range of the feature code combination D;

特征码组合B的取值范围与特征码组合C的取值范围不重复,且与特征码组合D的取值范围也不重复;The value range of the signature code combination B does not overlap with the value range of the signature code combination C, and does not overlap with the value range of the signature code combination D;

剩余的特征码组合E的取值范围和特征码组合F的取值范围不重复,且特征码组合E的取值范围和特征码组合F的取值范围均与:特征码组合A的取值范围、特征码组合B的取值范围、特征码组合C的取值范围和特征码组合D的取值范围不重复,则特征码组合A及其取值范围划分到第一组、特征码组合B及其取值范围划分到第二组。The value range of the remaining feature code combination E and the value range of the feature code combination F do not overlap, and the value range of the feature code combination E and the value range of the feature code combination F do not overlap with the value range of the feature code combination A, the value range of the feature code combination B, the value range of the feature code combination C, and the value range of the feature code combination D, then the feature code combination A and its value range are divided into the first group, and the feature code combination B and its value range are divided into the second group.

对于特征码组合C及其取值范围,可以划分到第三组,也可以划分到第一组或者第二组。The feature code combination C and its value range may be classified into the third group, or the first group or the second group.

若特征码组合C及其取值范围划分到第三组,则特征码组合D及其取值范围可以划分到第一组、第二组或者第四组;If the feature code combination C and its value range are classified into the third group, the feature code combination D and its value range can be classified into the first group, the second group or the fourth group;

若特征码组合C及其取值范围划分到第一组,则特征码组合D及其取值范围不能划分到第一组,而可以划分到第二组或者第三组;If the feature code combination C and its value range are classified into the first group, the feature code combination D and its value range cannot be classified into the first group, but can be classified into the second group or the third group;

若特征码组合C及其取值范围划分到第二组,则特征码组合D及其取值范围不能划分到第二组,而可以划分到第一组或者第三组。If the feature code combination C and its value range are classified into the second group, the feature code combination D and its value range cannot be classified into the second group, but can be classified into the first group or the third group.

可选的,特征码组合E和特征码组合F可以划分到同一组,也可以划分到不同组。例如,特征码组合E可以划分到第一组、第二组、第三组、第四组和第五组的任意一组;特征码组合F也可以划分到第一组、第二组、第三组、第四组、第五组和第六组的任一组,本发明对此不做限制。Optionally, the feature code combination E and the feature code combination F can be divided into the same group or different groups. For example, the feature code combination E can be divided into any one of the first group, the second group, the third group, the fourth group and the fifth group; the feature code combination F can also be divided into any one of the first group, the second group, the third group, the fourth group, the fifth group and the sixth group, and the present invention does not limit this.

步骤2.2、对于每一组:将所包括的所述特征码组合和相应的所述取值范围压缩成一个所述压缩特征码。Step 2.2: for each group: compress the included feature code combination and the corresponding value range into one compressed feature code.

结合图1所示的实施方式,在某些可选的实施方式中,所述S400,包括:步骤3.1、步骤3.2和步骤3.3;In conjunction with the embodiment shown in FIG. 1 , in some optional embodiments, the S400 includes: step 3.1, step 3.2, and step 3.3;

步骤3.1、若各所述参数项特征码对应的取值范围中存在相同的取值,则将所述相同的取值映射为其它映射值,以更新存在相同的取值的所述取值范围,其中,更新后的各所述取值范围之间不重复,且更新后的各所述取值范围与原先未存在相同的取值的各所述取值范围之间不重复;Step 3.1: If there are identical values in the value ranges corresponding to the characteristic codes of the parameter items, the identical values are mapped to other mapping values to update the value ranges with identical values, wherein the updated value ranges are not repeated, and the updated value ranges are not repeated with the original value ranges without identical values;

可选的,若各所述参数项特征码对应的取值范围中存在相同的取值,则可以将所有重复的取值范围均通过上述映射的方式,更新所有重复的取值范围,进一步使得同一个资源的各特征码组合相应的取值范围在进行更新后,不存在取值范围重复的特征码组合。这种情况,在更新后,可以参见前述关于若各所述取值范围均不重复的处理方式,本发明对此不做限制。Optionally, if the same value exists in the value range corresponding to each parameter item feature code, all repeated value ranges can be updated through the above mapping method, so that after the value ranges corresponding to each feature code combination of the same resource are updated, there is no feature code combination with repeated value ranges. In this case, after the update, you can refer to the above-mentioned processing method if each value range is not repeated, and the present invention does not limit this.

可选的,也可以若各所述参数项特征码对应的取值范围中存在相同的取值,则可以将一部分重复的取值范围均通过上述映射的方式,以更新一部分重复的取值范围,进一步减少重复的取值范围。这种情况,在更新后,可以参见前述关于若各所述取值范围中存在相同的取值的处理方式,本发明对此不做限制。Optionally, if the same values exist in the value ranges corresponding to the characteristic codes of the parameter items, a part of the repeated value ranges can be updated through the above mapping method to further reduce the repeated value ranges. In this case, after the update, the above-mentioned processing method for the same values in the value ranges can be referred to, and the present invention does not limit this.

步骤3.2、将更新后的各所述取值范围和/或原先未存在相同的取值的各所述取值范围,以及相应的各所述特征码组合划分为K组,其中,每组均包括至少一对:所述特征码组合和相应的更新后的所述取值范围,或者每组均包括至少一对:所述特征码组合和相应的原先未存在相同的取值的各所述取值范围,所述K为大于0的整数;Step 3.2, divide the updated value ranges and/or the value ranges that did not originally have the same value, and the corresponding feature code combinations into K groups, wherein each group includes at least one pair: the feature code combination and the corresponding updated value range, or each group includes at least one pair: the feature code combination and the corresponding value ranges that did not originally have the same value, and K is an integer greater than 0;

可选的,对于任一组而言,其所包括的特征码组合及其取值范围,可以是特征码组合及其更新后的取值范围,也可以是特征码组合及其原来的取值范围(即相应的原先未存在相同的取值的取值范围),本发明对此不做限制。Optionally, for any group, the feature code combination and its value range included therein may be a feature code combination and its updated value range, or a feature code combination and its original value range (i.e., a corresponding value range in which the same value did not exist originally), and the present invention does not impose any limitation on this.

步骤3.3、对于每一组:将所包括的将更新后的各所述取值范围和/或原先未存在相同的取值的各所述取值范围,以及相应的各所述特征码组合压缩成一个所述压缩特征码。Step 3.3: for each group: compress the updated value ranges and/or the value ranges that did not originally have the same value, and the corresponding feature codes into one compressed feature code.

S500、将各所述压缩特征码进行存储,以备份所述测试环境的各所述资源的配置参数项。S500: Store the compressed feature codes to back up configuration parameter items of the resources in the test environment.

可选的,本发明对于存储各所述压缩特征码不做具体限制,任何可行的方式均属于本发明的保护范围。Optionally, the present invention does not impose any specific limitation on storing the compressed feature codes, and any feasible manner falls within the protection scope of the present invention.

例如,将各所述压缩特征码按照不同资源依次进行排序保存,本发明对此不做限制。For example, the compression feature codes are sorted and saved in sequence according to different resources, and the present invention does not impose any limitation on this.

可选的,本文所说的压缩特征码可以理解为一串字符,即通过保存字符的方式记录测试环境的配置参数,而字符占用内存极小,极大程度上减少本分测试环境对存储资源的占用,本发明对此不做限制。Optionally, the compression feature code mentioned in this article can be understood as a string of characters, that is, the configuration parameters of the test environment are recorded by saving the characters, and the characters occupy very little memory, which greatly reduces the storage resource occupation of this test environment. The present invention does not impose any restrictions on this.

下面提供一个完整实施例,进一步说明本方案。A complete embodiment is provided below to further illustrate this solution.

一、定义:1. Definition:

(1)层次定义:(1) Level definition:

层次一:操作系统;Level 1: Operating system;

层次二:基础软件(如数据库、中间件、各领域开源产品);Level 2: Basic software (such as databases, middleware, and open source products in various fields);

层次三:应用安装包(包含应用版本信息);Level 3: application installation package (including application version information);

层次四:通用运维监控工具(安装及配置);Level 4: General operation and maintenance monitoring tools (installation and configuration);

层次五:测试数据。Level 5: Test data.

(2)基线定义:(2) Baseline definition:

基线一:操作系统镜像;Baseline 1: operating system image;

基线二:基础软件(如数据库、中间件、各领域开源产品)的安装包、安装流程、安装脚本;Baseline 2: installation packages, installation processes, and installation scripts of basic software (such as databases, middleware, and open source products in various fields);

基线三:应用安装包(包含应用版本信息)的应用版本号、应用安装包、安装流程、安装脚本;Baseline 3: application version number of the application installation package (including application version information), application installation package, installation process, and installation script;

基线四:通用运维监控工具(安装及配置)的工具版本号、工具安装包、安装流程、安装脚本;Baseline 4: Tool version number, tool installation package, installation process, and installation script of general operation and maintenance monitoring tools (installation and configuration);

基线五:测试数据的数据版本号。Baseline 5: Data version number of test data.

(3)参数项集合定义:(3) Parameter item set definition:

参数项集合一-1:操作系统的第一类参数项集合;Parameter item set 1-1: the first type of parameter item set of the operating system;

参数项集合一-2:操作系统的第二类参数项集合;Parameter item set 1-2: the second type of parameter item set of the operating system;

参数项集合一-n:操作系统的第n类参数项集合。Parameter item set one-n: the nth type of parameter item set of the operating system.

(4)参数项定义:(4) Parameter item definition:

参数项一-1(1):操作系统的第一类参数集合中第一个参数项;Parameter item one-1(1): the first parameter item in the first type parameter set of the operating system;

参数项一-1(2):操作系统的第一类参数集合中第二个参数项;Parameter item one-1(2): the second parameter item in the first type parameter set of the operating system;

参数项一-1(p):操作系统的第一类参数集合中第p个参数项。Parameter item one-1(p): the pth parameter item in the first type parameter set of the operating system.

(5)取值范围定义:(5) Definition of value range:

参数值一-1(1)[q1]:操作系统的第一类参数集合中第一个参数项的第一个取值为q1;Parameter value one-1(1)[q1]: the first value of the first parameter item in the first type parameter set of the operating system is q1;

参数值一-1(1)[q2]:操作系统的第一类参数集合中第一个参数项的第二个取值为q2;Parameter value one-1(1)[q2]: the second value of the first parameter item in the first type parameter set of the operating system is q2;

参数值一-1(1)[qi]:操作系统的第一类参数集合中第一个参数项的第i个取值为qi。Parameter value one-1(1)[qi]: The i-th value of the first parameter item in the first type parameter set of the operating system is qi.

二、实现原理:2. Implementation principle:

(1)按层次、参数项集合、参数项规定特征组合。(1) Specify feature combinations by level, parameter item set, and parameter item.

对每个特征组合中的每个参数项依次确定具体取值范围,如一-1(1)[q1]、一-1(1)[q2]、一-1(1)[q3]、一-1(2)[q1]、一-1(2)[q2]、一-1(3)[q1]、一-1(3)[q2]等。The specific value range of each parameter item in each feature combination is determined in turn, such as -1(1)[q1], -1(1)[q2], -1(1)[q3], -1(2)[q1], -1(2)[q2], -1(3)[q1], -1(3)[q2], etc.

(2)特征码计算。(2) Feature code calculation.

2.1、对每个参数值的含义进行描述,说明具体取值的含义。2.1. Describe the meaning of each parameter value and explain the meaning of the specific value.

2.2、对于每个参数项,根据取值范围,制定计算规则。如一-1(1)[q1]=1、一-1(1)[q2]=3、一-1(1)[q3]=5,即参数项一-1(1)的取值范围为1、3、5,则该参数项的计算规则为一-1(1)[qi]=2×i-1(0<i<4,i为整数);一-1(2)[q1]=2、一-1(2)[q2]=9,即参数项一-1(2)的取值范围为2、9,则该参数项的计算规则为一-1(2)[qi]=i3+1(0<i<3,i为整数);一-1(3)[q1]=a、一-1(3)[q2]=b,即参数项一-1(3)的取值范围为a、b,则该参数项的计算规则为一-1(3)[q1]=a、一-1(3)[q2]=b。2.2. For each parameter item, formulate a calculation rule based on the value range. For example, -1(1)[q1]=1, -1(1)[q2]=3, -1(1)[q3]=5, that is, the value range of the parameter item -1(1) is 1, 3, 5, then the calculation rule of this parameter item is -1(1)[qi]=2×i-1 (0<i<4, i is an integer); -1(2)[q1]=2, -1(2)[q2]=9, that is, the value range of the parameter item -1(2) is 2, 9, then the calculation rule of this parameter item is -1(2)[qi]=i 3 +1(0<i<3, i is an integer); -1(3)[q1]=a, -1(3)[q2]=b, that is, the value range of the parameter item -1(3) is a, b, then the calculation rule of the parameter item is -1(3)[q1]=a, -1(3)[q2]=b.

本发明也预先根据各个参数项的计算规则,计算得到各个参数项的参数值,然后预先建立相应的取值对照表,已便于后续直接通过查表获得各个参数项的参数值。The present invention also calculates the parameter value of each parameter item in advance according to the calculation rules of each parameter item, and then pre-establishes a corresponding value comparison table, which is convenient for obtaining the parameter value of each parameter item directly by looking up the table later.

2.3、合并压缩多个参数值,形成压缩特征码。2.3. Combine and compress multiple parameter values to form a compression signature.

对多个参数项取值范围进行合并,压缩成一个压缩特征码。如上例,参数项一-1(1)、一-1(2)、一-1(3)的整体取值范围为1、2、3、5、9、a、b,无重复取值,因此可以直接使用。通过分段函数,使用一个压缩特征码来标识3个参数项的7个取值,能够同时区分参数项与参数值的关系。若几个参数项的整体取值范围中有重复取值,可通过调整参数项组合,或增加一层计算规则将重复的取值映射成唯一值,从而形成一个压缩特征码。Combine the value ranges of multiple parameter items and compress them into a compressed signature. As in the above example, the overall value range of the parameter items -1(1), -1(2), and -1(3) is 1, 2, 3, 5, 9, a, and b. There are no repeated values, so they can be used directly. Through piecewise functions, a compressed signature is used to identify the 7 values of the 3 parameter items, which can simultaneously distinguish the relationship between the parameter items and the parameter values. If there are repeated values in the overall value range of several parameter items, the repeated values can be mapped into unique values by adjusting the parameter item combination or adding a layer of calculation rules to form a compressed signature.

(3)压缩特征码存储。(3) Compressed feature code storage.

将多位特征码按照一定的编排规则,以字符串的形式存储、传输。Multi-bit feature codes are stored and transmitted in the form of strings according to certain arrangement rules.

(4)特征码解析。(4) Feature code analysis.

根据特征码计算规则推导解析规则,当需要供给资源时,通过解析函数还原各参数项与值的关系,进而根据取值还原测试环境。The parsing rules are derived based on the feature code calculation rules. When resources need to be supplied, the relationship between each parameter item and value is restored through the parsing function, and then the test environment is restored based on the value.

(5)特征码更新。(5) Feature code update.

根据计算规则,重新计算特征码。若与其他取值重复,修订上层计算规则,或者调整参数项组合。Recalculate the signature according to the calculation rules. If it is the same as other values, revise the upper-layer calculation rules or adjust the parameter combination.

例如,当取值范围发生变化或计算规则有调整时,根据新的计算规则,重新计算特征码。For example, when the value range changes or the calculation rule is adjusted, the feature code is recalculated according to the new calculation rule.

(6)特征码与基线同步更新。(6) The signature code and baseline are updated synchronously.

修订基线,根据新的基线及原计算规则,计算特征码变化值,对变化后的结果,重新合并、压缩,并修订解析规则。Revise the baseline, calculate the feature code change value based on the new baseline and the original calculation rules, re-merge and compress the changed results, and revise the parsing rules.

基线用于保证特征码、计算规则的一致性,进而保证抽取、计算、存储、解析的有效性。当取值范围发生变化时,可能导致计算、解析规则失效,因此需要修订基线。The baseline is used to ensure the consistency of feature codes and calculation rules, and thus ensure the effectiveness of extraction, calculation, storage, and analysis. When the value range changes, the calculation and analysis rules may become invalid, so the baseline needs to be revised.

如图2所示,本发明提供了一种测试环境配置参数的备份装置,包括:测试环境获得单元100、特征码提取单元200、取值确定单元300、特征码压缩单元400和特征码存储单元500;As shown in FIG2 , the present invention provides a test environment configuration parameter backup device, comprising: a test environment acquisition unit 100 , a feature code extraction unit 200 , a value determination unit 300 , a feature code compression unit 400 and a feature code storage unit 500 ;

所述测试环境获得单元100,被配置为执行获得待备份的测试环境,所述测试环境包括:操作系统资源、基础软件资源、应用安装包资源、通用运维监控工具资源和测试数据资源;The test environment obtaining unit 100 is configured to obtain a test environment to be backed up, wherein the test environment includes: operating system resources, basic software resources, application installation package resources, general operation and maintenance monitoring tool resources, and test data resources;

所述特征码提取单元200,被配置为执行根据预先建立的特征码提取规则,对各所述资源的配置参数项分别进行多维度的特征码提取,以分别获得各所述资源对应的至少一个特征码组合,其中,所述配置参数项与特征码组合一一对应,每个所述特征码组合均包括:参数项特征码、参数项集合特征码和层次特征码,所述参数项集合特征码表征所述参数项特征码对应的所述配置参数项所在的参数项集合,所述层次特征码表征所述参数项集合所归属的所述资源;The feature code extraction unit 200 is configured to perform multi-dimensional feature code extraction on the configuration parameter items of each resource according to a pre-established feature code extraction rule, so as to obtain at least one feature code combination corresponding to each resource, wherein the configuration parameter items correspond to the feature code combinations one by one, and each feature code combination includes: a parameter item feature code, a parameter item set feature code and a hierarchical feature code, wherein the parameter item set feature code represents the parameter item set to which the configuration parameter item corresponding to the parameter item feature code belongs, and the hierarchical feature code represents the resource to which the parameter item set belongs;

所述取值确定单元300,被配置为执行根据预先建立的取值规则,确定各所述特征码组合中的参数项特征码对应的取值范围;The value determination unit 300 is configured to determine the value range corresponding to the parameter item feature code in each feature code combination according to a pre-established value rule;

所述特征码压缩单元400,被配置为执行对于任一所述资源:按照预先建立的压缩规则,将各所述特征码组合和相应的各所述取值范围压缩成至少一个压缩特征码,其中,同一个所述压缩特征码在进行压缩的过程中所使用的各所述取值范围不重复,所述压缩特征码至少包括特征码部分和取值范围部分,所述特征码部分为所述压缩特征码在进行压缩的过程中所使用的各所述特征码组合的集合,所述取值范围部分为所述压缩特征码在进行压缩的过程中所使用的各所述取值范围的集合;The feature code compression unit 400 is configured to perform, for any of the resources: compressing each feature code combination and each corresponding value range into at least one compressed feature code according to a pre-established compression rule, wherein the value ranges used by the same compressed feature code in the process of compression are not repeated, and the compressed feature code at least includes a feature code part and a value range part, the feature code part is a set of each feature code combination used by the compressed feature code in the process of compression, and the value range part is a set of each value range used by the compressed feature code in the process of compression;

所述特征码存储单元500,被配置为执行将各所述压缩特征码进行存储,以备份所述测试环境的各所述资源的配置参数项。The feature code storage unit 500 is configured to store the compressed feature codes to back up the configuration parameter items of the resources of the test environment.

结合图2所示的实施方式,在某些可选的实施方式中,所述取值确定单元300,包括:第一取值确定子单元;In conjunction with the implementation shown in FIG2 , in some optional implementations, the value determination unit 300 includes: a first value determination subunit;

所述第一取值确定子单元,被配置为执行查询预先建立的取值对照表,从而查询获得各所述特征码组合中的参数项特征码对应的取值范围,其中,所述取值对照表记录各所述参数项特征码对应的取值范围。The first value determination subunit is configured to query a pre-established value comparison table to obtain the value range corresponding to the parameter item feature code in each feature code combination, wherein the value comparison table records the value range corresponding to each parameter item feature code.

结合图2所示的实施方式,在某些可选的实施方式中,所述取值确定单元300,包括:第二取值确定子单元;In conjunction with the implementation shown in FIG2 , in some optional implementations, the value determination unit 300 includes: a second value determination subunit;

所述第二取值确定子单元,被配置为执行根据预先建立的取值计算公式,计算得到各所述特征码组合中的参数项特征码对应的取值范围,其中,所述取值计算公式与所述参数项特征码相匹配。The second value determination subunit is configured to execute a pre-established value calculation formula to calculate a value range corresponding to the parameter item feature code in each feature code combination, wherein the value calculation formula matches the parameter item feature code.

结合图2所示的实施方式,在某些可选的实施方式中,所述按照预先建立的压缩规则,将各所述特征码组合和相应的各所述取值范围压缩成至少一个压缩特征码,包括:In conjunction with the implementation shown in FIG. 2 , in some optional implementations, the compression of each of the feature code combinations and the corresponding value ranges into at least one compressed feature code according to a pre-established compression rule includes:

若各所述取值范围均不重复,则将各所述特征码组合和相应的各所述取值范围划分为N组,其中,每组均包括至少一对:所述特征码组合和相应的所述取值范围,所述N为大于0的整数;If the value ranges are not repeated, the feature code combinations and the corresponding value ranges are divided into N groups, wherein each group includes at least one pair: the feature code combination and the corresponding value range, and N is an integer greater than 0;

对于每一组:将所包括的所述特征码组合和相应的所述取值范围压缩成一个所述压缩特征码。For each group: compress the included feature code combination and the corresponding value range into one compressed feature code.

结合图2所示的实施方式,在某些可选的实施方式中,所述特征码压缩单元400,包括:第一划分子单元和第一特征码压缩子单元;In conjunction with the implementation shown in FIG2 , in some optional implementations, the feature code compression unit 400 includes: a first division subunit and a first feature code compression subunit;

所述第一划分子单元,被配置为执行若各所述取值范围中存在相同的取值,则将各所述特征码组合和相应的所述取值范围划分为M组,其中,每组均包括至少一对:所述特征码组合和相应的所述取值范围,且每组所包括的各所述取值范围不重复,所述M为大于0的整数;The first division subunit is configured to divide each of the feature code combinations and the corresponding value ranges into M groups if there are identical values in each of the value ranges, wherein each group includes at least one pair: the feature code combination and the corresponding value range, and the value ranges included in each group are not repeated, and M is an integer greater than 0;

所述第一特征码压缩子单元,被配置为执行对于每一组:将所包括的所述特征码组合和相应的所述取值范围压缩成一个所述压缩特征码。The first feature code compression subunit is configured to execute, for each group, compressing the included feature code combination and the corresponding value range into one compressed feature code.

结合图2所示的实施方式,在某些可选的实施方式中,所述特征码压缩单元400,包括:映射子单元、第二划分子单元和第二特征码压缩子单元;In conjunction with the implementation shown in FIG2 , in some optional implementations, the feature code compression unit 400 includes: a mapping subunit, a second division subunit, and a second feature code compression subunit;

所述映射子单元,被配置为执行若各所述参数项特征码对应的取值范围中存在相同的取值,则将所述相同的取值映射为其它映射值,以更新存在相同的取值的所述取值范围,其中,更新后的各所述取值范围之间不重复,且更新后的各所述取值范围与原先未存在相同的取值的各所述取值范围之间不重复;The mapping subunit is configured to execute, if there are identical values in the value ranges corresponding to the characteristic codes of the parameter items, mapping the identical values to other mapping values to update the value ranges with identical values, wherein the updated value ranges are not repeated, and the updated value ranges are not repeated with the original value ranges without identical values;

所述第二划分子单元,被配置为执行将更新后的各所述取值范围和/或原先未存在相同的取值的各所述取值范围,以及相应的各所述特征码组合划分为K组,其中,每组均包括至少一对:所述特征码组合和相应的更新后的所述取值范围,或者每组均包括至少一对:所述特征码组合和相应的原先未存在相同的取值的各所述取值范围,所述K为大于0的整数;The second division subunit is configured to divide the updated value ranges and/or the value ranges that did not originally have the same value, and the corresponding feature code combinations into K groups, wherein each group includes at least one pair: the feature code combination and the corresponding updated value range, or each group includes at least one pair: the feature code combination and the corresponding value ranges that did not originally have the same value, and K is an integer greater than 0;

所述第二特征码压缩子单元,被配置为执行对于每一组:将所包括的将更新后的各所述取值范围和/或原先未存在相同的取值的各所述取值范围,以及相应的各所述特征码组合压缩成一个所述压缩特征码。The second feature code compression subunit is configured to perform, for each group, compressing the updated value ranges and/or the value ranges that did not originally have the same value, and the corresponding feature code combinations into one compressed feature code.

本发明提供了一种计算机可读存储介质,其上存储有程序,所述程序被处理器执行时实现任一项所述的测试环境配置参数的备份方法。The present invention provides a computer-readable storage medium on which a program is stored. When the program is executed by a processor, the method for backing up the configuration parameters of any one of the test environments is implemented.

如图3所示,本发明提供了一种电子设备70,所述电子设备70包括至少一个处理器701、以及与所述701处理器连接的至少一个存储器702、总线703;其中,所述处理器701、所述存储器702通过所述总线703完成相互间的通信;所述处理器701用于调用所述存储器702中的程序指令,以执行上述任一项所述的测试环境配置参数的备份方法。As shown in Figure 3, the present invention provides an electronic device 70, which includes at least one processor 701, and at least one memory 702 and a bus 703 connected to the processor 701; wherein the processor 701 and the memory 702 communicate with each other through the bus 703; the processor 701 is used to call the program instructions in the memory 702 to execute the backup method of the test environment configuration parameters described in any of the above items.

在本申请中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。In this application, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or equipment including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or equipment. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or equipment including the elements.

本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

对所公开的实施例的上述说明,使本领域专业技术人员能够实现或使用本发明。对这些实施例的多种修改对本领域的专业技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本发明的精神或范围的情况下,在其它实施例中实现。因此,本发明将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

以上所述仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。凡在本发明的精神和原则之内所作的任何修改、等同替换、改进等,均包含在本发明的保护范围内。The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims (10)

1. A backup method for testing environment configuration parameters, comprising:
obtaining a test environment to be backed up, wherein the test environment comprises: operating system resources, basic software resources, application installation package resources, general operation and maintenance monitoring tool resources and test data resources;
according to a pre-established feature code extraction rule, respectively carrying out multi-dimensional feature code extraction on configuration parameter items of each resource to respectively obtain at least one feature code combination corresponding to each resource, wherein the configuration parameter items and the feature code combinations are in one-to-one correspondence, and each feature code combination comprises: the system comprises a parameter item feature code, a parameter item set feature code and a hierarchy feature code, wherein the parameter item set feature code represents a parameter item set where the configuration parameter item corresponding to the parameter item feature code is located, and the hierarchy feature code represents the resource to which the parameter item set belongs;
determining a value range corresponding to the parameter item feature codes in each feature code combination according to a pre-established value rule;
for any of the resources: compressing each feature code combination and each corresponding value range into at least one compression feature code according to a pre-established compression rule, wherein each value range used in the compression process of the same compression feature code is not repeated, the compression feature code at least comprises a feature code part and a value range part, the feature code part is a set of each feature code combination used in the compression process of the compression feature code, and the value range part is a set of each value range used in the compression process of the compression feature code;
And storing each compression feature code to backup configuration parameter items of each resource of the test environment.
2. The method of claim 1, wherein the feature code extraction rule comprises:
for any test environment, dividing hierarchical feature codes according to five levels of operating system resources, basic software resources, application installation package resources, general operation and maintenance monitoring tool resources and test data resources, wherein the hierarchical feature codes corresponding to different resources are different;
wherein the operating system resource corresponds to a first level feature code;
the basic software resource corresponds to a second-level feature code;
the application installation package resource corresponds to a third hierarchical feature code;
the universal operation and maintenance monitoring tool resource corresponds to a fourth-level feature code;
the test data resource corresponds to a fifth-level secondary feature code;
for any resource, dividing parameter item set feature codes according to different parameter item sets corresponding to different parameter item set feature codes;
wherein the first type parameter item set corresponds to a first parameter item set feature code;
the second class of parameter item sets correspond to the second parameter item set feature codes;
The third type of parameter item set corresponds to a third parameter item set feature code, and so on;
for any parameter item set, dividing according to different parameter item characteristics corresponding to different parameter items;
wherein the first parameter item corresponds to a first parameter item feature code;
the second parameter item corresponds to a second parameter item feature code;
the third parameter term corresponds to a third parameter term signature, and so on.
3. The method according to claim 1, wherein the determining, according to a pre-established value rule, a value range corresponding to a parameter item feature code in each feature code combination includes:
inquiring a pre-established value comparison table so as to inquire and obtain a value range corresponding to the parameter item feature codes in the feature code combinations, wherein the value comparison table records the value range corresponding to the parameter item feature codes.
4. The method according to claim 1, wherein the determining, according to a pre-established value rule, a value range corresponding to a parameter item feature code in each feature code combination includes:
and calculating to obtain a value range corresponding to the parameter item feature code in each feature code combination according to a pre-established value calculation formula, wherein the value calculation formula is matched with the parameter item feature code.
5. The method of claim 1, wherein compressing each of the combinations of feature codes and corresponding ones of the ranges of values into at least one compressed feature code according to a pre-established compression rule comprises:
if the value ranges are not repeated, dividing each feature code combination and each corresponding value range into N groups, wherein each group comprises at least one pair of: the characteristic code combination and the corresponding value range, wherein N is an integer greater than 0;
for each group: compressing the included combination of feature codes and the corresponding range of values into one of the compressed feature codes.
6. The method of claim 1, wherein compressing each of the combinations of feature codes and corresponding ones of the ranges of values into at least one compressed feature code according to a pre-established compression rule comprises:
if the same value exists in each value range, dividing each feature code combination and the corresponding value range into M groups, wherein each group comprises at least one pair of: the characteristic code combination and the corresponding value range are not repeated, and each value range included in each group is an integer greater than 0;
For each group: compressing the included combination of feature codes and the corresponding range of values into one of the compressed feature codes.
7. The method of claim 1, wherein compressing each of the combinations of feature codes and corresponding ones of the ranges of values into at least one compressed feature code according to a pre-established compression rule comprises:
if the same value exists in the value range corresponding to the parameter item feature code, mapping the same value into other mapping values to update the value range with the same value, wherein the updated value ranges are not repeated, and the updated value ranges are not repeated with the value ranges with the same value which are not existed originally;
dividing the updated value ranges and/or the value ranges which do not have the same value originally, and the corresponding feature code combinations into K groups, wherein each group comprises at least one pair of: the combination of feature codes and the corresponding updated range of values, or each group includes at least one pair of: the characteristic code combination and the corresponding value ranges which do not have the same value originally are provided, and K is an integer larger than 0;
For each group: and compressing each included value range which is updated and/or each value range which does not have the same value originally, and each corresponding feature code combination into one compressed feature code.
8. A backup apparatus for testing environmental configuration parameters, comprising: the device comprises a test environment obtaining unit, a feature code extracting unit, a value determining unit, a feature code compressing unit and a feature code storage unit;
the test environment obtaining unit is configured to obtain a test environment to be backed up, and the test environment includes: operating system resources, basic software resources, application installation package resources, general operation and maintenance monitoring tool resources and test data resources;
the feature code extraction unit is configured to perform feature code extraction of multiple dimensions on configuration parameter items of each resource according to a pre-established feature code extraction rule, so as to obtain at least one feature code combination corresponding to each resource, where the configuration parameter items correspond to a pair of feature code combinations, and each feature code combination includes: the system comprises a parameter item feature code, a parameter item set feature code and a hierarchy feature code, wherein the parameter item set feature code represents a parameter item set where the configuration parameter item corresponding to the parameter item feature code is located, and the hierarchy feature code represents the resource to which the parameter item set belongs;
The value determining unit is configured to determine a value range corresponding to the parameter item feature code in each feature code combination according to a pre-established value rule;
the signature compression unit is configured to perform, for any one of the resources: compressing each feature code combination and each corresponding value range into at least one compression feature code according to a pre-established compression rule, wherein each value range used in the compression process of the same compression feature code is not repeated, the compression feature code at least comprises a feature code part and a value range part, the feature code part is a set of each feature code combination used in the compression process of the compression feature code, and the value range part is a set of each value range used in the compression process of the compression feature code;
the feature code storage unit is configured to store each compressed feature code so as to backup the configuration parameter item of each resource of the test environment.
9. A computer-readable storage medium, on which a program is stored, characterized in that the program, when executed by a processor, implements a backup method of test environment configuration parameters according to any one of claims 1 to 7.
10. An electronic device comprising at least one processor, and at least one memory, bus coupled to the processor; the processor and the memory complete communication with each other through the bus; the processor is configured to invoke program instructions in the memory to perform a backup method of test environment configuration parameters according to any of claims 1 to 7.
CN202111120272.1A 2021-09-24 2021-09-24 A test environment configuration parameter backup method and related device Active CN113836018B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111120272.1A CN113836018B (en) 2021-09-24 2021-09-24 A test environment configuration parameter backup method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111120272.1A CN113836018B (en) 2021-09-24 2021-09-24 A test environment configuration parameter backup method and related device

Publications (2)

Publication Number Publication Date
CN113836018A CN113836018A (en) 2021-12-24
CN113836018B true CN113836018B (en) 2024-04-09

Family

ID=78969817

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111120272.1A Active CN113836018B (en) 2021-09-24 2021-09-24 A test environment configuration parameter backup method and related device

Country Status (1)

Country Link
CN (1) CN113836018B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103067525A (en) * 2013-01-18 2013-04-24 广东工业大学 Cloud storage data backup method based on characteristic codes
GB201419929D0 (en) * 2014-11-10 2014-12-24 Inst Information Industry Backup method, pre-testing method for environment updating and system thereof
CN106126427A (en) * 2016-07-06 2016-11-16 中国银联股份有限公司 A kind of method and system of fast quick-recovery test
CN111240892A (en) * 2019-12-02 2020-06-05 泰康保险集团股份有限公司 Data backup method and device
CN112988458A (en) * 2019-12-18 2021-06-18 中国移动通信集团四川有限公司 Data backup method and device, electronic equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2513528A (en) * 2012-10-09 2014-11-05 Ibm Method and system for backup management of software environments in a distributed network environment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103067525A (en) * 2013-01-18 2013-04-24 广东工业大学 Cloud storage data backup method based on characteristic codes
GB201419929D0 (en) * 2014-11-10 2014-12-24 Inst Information Industry Backup method, pre-testing method for environment updating and system thereof
CN106126427A (en) * 2016-07-06 2016-11-16 中国银联股份有限公司 A kind of method and system of fast quick-recovery test
CN111240892A (en) * 2019-12-02 2020-06-05 泰康保险集团股份有限公司 Data backup method and device
CN112988458A (en) * 2019-12-18 2021-06-18 中国移动通信集团四川有限公司 Data backup method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN113836018A (en) 2021-12-24

Similar Documents

Publication Publication Date Title
JP6427592B2 (en) Manage data profiling operations related to data types
JP5601066B2 (en) Information integration program, apparatus and method
CN107038222B (en) Database cache implementation method and system
CN110134705A (en) A data query method, cache server and terminal
US20230267116A1 (en) Translation of tenant identifiers
CN112148794B (en) Version management method, device and storage medium of intelligent contract
CN114911830A (en) Index caching method, device, equipment and storage medium based on time sequence database
CN112256698A (en) Automatic table relation association method based on multi-Hash function
CN103176905B (en) A defect correlation method and device
CN111538651B (en) Interface testing method, device, server and storage medium
CN105302915A (en) High-performance data processing system based on memory calculation
CN115617773A (en) Data migration method, device and system
WO2013111287A1 (en) Sparql query optimization method
CN111046106A (en) Cache data synchronization method, device, device and medium
CN113836018B (en) A test environment configuration parameter backup method and related device
CN110362560A (en) A method of without business major key data at storing data library duplicate removal
CN110389953A (en) Data storage method, storage medium, storage device and server based on compressed graph
CN111881220B (en) Data operation method and device under list storage, electronic equipment and storage medium
AU2019350694B2 (en) Identification of records for post-cloning tenant identifier translation
CN107544916B (en) Caching method and storage device
CN113282579A (en) Heterogeneous data storage and retrieval method, device, equipment and storage medium
CN111125216A (en) Method and device for importing data into Phoenix
CN114118944A (en) Forensic laboratory grading management method, terminal device and storage medium
CN116431677B (en) Data routing method, system and readable storage medium based on in-memory database
CN114942766B (en) Excel function conversion method and related device based on SQL database

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