[go: up one dir, main page]

CN111475400A - A verification method for a business platform and related equipment - Google Patents

A verification method for a business platform and related equipment Download PDF

Info

Publication number
CN111475400A
CN111475400A CN202010180487.1A CN202010180487A CN111475400A CN 111475400 A CN111475400 A CN 111475400A CN 202010180487 A CN202010180487 A CN 202010180487A CN 111475400 A CN111475400 A CN 111475400A
Authority
CN
China
Prior art keywords
domain name
verification
preset
service platform
production
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
CN202010180487.1A
Other languages
Chinese (zh)
Other versions
CN111475400B (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.)
Ping An International Smart City Technology Co Ltd
Original Assignee
Ping An International Smart City 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 Ping An International Smart City Technology Co Ltd filed Critical Ping An International Smart City Technology Co Ltd
Priority to CN202010180487.1A priority Critical patent/CN111475400B/en
Publication of CN111475400A publication Critical patent/CN111475400A/en
Application granted granted Critical
Publication of CN111475400B publication Critical patent/CN111475400B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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
    • 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/3698Environments for analysis, debugging or testing of software
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本申请实施例公开了一种业务平台的验证方法及相关设备,所述方法应用于测试技术领域,包括:当服务器接收到业务平台在上线后发送的数据访问请求时,可以基于预设选取规则从至少两个预设数据库中确定出与数据访问请求中携带的域名匹配的目标数据库,并通过目标数据库执行数据访问请求对应的数据操作。实施本申请实施例,对基于不同域名的数据访问,可以采用不同的目标数据库执行数据操作,从而高效地实现对上线后的业务平台的验证。

Figure 202010180487

The embodiment of the present application discloses a verification method for a business platform and related equipment. The method is applied to the technical field of testing, including: when a server receives a data access request sent by the business platform after going online, it can select a rule based on a preset A target database matching the domain name carried in the data access request is determined from at least two preset databases, and a data operation corresponding to the data access request is performed through the target database. By implementing the embodiments of the present application, for data access based on different domain names, different target databases can be used to perform data operations, thereby effectively realizing the verification of the online business platform.

Figure 202010180487

Description

一种业务平台的验证方法及相关设备A verification method for a business platform and related equipment

技术领域technical field

本发明涉及测试技术领域,尤其涉及一种业务平台的验证方法及相关设备。The invention relates to the technical field of testing, in particular to a verification method and related equipment of a business platform.

背景技术Background technique

在业务平台开发完成或者版本更迭时,通常需要在上线之前对该业务平台进行验证,但是测试、开发环境的部署情况、网络情况、历史数据、配置等信息很难与生产环境的配置完全一致,业务平台上线后,开发、测试、运营等人员无法对生产环境下(即上线后)的业务平台进行验证,针对本次上线变更的内容是否正常,功能流程是否能正常使用是未知数,只有等普通用户使用的时候才能暴露出来,不能及时发现问题并解决。因此,如何实现生产环境下对业务平台进行验证,成为一个亟待解决的问题。When the development of the business platform is completed or the version is changed, it is usually necessary to verify the business platform before going online. However, it is difficult for the test, development environment deployment, network situation, historical data, configuration and other information to be completely consistent with the configuration of the production environment. After the business platform goes online, development, testing, operation and other personnel cannot verify the business platform in the production environment (that is, after going online). It is unknown whether the content of this online change is normal and whether the functional process can be used normally. Only when the user uses it can it be exposed, and the problem cannot be found and solved in time. Therefore, how to realize the verification of the business platform in the production environment has become an urgent problem to be solved.

发明内容SUMMARY OF THE INVENTION

本申请实施例提供了一种业务平台的验证方法及相关设备,可以高效地实现对上线后的业务平台的验证。The embodiments of the present application provide a service platform verification method and related equipment, which can efficiently realize the verification of the online service platform.

第一方面本申请实施例提供一种业务平台的验证方法,所述方法应用于该业务平台对应的服务器,该方法包括:The first aspect The embodiment of the present application provides a verification method for a business platform, the method is applied to a server corresponding to the business platform, and the method includes:

接收所述业务平台在上线后发送的携带有域名的数据访问请求,所述域名包括验证域名或者生产域名,所述验证域名用于第一用户在生产环境下对所述业务平台进行验证,所述生产域名用于第二用户在所述生产环境下访问所述业务平台;Receive a data access request carrying a domain name sent by the business platform after going online, where the domain name includes a verification domain name or a production domain name, and the verification domain name is used for the first user to verify the business platform in a production environment, so the domain name includes a verification domain name or a production domain name. The production domain name is used for the second user to access the business platform in the production environment;

基于预设选取规则从至少两个预设数据库中确定出与所述域名匹配的目标数据库;Determine a target database matching the domain name from at least two preset databases based on a preset selection rule;

通过所述目标数据库执行所述数据访问请求对应的数据操作,所述数据操作包括数据的查询和/或数据的写入。The data operation corresponding to the data access request is performed by using the target database, and the data operation includes data query and/or data writing.

在一个实施例中,所述至少两个预设数据库包括生产数据库和验证数据库,所述基于预设数据库选取规则从至少两个预设数据库中确定出与所述域名匹配的目标数据库的具体实施方式为:In one embodiment, the at least two preset databases include a production database and a verification database, and the specific implementation of determining a target database matching the domain name from the at least two preset databases based on a preset database selection rule The way is:

若检测到数据访问请求中携带的域名为验证域名,则将所述数据访问请求携带的验证令牌与验证域名下的预设验证令牌进行对比;If it is detected that the domain name carried in the data access request is a verification domain name, the verification token carried in the data access request is compared with the preset verification token under the verification domain name;

若对比得到所述验证令牌与所述预设验证令牌匹配,则从至少两个预设数据库中将验证数据库确定为与所述验证域名匹配的目标数据库。If the comparison shows that the verification token matches the preset verification token, the verification database is determined from at least two preset databases as the target database matching the verification domain name.

在一个实施例中,所述将所述数据访问请求携带的验证令牌与验证域名下的预设验证令牌进行对比之后,还可以若对比得到所述验证令牌与所述预设验证令牌不匹配,则从至少两个预设数据库中将生产数据库确定为与所述验证域名匹配的目标数据库。In one embodiment, after the verification token carried in the data access request is compared with the preset verification token under the verification domain name, the verification token and the preset verification token may be obtained by comparison. If the cards do not match, the production database is determined from at least two preset databases as the target database matching the verification domain name.

在一个实施例中,所述至少两个预设数据库包括生产数据库和验证数据库,所述基于预设数据库选取规则从至少两个预设数据库中确定出与所述域名匹配的目标数据库的具体实施方式为:若检测到数据访问请求中携带的域名为生产域名,则从至少两个预设数据库中将生产数据库确定为与所述生产域名匹配的目标数据库。In one embodiment, the at least two preset databases include a production database and a verification database, and the specific implementation of determining a target database matching the domain name from the at least two preset databases based on a preset database selection rule The method is as follows: if it is detected that the domain name carried in the data access request is the production domain name, the production database is determined from at least two preset databases as the target database matching the production domain name.

在一个实施例中,还可以通过至少一个测试用例对上线后的所述业务平台进行生产环境下的验证;若检测到第一测试用例对所述上线后的业务平台的验证未通过,则确定当前版本的所述业务平台运行错误,所述第一测试用例为所述至少一个测试用例中的任一个;对所述当前版本的业务平台执行版本回滚操作。In one embodiment, at least one test case can also be used to verify the online business platform in a production environment; if it is detected that the first test case fails to verify the online business platform, determine The business platform of the current version runs incorrectly, and the first test case is any one of the at least one test case; and a version rollback operation is performed on the business platform of the current version.

在一个实施例中,所述对所述当前版本的业务平台执行版本回滚操作之前,还可以检测所述验证未通过对应的异常类型;若所述异常类型为预设类型,则触发执行所述对所述当前版本的业务平台执行版本回滚操作的步骤,所述预设类型包括空指针异常或者业务异常。In one embodiment, before the version rollback operation is performed on the current version of the business platform, an exception type corresponding to the failed verification may also be detected; if the exception type is a preset type, the execution of the The steps of performing a version rollback operation on the current version of the service platform are described, and the preset type includes a null pointer exception or a service exception.

在一个实施例中,还可以若检测到第一测试用例对所述上线后的业务平台的验证未通过,则确定所述验证未通过对应的异常类型是否为所述业务平台的子模块异常或者日志异常;若确定所述验证未通过对应的异常类型为所述子模块异常或者日志异常,则输出告警信息。In one embodiment, if it is detected that the first test case fails the verification of the online business platform, it is also possible to determine whether the abnormality type corresponding to the failed verification is a sub-module abnormality of the business platform or Log abnormality; if it is determined that the abnormality type corresponding to the failed verification is the submodule abnormality or the log abnormality, output alarm information.

第二方面,本申请实施例提供了一种业务平台的验证装置,该业务平台的验证装置包括用于执行上述第一方面的方法的模块。In a second aspect, an embodiment of the present application provides an apparatus for verifying a service platform, where the apparatus for verifying a service platform includes a module for executing the method of the first aspect above.

第三方面,本申请实施例提供了一种服务器,该服务器包括处理器、网络接口和存储器,所述处理器、网络接口和存储器相互连接,其中,所述网络接口受所述处理器的控制用于收发消息,所述存储器用于存储支持服务器执行上述方法的计算机程序,所述计算机程序包括程序指令,所述处理器被配置用于调用所述程序指令,执行上述第一方面的方法。In a third aspect, an embodiment of the present application provides a server, the server includes a processor, a network interface, and a memory, the processor, the network interface, and the memory are connected to each other, wherein the network interface is controlled by the processor For sending and receiving messages, the memory is used to store a computer program for supporting the server to execute the above method, the computer program includes program instructions, and the processor is configured to invoke the program instructions to execute the method of the first aspect.

第四方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令当被处理器执行时使所述处理器执行上述第一方面的方法。In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and the computer program includes program instructions that, when executed by a processor, cause all The processor executes the method of the first aspect.

本申请实施例中,当服务器接收到业务平台在上线后发送的数据访问请求时,可以基于预设选取规则从至少两个预设数据库中确定出与数据访问请求中携带的域名匹配的目标数据库,并通过目标数据库执行数据访问请求对应的数据操作。对基于不同域名的数据访问,可以采用不同的目标数据库执行数据操作,从而高效地实现对上线后的业务平台的验证。In this embodiment of the present application, when the server receives a data access request sent by the business platform after going online, it may determine a target database matching the domain name carried in the data access request from at least two preset databases based on preset selection rules , and perform data operations corresponding to data access requests through the target database. For data access based on different domain names, different target databases can be used to perform data operations, so as to efficiently verify the online business platform.

附图说明Description of drawings

为了更清楚地说明本申请实施例技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the technical solutions of the embodiments of the present application more clearly, the following will briefly introduce the accompanying drawings used in the description of the embodiments. For those of ordinary skill, other drawings can also be obtained from these drawings without any creative effort.

图1是本申请实施例提供的一种业务平台的验证系统的结构示意图;1 is a schematic structural diagram of a verification system of a business platform provided by an embodiment of the present application;

图2是本申请实施例提供的一种业务平台的验证方法的流程示意图;2 is a schematic flowchart of a verification method for a business platform provided by an embodiment of the present application;

图3是本申请实施例提供的另一种业务平台的验证方法的流程示意图;3 is a schematic flowchart of a verification method for another business platform provided by an embodiment of the present application;

图4是本申请实施例提供的一种业务平台的验证装置的示意性框图;4 is a schematic block diagram of a verification device for a service platform provided by an embodiment of the present application;

图5是本申请实施例提供的一种服务器的示意性框图。FIG. 5 is a schematic block diagram of a server provided by an embodiment of the present application.

具体实施方式Detailed ways

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

参见图1,是本申请实施例提供的一种业务平台的验证系统,该验证系统包括业务平台100和业务平台对应的服务器200,该服务器预先设置至少两个数据库,包括生产数据库和验证数据库。在一个实施例中,可以预先配置生产域名和验证域名,该验证域名用于第一用户在生产环境下对业务平台进行验证,该生产域名用于第二用户在生产环境下访问该业务平台。其中,该第一用户可以理解为开发、测试、运营等需要对业务平台进行验证的人员,第一用户访问上线后的业务平台使用该验证域名,并通过该验证域名对生产环境下的业务平台进行验证;该第二用户为使用业务平台的普通用户,第二用户访问上线后的业务平台使用生产域名。Referring to FIG. 1 , it is a verification system for a business platform provided by an embodiment of the present application. The verification system includes a business platform 100 and a server 200 corresponding to the business platform. The server is preset with at least two databases, including a production database and a verification database. In one embodiment, a production domain name and a verification domain name may be pre-configured, the verification domain name is used for the first user to verify the business platform in the production environment, and the production domain name is used for the second user to access the business platform in the production environment. Among them, the first user can be understood as a person who needs to verify the business platform for development, testing, operation, etc. The first user accesses the business platform after going online and uses the verification domain name, and uses the verification domain name to verify the business platform in the production environment. Verify; the second user is an ordinary user using the business platform, and the second user accesses the online business platform using the production domain name.

进一步地,第一用户或者第二用户可以通过业务平台100向服务器200发送携带有自身对应域名的数据访问请求,服务器200接收到业务平台100在上线后发送的携带有域名的数据访问请求时,可以基于预设选取规则从至少两个预设数据库中确定出与该域名匹配的目标数据库,并通过目标数据库执行数据访问请求对应的数据操作,数据操作包括数据的查询和/或数据的写入。其中,该目标数据库包括生产数据库或者验证数据库。实施本申请实施例,可以在接收来自不同域名的数据访问请求时,采用与域名匹配的目标数据库执行数据访问请求对应的数据操作,一方面使得不同域名下的数据访问产生的数据相互之间隔离,不会相互污染;另一方面,可以第一用户可以通过验证域名对生产环境下的业务平台进行验证,高效地实现对生产环境下业务平台的验证。Further, the first user or the second user can send a data access request carrying its own corresponding domain name to the server 200 through the business platform 100, and when the server 200 receives the data access request carrying the domain name sent by the business platform 100 after going online, A target database matching the domain name can be determined from at least two preset databases based on preset selection rules, and a data operation corresponding to the data access request is performed through the target database, and the data operation includes data query and/or data writing . Wherein, the target database includes a production database or a verification database. By implementing the embodiments of the present application, when receiving data access requests from different domain names, a target database matching the domain names can be used to perform data operations corresponding to the data access requests, and on the one hand, data generated by data access under different domain names can be isolated from each other. , will not contaminate each other; on the other hand, the first user can verify the business platform in the production environment by verifying the domain name, and effectively realize the verification of the business platform in the production environment.

可以理解的是,本申请实施例描述的业务平台的验证系统是为了更加清楚的说明本申请实施例的技术方案,并不构成对于本申请实施例提供的技术方案的限定,本领域普通技术人员可知,随着系统架构的演变和新业务场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。It can be understood that the verification system of the business platform described in the embodiments of the present application is for the purpose of illustrating the technical solutions of the embodiments of the present application more clearly, and does not constitute a limitation on the technical solutions provided by the embodiments of the present application. It can be seen that, with the evolution of the system architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

参见图2,图2是本申请实施例提供的一种业务平台的验证方法的流程示意图,该方法应用于服务器,可由服务器执行,如图所示,该业务平台的验证方法可包括:Referring to FIG. 2, FIG. 2 is a schematic flowchart of a verification method of a business platform provided by an embodiment of the present application. The method is applied to a server and can be executed by the server. As shown in the figure, the verification method of the business platform may include:

S201:接收业务平台在上线后发送的携带有域名的数据访问请求,该域名包括验证域名或者生产域名,该验证域名用于第一用户在生产环境下对业务平台进行验证,该生产域名用于第二用户在生产环境下访问该业务平台。S201: Receive a data access request carrying a domain name sent by the business platform after going online, where the domain name includes a verification domain name or a production domain name, the verification domain name is used for the first user to verify the business platform in the production environment, and the production domain name is used for The second user accesses the business platform in the production environment.

在一个实施例中,开发人员可以预先配置生产域名和验证域名,该验证域名用于第一用户在生产环境下对业务平台进行验证,该生产域名用于第二用户在生产环境下访问该业务平台。其中,该第一用户可以理解为开发、测试、运营等需要对业务平台进行验证的人员,第一用户访问上线后的业务平台使用该验证域名,并通过该验证域名对生产环境下的业务平台进行验证;该第二用户为使用业务平台的普通用户,第二用户访问上线后的业务平台使用生产域名。In one embodiment, the developer can pre-configure a production domain name and a verification domain name, where the verification domain name is used for the first user to verify the service platform in the production environment, and the production domain name is used for the second user to access the service in the production environment platform. Among them, the first user can be understood as a person who needs to verify the business platform for development, testing, operation, etc. The first user accesses the business platform after going online and uses the verification domain name, and uses the verification domain name to verify the business platform in the production environment. Verify; the second user is an ordinary user using the business platform, and the second user accesses the online business platform using the production domain name.

在一个实施例中,第一用户可以通过验证域名访问业务平台,这种情况下,业务平台可以生成携带有验证域名的数据访问请求,并向业务平台对应的服务器发送该携带有验证域名的数据访问请求。In one embodiment, the first user can access the business platform by verifying the domain name. In this case, the business platform can generate a data access request carrying the verification domain name, and send the data carrying the verification domain name to the server corresponding to the business platform. access request.

在一个实施例中,第二用户可以通过生产域名访问业务平台,这种情况下,业务平台可以生成携带有生产域名的数据访问请求,并向业务平台对应的服务器发送该携带有生产域名的数据访问请求。In one embodiment, the second user can access the business platform through the production domain name. In this case, the business platform can generate a data access request carrying the production domain name, and send the data carrying the production domain name to the server corresponding to the business platform. access request.

S202:基于预设选取规则从至少两个预设数据库中确定出与域名匹配的目标数据库。S202: Determine a target database matching the domain name from at least two preset databases based on a preset selection rule.

S203:通过目标数据库执行数据访问请求对应的数据操作,该数据操作包括数据的查询和/或数据的写入。S203: Execute a data operation corresponding to the data access request through the target database, where the data operation includes data query and/or data writing.

其中,上述至少两个预设数据库包括生产数据库和验证数据库。在一个实施例中,服务器可以基于预设选取规则从至少两个预设数据库中确定出与域名匹配的目标数据库,该目标数据库包括生产数据库或者验证数据库,进一步地,通过目标数据库执行数据访问请求对应的数据操作。采用与域名匹配的目标数据库执行数据访问请求对应的数据操作,可以使得基于不同域名的数据访问在业务平台产生的数据存储在不同的目标数据库中,使得数据之间相互隔离,不会相互污染,不仅有利于保证高效地实现对生产环境下业务平台的验证,还可以使得验证过程所产生的数据不对第二用户的访问产生影响,保证业务平台的性能。Wherein, the above-mentioned at least two preset databases include a production database and a verification database. In one embodiment, the server may determine a target database matching the domain name from at least two preset databases based on a preset selection rule, where the target database includes a production database or a verification database, and further, execute a data access request through the target database corresponding data operations. Using the target database matching the domain name to perform the data operation corresponding to the data access request can make the data generated in the business platform based on the data access of different domain names stored in different target databases, so that the data are isolated from each other and will not pollute each other. Not only is it beneficial to ensure efficient verification of the business platform in the production environment, but also the data generated during the verification process does not affect the access of the second user, thereby ensuring the performance of the business platform.

本申请实施例中,当服务器接收到业务平台在上线后发送的数据访问请求时,可以基于预设选取规则从至少两个预设数据库中确定出与数据访问请求中携带的域名匹配的目标数据库,并通过目标数据库执行数据访问请求对应的数据操作。对基于不同域名的数据访问,可以采用不同的目标数据库执行数据操作,从而高效地实现对上线后的业务平台的验证。In this embodiment of the present application, when the server receives a data access request sent by the business platform after going online, it may determine a target database matching the domain name carried in the data access request from at least two preset databases based on preset selection rules , and perform data operations corresponding to data access requests through the target database. For data access based on different domain names, different target databases can be used to perform data operations, so as to efficiently verify the online business platform.

参见图3,图3是本申请实施例提供的另一种业务平台的验证方法的示意图,该方法应用于服务器,可由服务器执行,如图所示,该业务平台的验证方法可包括:Referring to FIG. 3, FIG. 3 is a schematic diagram of another verification method of a business platform provided by an embodiment of the present application. The method is applied to a server and can be executed by the server. As shown in the figure, the verification method of the business platform may include:

S301:接收业务平台在上线后发送的携带有域名的数据访问请求,该域名包括验证域名或者生产域名,该验证域名用于第一用户在生产环境下对业务平台进行验证,该生产域名用于第二用户在生产环境下访问该业务平台。S301: Receive a data access request carrying a domain name sent by the business platform after going online, the domain name includes a verification domain name or a production domain name, the verification domain name is used for the first user to verify the business platform in the production environment, and the production domain name is used for The second user accesses the business platform in the production environment.

S302:若检测到数据访问请求中携带的域名为验证域名,则将数据访问请求携带的验证令牌与验证域名下的预设验证令牌进行对比。S302: If it is detected that the domain name carried in the data access request is a verification domain name, compare the verification token carried in the data access request with a preset verification token under the verification domain name.

S303:若对比得到验证令牌与预设验证令牌匹配,则从至少两个预设数据库中将验证数据库确定为与域名匹配的目标数据库。其中,该至少两个预设数据库包括生产数据库和验证数据库。S303: If the verification token matches the preset verification token by comparison, determine the verification database from at least two preset databases as the target database matching the domain name. Wherein, the at least two preset databases include a production database and a verification database.

在一个实施例中,服务器将数据访问请求携带的验证令牌与验证域名下的预设验证令牌进行对比之后,若对比得到验证令牌与预设验证令牌不匹配,则从至少两个预设数据库中将生产数据库确定为与域名匹配的目标数据库。In one embodiment, after the server compares the verification token carried in the data access request with the preset verification token under the verification domain name, if the verification token does not match the preset verification token from the comparison, at least two In the preset database, the production database is determined as the target database matching the domain name.

在一个实施例中,通过验证域名进行访问的所有请求中均会携带validation-token(验证令牌)的请求头,开发人员可以预先配置验证域名下的验证令牌(即预设验证令牌)。这种情况,当服务器接收到业务平台在上线后发送的携带有域名的数据访问请求后,可以从该数据访问请求的请求头中检测是否存在验证令牌,若存在,则将数据访问请求携带的验证令牌与预设验证令牌进行对比,若对比得到数据访问请求携带的验证令牌与预设验证令牌相同,则可以确定验证令牌与预设验证令牌匹配。若对比得到数据访问请求携带的验证令牌与预设验证令牌不相同,则可以确定验证令牌与预设验证令牌不匹配。In one embodiment, all requests for access through the verification domain name will carry a verification-token (verification token) request header, and the developer can pre-configure the verification token under the verification domain name (that is, the preset verification token) . In this case, when the server receives the data access request carrying the domain name sent by the business platform after going online, it can detect whether there is a verification token from the request header of the data access request, and if so, carry the data access request with The verification token is compared with the preset verification token, and if the verification token carried in the data access request is the same as the preset verification token, it can be determined that the verification token matches the preset verification token. If the verification token carried in the data access request is different from the preset verification token by comparison, it can be determined that the verification token does not match the preset verification token.

在另一个实施例中,若服务器检测到数据访问请求中携带的域名为生产域名,则可以从至少两个预设数据库中将生产数据库确定为与该生产域名匹配的目标数据库。In another embodiment, if the server detects that the domain name carried in the data access request is the production domain name, the server may determine the production database from at least two preset databases as the target database matching the production domain name.

S304:通过目标数据库执行数据访问请求对应的数据操作,该数据操作包括数据的查询和/或数据的写入。S304: Execute a data operation corresponding to the data access request through the target database, where the data operation includes data query and/or data writing.

在一个实施例中,当确定出目标数据库后,本次数据访问过程中的所有数据的查询、写入均通过该目标数据库完成,从而实现业务平台在生产环境下的验证。In one embodiment, after the target database is determined, all data query and writing in this data access process are completed through the target database, thereby realizing the verification of the business platform in the production environment.

在一个实施例中,步骤S301中的数据访问请求是基于至少一个测试用例对上线后的业务平台进行生产环境下的验证时发出的。这种情况下,服务器可以通过至少一个测试用例对上线后的所述业务平台进行生产环境下的验证,若检测到第一测试用例对上线后的业务平台的验证未通过,则确定当前版本的业务平台运行错误,该第一测试用例为至少一个测试用例中的任一个。进一步地,服务器对当前版本的业务平台执行版本回滚操作。In one embodiment, the data access request in step S301 is sent when the online business platform is verified in a production environment based on at least one test case. In this case, the server can use at least one test case to verify the online business platform in the production environment, and if it is detected that the first test case fails to verify the online business platform, then determine the current version of the business platform. The business platform runs incorrectly, and the first test case is any one of at least one test case. Further, the server performs a version rollback operation on the current version of the business platform.

在一个实施例中,上述服务器对当前版本的业务平台执行版本回滚操作的具体实施方式为:获取所述当前版本对应的上一个历史版本的该业务平台的部署文件,将该当前版本的业务平台取消上线,并基于该部署文件重新部署该上一个历史版本的业务平台,进而实现对当前版本的业务平台的版本回滚操作。In one embodiment, the specific implementation of the server performing a version rollback operation on the current version of the business platform is: obtaining the deployment file of the business platform of the previous historical version corresponding to the current version, and the current version of the business platform. The platform is canceled online, and based on the deployment file, the business platform of the previous historical version is redeployed, thereby implementing the version rollback operation of the current version of the business platform.

例如,业务平台的验证域名为https://www.validation-dev.pazhengfuyun.com,针对这种情况,对于新版本上线后,测试、开发等人员可以在任意时间点通过https://www.validation-dev.pazhengfuyun.com域名访问业务平台。通过测试用例来验证该版本上线后变更的功能部分是否能正常使用,若出现不通过的测试用例,说明当前版本仍存在影响应用正常运行的问题,强行上线必然会对用户的使用造成一定的影响,此时采取版本回滚,重新部署上一次运行良好的应用,取消本次上线。For example, the verification domain name of the business platform is https://www.validation-dev.pazhengfuyun.com. In this case, after the new version is launched, testers and developers can pass https://www. The domain name validation-dev.pazhengfuyun.com accesses the business platform. Use test cases to verify whether the functional parts changed after the version goes online can be used normally. If there are test cases that fail, it means that the current version still has problems that affect the normal operation of the application. , at this time, roll back the version, redeploy the application that ran well last time, and cancel the current launch.

示例性地,假设当前版本的业务平台为2.1版本的业务平台,若需要对当前版本的业务平台的版本回滚操作,则可以取消该2.1版本的业务平台,并重新部署2.0版本的业务平台。Exemplarily, assuming that the current version of the business platform is the business platform of version 2.1, if the version rollback operation of the current version of the business platform is required, the business platform of version 2.1 can be cancelled and the business platform of version 2.0 can be redeployed.

在一个实施中,服务器对当前版本的业务平台执行版本回滚操作之前,还可以检测验证未通过对应的异常类型,若该异常类型为预设类型,则触发执行所述对当前版本的业务平台执行版本回滚操作的步骤,该预设类型包括空指针异常或者业务异常。In one implementation, before the server performs the version rollback operation on the current version of the business platform, it can also detect the corresponding exception type that fails the verification, and if the exception type is a preset type, trigger the execution of the current version of the business platform Steps for performing a version rollback operation. The preset type includes null pointer exceptions or business exceptions.

在另一个实施例中,若服务器检测到第一测试用例对上线后的业务平台的验证未通过,则确定验证未通过对应的异常类型是否为业务平台的子模块异常或者日志异常,若确定该验证未通过对应的异常类型为子模块异常或者日志异常,则输出告警信息。该告警信息用于提示该子模块异常或者日志异常。In another embodiment, if the server detects that the verification of the online business platform by the first test case fails, it determines whether the abnormal type corresponding to the failed verification is a sub-module abnormality or log abnormality of the business platform. If the corresponding exception type that fails the verification is a submodule exception or a log exception, an alarm message is output. The alarm information is used to indicate that the submodule is abnormal or the log is abnormal.

在一个实施例中,若服务器确定出该验证未通过对应的异常类型为子模块异常,则可以针对该子模块执行版本回滚操作。其中,该子模块可以业务平台对应的功能模块,或者子系统(例如用户登录系统)。In one embodiment, if the server determines that the exception type corresponding to the failed verification is a sub-module exception, the server may perform a version rollback operation for the sub-module. The sub-module may be a functional module corresponding to the business platform, or a subsystem (eg, a user login system).

在一个实施例中,在上述测试过程中,为避免生产环境出现服务器过载对业务平台产生影响,可以通过压力测试验证生产环境的最大负载能力。具体地,服务器可调用压力测试工具验证生产环境的最高并发量、吞吐量等,便于对生产环境硬件配置进行调整,以确保系统能应对高并、高吞吐情况下正常运行。本申请实施例中,当服务器检测到数据访问请求中携带的域名为验证域名时,可以将数据访问请求携带的验证令牌与验证域名下的预设验证令牌进行对比,若对比得到验证令牌与预设验证令牌匹配,则从至少两个预设数据库中将验证数据库确定为与域名匹配的目标数据库,并通过验证数据库执行数据访问请求对应的数据操作。可以高效地实验生产环境下对业务平台的验证。In one embodiment, in the above-mentioned test process, in order to avoid the impact of server overload on the business platform in the production environment, the maximum load capacity of the production environment can be verified through a stress test. Specifically, the server can call the stress testing tool to verify the maximum concurrency and throughput of the production environment, which facilitates adjustment of the hardware configuration of the production environment to ensure that the system can operate normally under high concurrency and high throughput conditions. In the embodiment of the present application, when the server detects that the domain name carried in the data access request is a verification domain name, it can compare the verification token carried in the data access request with the preset verification token under the verification domain name, and if the verification token is obtained from the comparison If the token matches the preset verification token, the verification database is determined from at least two preset databases as the target database matching the domain name, and the data operation corresponding to the data access request is performed through the verification database. The verification of the business platform in the production environment can be efficiently tested.

本申请实施例还提供了一种业务平台的验证装置。该装置包括用于执行前述图2或者图3所述的方法的模块,配置于服务器。具体地,参见图4,是本申请实施例提供的业务平台的验证装置的示意框图。本实施例的业务平台的验证装置包括:The embodiment of the present application also provides a verification device for a service platform. The apparatus includes a module for executing the method described in FIG. 2 or FIG. 3 , and is configured on the server. Specifically, referring to FIG. 4 , it is a schematic block diagram of a verification apparatus of a service platform provided by an embodiment of the present application. The verification device of the service platform of this embodiment includes:

通信模块40,用于接收所述业务平台在上线后发送的携带有域名的数据访问请求,所述域名包括验证域名或者生产域名,所述验证域名用于第一用户在生产环境下对所述业务平台进行验证,所述生产域名用于第二用户在所述生产环境下访问所述业务平台;The communication module 40 is configured to receive a data access request carrying a domain name sent by the business platform after going online, where the domain name includes a verification domain name or a production domain name, and the verification domain name is used for The business platform performs verification, and the production domain name is used for the second user to access the business platform in the production environment;

处理模块41,用于基于预设选取规则从至少两个预设数据库中确定出与所述域名匹配的目标数据库;a processing module 41, configured to determine a target database matching the domain name from at least two preset databases based on a preset selection rule;

所述处理模块41,还用于通过所述目标数据库执行所述数据访问请求对应的数据操作,所述数据操作包括数据的查询和/或数据的写入。The processing module 41 is further configured to perform a data operation corresponding to the data access request through the target database, where the data operation includes data query and/or data writing.

在一个实施例中,所述至少两个预设数据库包括生产数据库和验证数据库,处理模块41,具体用于若检测到数据访问请求中携带的域名为验证域名,则将所述数据访问请求携带的验证令牌与验证域名下的预设验证令牌进行对比;若对比得到所述验证令牌与所述预设验证令牌匹配,则从至少两个预设数据库中将验证数据库确定为与所述验证域名匹配的目标数据库。In one embodiment, the at least two preset databases include a production database and a verification database, and the processing module 41 is specifically configured to, if it is detected that the domain name carried in the data access request is a verification domain name, carry the data access request with The verification token is compared with the preset verification token under the verification domain name; if it is found that the verification token matches the preset verification token, the verification database is determined from at least two preset databases as The verification domain name matches the target database.

在一个实施例中,处理模块41,还用于若对比得到所述验证令牌与所述预设验证令牌不匹配,则从至少两个预设数据库中将生产数据库确定为与所述验证域名匹配的目标数据库。In one embodiment, the processing module 41 is further configured to determine, from at least two preset databases, that the production database is the same as the verification token if the verification token does not match the preset verification token. The target database for domain name matching.

在一个实施例中,所述至少两个预设数据库包括生产数据库和验证数据库,处理模块41,具体用于若检测到数据访问请求中携带的域名为生产域名,则从至少两个预设数据库中将生产数据库确定为与所述生产域名匹配的目标数据库。In one embodiment, the at least two preset databases include a production database and a verification database, and the processing module 41 is specifically configured to, if it is detected that the domain name carried in the data access request is a production domain name, select from the at least two preset databases The production database is determined as the target database matching the production domain name.

在一个实施例中,处理模块41还用于通过至少一个测试用例对上线后的所述业务平台进行生产环境下的验证;若检测到第一测试用例对所述上线后的业务平台的验证未通过,则确定当前版本的所述业务平台运行错误,所述第一测试用例为所述至少一个测试用例中的任一个;对所述当前版本的业务平台执行版本回滚操作。In one embodiment, the processing module 41 is further configured to verify the online business platform through at least one test case in a production environment; if it is detected that the first test case does not verify the online business platform If the test is passed, it is determined that the business platform of the current version is running incorrectly, and the first test case is any one of the at least one test case; and a version rollback operation is performed on the business platform of the current version.

在一个实施例中,处理模块41还用于检测所述验证未通过对应的异常类型;In one embodiment, the processing module 41 is further configured to detect an exception type corresponding to the verification failure;

若所述异常类型为预设类型,则触发执行所述对所述当前版本的业务平台执行版本回滚操作的步骤,所述预设类型包括空指针异常或者业务异常。If the exception type is a preset type, the step of performing the version rollback operation on the current version of the service platform is triggered, and the preset type includes a null pointer exception or a service exception.

在一个实施例中,处理模块41还用于若检测到第一测试用例对所述上线后的业务平台的验证未通过,则确定所述验证未通过对应的异常类型是否为所述业务平台的子模块异常或者日志异常;若确定所述验证未通过对应的异常类型为所述子模块异常或者日志异常,则输出告警信息。In one embodiment, the processing module 41 is further configured to, if it is detected that the verification of the online business platform by the first test case fails, determine whether the abnormality type corresponding to the failed verification is of the business platform. The sub-module is abnormal or the log is abnormal; if it is determined that the abnormal type corresponding to the failed verification is the sub-module abnormal or the log is abnormal, alarm information is output.

需要说明的是,本申请实施例所描述的业务平台的验证装置的各功能模块的功能可根据图2或者图3所述的方法实施例中的方法具体实现,其具体实现过程可以参照图2或者图3的方法实施例的相关描述,此处不再赘述。It should be noted that the functions of each functional module of the verification device of the service platform described in the embodiment of the present application may be specifically implemented according to the method in the method embodiment described in FIG. 2 or FIG. 3 , and the specific implementation process may refer to FIG. 2 Or the relevant description of the method embodiment of FIG. 3 is not repeated here.

本申请实施例中,当通信模块40接收到业务平台在上线后发送的数据访问请求时,处理模块41可以基于预设选取规则从至少两个预设数据库中确定出与数据访问请求中携带的域名匹配的目标数据库,并通过目标数据库执行数据访问请求对应的数据操作。对基于不同域名的数据访问,可以采用不同的目标数据库执行数据操作,从而高效地实现对上线后的业务平台的验证。In the embodiment of the present application, when the communication module 40 receives a data access request sent by the business platform after going online, the processing module 41 may determine the data access request carried in the data access request from at least two preset databases based on preset selection rules. The domain name matches the target database, and the data operation corresponding to the data access request is performed through the target database. For data access based on different domain names, different target databases can be used to perform data operations, so as to efficiently verify the online business platform.

请参见图5,图5是本申请实施例提供的一种服务器的示意性框图,如图5所示,该服务器包括,处理器501、存储器502和网络接口503。上述处理器501、存储器502和网络接口503可通过总线或其他方式连接,在本申请实施例所示图5中以通过总线连接为例。其中,网络接口503受所述处理器的控制用于收发消息,存储器502用于存储计算机程序,所述计算机程序包括程序指令,处理器501用于执行存储器502存储的程序指令。其中,处理器501被配置用于调用所述程序指令执行:通过网络接口503接收所述业务平台在上线后发送的携带有域名的数据访问请求,所述域名包括验证域名或者生产域名,所述验证域名用于第一用户在生产环境下对所述业务平台进行验证,所述生产域名用于第二用户在所述生产环境下访问所述业务平台;基于预设选取规则从至少两个预设数据库中确定出与所述域名匹配的目标数据库;通过所述目标数据库执行所述数据访问请求对应的数据操作,所述数据操作包括数据的查询和/或数据的写入。Referring to FIG. 5 , FIG. 5 is a schematic block diagram of a server provided by an embodiment of the present application. As shown in FIG. 5 , the server includes a processor 501 , a memory 502 , and a network interface 503 . The above-mentioned processor 501, memory 502, and network interface 503 may be connected through a bus or in other manners. In FIG. 5 shown in the embodiment of the present application, the connection through a bus is taken as an example. The network interface 503 is controlled by the processor to send and receive messages, the memory 502 is used to store computer programs, the computer programs include program instructions, and the processor 501 is used to execute the program instructions stored in the memory 502 . The processor 501 is configured to invoke the program instruction to execute: receive, through the network interface 503, a data access request carrying a domain name sent by the business platform after going online, where the domain name includes a verification domain name or a production domain name, the The verification domain name is used for the first user to verify the business platform in the production environment, and the production domain name is used for the second user to access the business platform in the production environment; Suppose that a target database matching the domain name is determined in the database; the data operation corresponding to the data access request is performed through the target database, and the data operation includes data query and/or data writing.

在一个实施例中,所述至少两个预设数据库包括生产数据库和验证数据库,处理器501,具体用于若检测到数据访问请求中携带的域名为验证域名,则将所述数据访问请求携带的验证令牌与验证域名下的预设验证令牌进行对比;若对比得到所述验证令牌与所述预设验证令牌匹配,则从至少两个预设数据库中将验证数据库确定为与所述验证域名匹配的目标数据库。In one embodiment, the at least two preset databases include a production database and a verification database, and the processor 501 is specifically configured to, if it is detected that the domain name carried in the data access request is a verification domain name, carry the data access request with The verification token is compared with the preset verification token under the verification domain name; if it is found that the verification token matches the preset verification token, the verification database is determined from at least two preset databases as The verification domain name matches the target database.

在一个实施例中,处理器501,还用于若对比得到所述验证令牌与所述预设验证令牌不匹配,则从至少两个预设数据库中将生产数据库确定为与所述验证域名匹配的目标数据库。In one embodiment, the processor 501 is further configured to determine, from at least two preset databases, a production database as being consistent with the verification token if the verification token does not match the preset verification token by comparison. The target database for domain name matching.

在一个实施例中,所述至少两个预设数据库包括生产数据库和验证数据库,处理器501,具体用于若检测到数据访问请求中携带的域名为生产域名,则从至少两个预设数据库中将生产数据库确定为与所述生产域名匹配的目标数据库。In one embodiment, the at least two preset databases include a production database and a verification database, and the processor 501 is specifically configured to, if it is detected that the domain name carried in the data access request is a production domain name, select from the at least two preset databases The production database is determined as the target database matching the production domain name.

在一个实施例中,处理器501还用于通过至少一个测试用例对上线后的所述业务平台进行生产环境下的验证;若检测到第一测试用例对所述上线后的业务平台的验证未通过,则确定当前版本的所述业务平台运行错误,所述第一测试用例为所述至少一个测试用例中的任一个;对所述当前版本的业务平台执行版本回滚操作。In one embodiment, the processor 501 is further configured to verify the online business platform through at least one test case in a production environment; if it is detected that the first test case has not verified the online business platform If the test is passed, it is determined that the business platform of the current version is running incorrectly, and the first test case is any one of the at least one test case; and a version rollback operation is performed on the business platform of the current version.

在一个实施例中,处理器501还用于检测所述验证未通过对应的异常类型;In one embodiment, the processor 501 is further configured to detect an exception type corresponding to the verification failure;

若所述异常类型为预设类型,则触发执行所述对所述当前版本的业务平台执行版本回滚操作的步骤,所述预设类型包括空指针异常或者业务异常。If the exception type is a preset type, the step of performing the version rollback operation on the current version of the service platform is triggered, and the preset type includes a null pointer exception or a service exception.

在一个实施例中,处理器501还用于若检测到第一测试用例对所述上线后的业务平台的验证未通过,则确定所述验证未通过对应的异常类型是否为所述业务平台的子模块异常或者日志异常;若确定所述验证未通过对应的异常类型为所述子模块异常或者日志异常,则输出告警信息。In one embodiment, the processor 501 is further configured to, if it is detected that the verification of the online business platform by the first test case fails, determine whether the abnormality type corresponding to the failed verification is of the business platform. The sub-module is abnormal or the log is abnormal; if it is determined that the abnormal type corresponding to the failed verification is the sub-module abnormal or the log is abnormal, alarm information is output.

应当理解,在本申请实施例中,所称处理器501可以是中央处理单元(CentralProcessing Unit,CPU),该处理器501还可以是其他通用处理器、数字信号处理器(DigitalSignal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。It should be understood that, in this embodiment of the present application, the processor 501 may be a central processing unit (Central Processing Unit, CPU), and the processor 501 may also be other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.

该存储器502可以包括只读存储器和随机存取存储器,并向处理器501提供指令和数据。存储器502的一部分还可以包括非易失性随机存取存储器。例如,存储器502还可以存储设备类型的信息。The memory 502 may include read only memory and random access memory, and provides instructions and data to the processor 501 . A portion of memory 502 may also include non-volatile random access memory. For example, memory 502 may also store device type information.

具体实现中,本申请实施例中所描述的处理器501、存储器502和网络接口503可执行本申请实施例提供的图2或者图3所述的方法实施例所描述的实现方式,也可执行本申请实施例所描述的业务平台的验证装置的实现方式,在此不再赘述。In specific implementation, the processor 501, the memory 502, and the network interface 503 described in the embodiments of the present application may perform the implementations described in the method embodiments described in FIG. 2 or FIG. 3 provided in the embodiments of the present application, and may also perform The implementation manner of the verification device of the service platform described in the embodiment of the present application will not be repeated here.

本申请实施例中,当网络接口503接收到业务平台在上线后发送的数据访问请求时,处理器501可以基于预设选取规则从至少两个预设数据库中确定出与数据访问请求中携带的域名匹配的目标数据库,并通过目标数据库执行数据访问请求对应的数据操作。对基于不同域名的数据访问,可以采用不同的目标数据库执行数据操作,从而高效地实现对上线后的业务平台的验证。In this embodiment of the present application, when the network interface 503 receives a data access request sent by the business platform after going online, the processor 501 may determine the data access request carried in the data access request from at least two preset databases based on a preset selection rule. The domain name matches the target database, and the data operation corresponding to the data access request is performed through the target database. For data access based on different domain names, different target databases can be used to perform data operations, so as to efficiently verify the online business platform.

在本发明的另一实施例中提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令被处理器执行时实现:接收所述业务平台在上线后发送的携带有域名的数据访问请求,所述域名包括验证域名或者生产域名,所述验证域名用于第一用户在生产环境下对所述业务平台进行验证,所述生产域名用于第二用户在所述生产环境下访问所述业务平台;基于预设选取规则从至少两个预设数据库中确定出与所述域名匹配的目标数据库;通过所述目标数据库执行所述数据访问请求对应的数据操作,所述数据操作包括数据的查询和/或数据的写入。In another embodiment of the present invention, a computer-readable storage medium is provided, where a computer program is stored in the computer-readable storage medium, and the computer program includes program instructions, and when the program instructions are executed by a processor, realize: receiving A data access request carrying a domain name sent by the business platform after going online, the domain name includes a verification domain name or a production domain name, and the verification domain name is used for the first user to verify the business platform in a production environment, the The production domain name is used for the second user to access the business platform in the production environment; a target database matching the domain name is determined from at least two preset databases based on preset selection rules; The data operation corresponding to the data access request, where the data operation includes data query and/or data writing.

所述计算机可读存储介质可以是前述任一实施例所述的服务器的内部存储单元,例如服务器的硬盘或内存。所述计算机可读存储介质也可以是所述服务器的外部存储设备,例如所述服务器上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,所述计算机可读存储介质还可以既包括所述服务器的内部存储单元也包括外部存储设备。所述计算机可读存储介质用于存储所述计算机程序以及所述服务器所需的其他程序和数据。所述计算机可读存储介质还可以用于暂时地存储已经输出或者将要输出的数据。The computer-readable storage medium may be an internal storage unit of the server described in any of the foregoing embodiments, such as a hard disk or a memory of the server. The computer-readable storage medium may also be an external storage device of the server, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), and a secure digital (Secure Digital, SD) card equipped on the server. , Flash card (Flash Card) and so on. Further, the computer-readable storage medium may also include both an internal storage unit of the server and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by the server. The computer-readable storage medium can also be used to temporarily store data that has been or will be output.

本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random AccessMemory,RAM)等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. During execution, the processes of the embodiments of the above-mentioned methods may be included. The storage medium may be a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM), or a random access memory (Random Access Memory, RAM) or the like.

以上所揭露的仅为本发明的部分实施例而已,当然不能以此来限定本发明之权利范围,本领域普通技术人员可以理解实现上述实施例的全部或部分流程,并依本发明权利要求所作的等同变化,仍属于发明所涵盖的范围。The above disclosures are only part of the embodiments of the present invention, and of course, the scope of the rights of the present invention cannot be limited by this. Those of ordinary skill in the art can understand all or part of the procedures for realizing the above embodiments, and make according to the claims of the present invention. The equivalent changes of the invention still belong to the scope covered by the invention.

Claims (10)

1. A method for verifying a service platform, the method comprising:
receiving a data access request carrying a domain name sent by the service platform after the service platform is online, wherein the domain name comprises a verification domain name or a production domain name, the verification domain name is used for a first user to verify the service platform in a production environment, and the production domain name is used for a second user to access the service platform in the production environment;
determining a target database matched with the domain name from at least two preset databases based on a preset selection rule;
and executing data operation corresponding to the data access request through the target database, wherein the data operation comprises data query and/or data write.
2. The method according to claim 1, wherein the at least two predetermined databases include a production database and a verification database, and the determining a target database matching the domain name from the at least two predetermined databases based on a predetermined database selection rule comprises:
if the domain name carried in the data access request is detected to be the verification domain name, comparing the verification token carried in the data access request with a preset verification token under the verification domain name;
and if the verification token is matched with the preset verification token after comparison, determining a verification database as a target database matched with the verification domain name from at least two preset databases.
3. The method according to claim 2, wherein after comparing the authentication token carried by the data access request with a preset authentication token under an authentication domain name, the method further comprises:
and if the verification token is not matched with the preset verification token after comparison, determining a production database as a target database matched with the verification domain name from at least two preset databases.
4. The method according to claim 1, wherein the at least two predetermined databases include a production database and a verification database, and the determining a target database matching the domain name from the at least two predetermined databases based on a predetermined database selection rule comprises:
and if the domain name carried in the data access request is detected to be the production domain name, determining the production database as a target database matched with the production domain name from at least two preset databases.
5. The method of claim 1, further comprising:
verifying the service platform after the service platform is on line in a production environment through at least one test case;
if the verification of a first test case on the online service platform is not passed, determining that the service platform of the current version is in error in operation, wherein the first test case is any one of the at least one test case;
and executing the rollback operation of the version of the service platform of the current version.
6. The method of claim 5, wherein before performing a version rollback operation on the current version of the service platform, the method further comprises:
detecting the corresponding abnormal type of which the verification fails;
and if the exception type is a preset type, triggering and executing the step of executing the version rollback operation on the service platform of the current version, wherein the preset type comprises null pointer exception or service exception.
7. The method of claim 5, further comprising:
if the first test case is detected to fail to verify the online service platform, determining whether the abnormal type corresponding to the failed verification is the sub-module abnormality or log abnormality of the service platform;
and if the abnormal type corresponding to the failed verification is determined to be the sub-module abnormality or the log abnormality, outputting alarm information.
8. An apparatus for validating a service platform, the apparatus comprising:
the communication module is used for receiving a data access request which is sent by the service platform after the service platform is on line and carries a domain name, wherein the domain name comprises a verification domain name or a production domain name, the verification domain name is used for a first user to verify the service platform in a production environment, and the production domain name is used for a second user to access the service platform in the production environment;
the processing module is used for determining a target database matched with the domain name from at least two preset databases based on a preset selection rule;
the processing module is further configured to execute a data operation corresponding to the data access request through the target database, where the data operation includes query of data and/or write-in of data.
9. A server, comprising a processor and a memory, the processor and the memory being interconnected, wherein the memory is configured to store a computer program comprising program instructions, and wherein the processor is configured to invoke the program instructions to perform the method of any one of claims 1-7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program, which is executed by a processor to implement the method of any one of claims 1-7.
CN202010180487.1A 2020-03-19 2020-03-19 Verification method of service platform and related equipment Active CN111475400B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010180487.1A CN111475400B (en) 2020-03-19 2020-03-19 Verification method of service platform and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010180487.1A CN111475400B (en) 2020-03-19 2020-03-19 Verification method of service platform and related equipment

Publications (2)

Publication Number Publication Date
CN111475400A true CN111475400A (en) 2020-07-31
CN111475400B CN111475400B (en) 2025-05-23

Family

ID=71747450

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010180487.1A Active CN111475400B (en) 2020-03-19 2020-03-19 Verification method of service platform and related equipment

Country Status (1)

Country Link
CN (1) CN111475400B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113419949A (en) * 2021-06-21 2021-09-21 平安银行股份有限公司 Data processing abnormity detection method, device, equipment and storage medium
CN114254025A (en) * 2021-12-15 2022-03-29 青岛海尔科技有限公司 Data storage method and device, storage medium and electronic device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1895417A1 (en) * 2006-08-16 2008-03-05 Alcatel Lucent Data storage system and method for testing new applications
CN107154976A (en) * 2017-05-10 2017-09-12 北京微影时代科技有限公司 Website testing method, device and system
CN108038390A (en) * 2017-12-09 2018-05-15 珠海横琴小可乐信息技术有限公司 A kind of software, that is, service platform tenant data isolation and shared method and system
CN108075911A (en) * 2016-11-14 2018-05-25 中国移动通信集团甘肃有限公司 A kind of service test method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1895417A1 (en) * 2006-08-16 2008-03-05 Alcatel Lucent Data storage system and method for testing new applications
CN108075911A (en) * 2016-11-14 2018-05-25 中国移动通信集团甘肃有限公司 A kind of service test method and device
CN107154976A (en) * 2017-05-10 2017-09-12 北京微影时代科技有限公司 Website testing method, device and system
CN108038390A (en) * 2017-12-09 2018-05-15 珠海横琴小可乐信息技术有限公司 A kind of software, that is, service platform tenant data isolation and shared method and system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113419949A (en) * 2021-06-21 2021-09-21 平安银行股份有限公司 Data processing abnormity detection method, device, equipment and storage medium
CN113419949B (en) * 2021-06-21 2024-03-19 平安银行股份有限公司 Anomaly detection methods, devices, equipment and storage media for data processing
CN114254025A (en) * 2021-12-15 2022-03-29 青岛海尔科技有限公司 Data storage method and device, storage medium and electronic device

Also Published As

Publication number Publication date
CN111475400B (en) 2025-05-23

Similar Documents

Publication Publication Date Title
US7536599B2 (en) Methods and systems for validating a system environment
CN110221948B (en) Test script generation method, test script generation device, computer device and storage medium
CN110471842A (en) A kind of test method, device and computer readable storage medium
CN107766236A (en) Test assignment automatic management method, apparatus, equipment and storage medium
CN102707999A (en) App Compatibility Leveraging Successful Problem Solving
CN110267215B (en) Data detection method, equipment and storage medium
CN104850427B (en) A kind of code upgrade method and device
CN112199281A (en) Data processing method and device, terminal equipment and readable storage medium
US20190121985A1 (en) Detecting vulnerabilities in applications during execution
CN111475400A (en) A verification method for a business platform and related equipment
CN112751782B (en) Flow switching method, device, equipment and medium based on multi-activity data center
CN115640236B (en) Script quality detection method and computing device
CN117215995B (en) Remote direct memory access method, distributed storage system and electronic equipment
CN115543837B (en) Software testing method and device, electronic equipment and storage medium
CN114185804B (en) Interface testing method and device and terminal equipment
CN115408686A (en) Sql abnormity checking method, device, storage medium and equipment
CN110347691B (en) Certificate type verification method, certificate type verification device, computer equipment and storage medium
CN115374018B (en) Automatic interface testing method and device
US12530282B2 (en) Validation of application programming interfaces
CN118656302A (en) System response testing method, device, equipment, storage medium and program product
US20120243420A1 (en) Efficient Remote Call Diagnostics
CN118113585A (en) Code online processing method, device, storage medium and apparatus
CN119273473A (en) A transaction event processing method, device, equipment and storage medium
KR20250178016A (en) Apparatus, method, and recording medium for managing test data related to the execution of test case
CN119902816A (en) Configuration item change method, device, equipment and cluster

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