技术领域Technical Field
本发明涉及计算机技术领域,尤其是一种多环境配置的切换方法、系统及存储介质。The present invention relates to the field of computer technology, and in particular to a switching method, system and storage medium for multi-environment configurations.
背景技术Background Art
在终端系统的应用软件开发过程中,经常需要针对不同的环境(如开发环境、测试环境、预发布环境、正式环境等)进行配置。每个环境可能需要不同的接口服务器地址、H5服务器地址等。传统的方法通常涉及手动修改代码或配置文件,这种方式不仅效率低下,而且容易出错,尤其是在多个开发者共享同一代码库时。因此,如何提供一种高效、准确且易于管理的多环境切换配置方法成为亟待解决的问题。During the application software development process of the terminal system, it is often necessary to configure for different environments (such as development environment, test environment, pre-release environment, formal environment, etc.). Each environment may require a different interface server address, H5 server address, etc. Traditional methods usually involve manually modifying code or configuration files, which is not only inefficient but also prone to errors, especially when multiple developers share the same code base. Therefore, how to provide an efficient, accurate and easy-to-manage multi-environment switching configuration method has become an urgent problem to be solved.
发明内容Summary of the invention
有鉴于此,本发明实施例提供一种高效且维护成本低的,多环境配置的切换方法、系统及存储介质,以仅需打出一个包的方式实现app内的多环境实时切换。In view of this, the embodiments of the present invention provide a method, system and storage medium for switching multiple environment configurations with high efficiency and low maintenance cost, so as to realize real-time switching of multiple environments within an app by only typing out one package.
本发明实施例的一方面提供了一种多环境配置的切换方法,包括以下步骤:An aspect of an embodiment of the present invention provides a method for switching multiple environment configurations, comprising the following steps:
响应于应用程序的启动信号,根据应用程序是否处于调试模式执行对应的环境配置初始化动作,配置目标环境的服务器地址信息;In response to a start signal of the application, executing a corresponding environment configuration initialization action according to whether the application is in a debugging mode, and configuring server address information of the target environment;
初始化登陆页面,并显示所述登陆页面;Initialize the login page and display the login page;
响应于对所述登录页面的登录接口调用指令,获取目标用户的信息以及所述目标用户的服务器配置信息,并进入到环境切换页面;In response to a login interface call instruction for the login page, information of a target user and server configuration information of the target user are acquired, and an environment switching page is entered;
响应于对所述环境切换页面的环境切换操作,将环境标识保存到本地;In response to an environment switching operation on the environment switching page, saving the environment identifier locally;
根据所述环境标识获取对应的环境配置信息,并切换到指定的环境,退出当前用户登录,返回执行响应于应用程序的启动信号,根据应用程序是否处于调试模式执行对应的环境配置初始化动作,配置目标环境的服务器地址信息的步骤,直至完成应用程序的开发测试;Obtaining corresponding environment configuration information according to the environment identifier, switching to the specified environment, logging out the current user, returning to execute in response to the application startup signal, executing corresponding environment configuration initialization actions according to whether the application is in debugging mode, and configuring the server address information of the target environment until the development and testing of the application is completed;
其中,每个环境标识指代不同的环境类型。Each environment identifier refers to a different environment type.
可选地,所述根据应用程序是否处于调试模式执行对应的环境配置初始化动作,配置目标环境的服务器地址信息,包括以下步骤:Optionally, performing a corresponding environment configuration initialization action according to whether the application is in debugging mode to configure the server address information of the target environment includes the following steps:
判断应用程序是否处于调试模式;Determine whether the application is in debug mode;
若是,则根据本地存储的环境标识,判断对应的环境类型,记录环境类型并初始化app接口服务器地址和H5服务器地址;If so, determine the corresponding environment type based on the locally stored environment identifier, record the environment type and initialize the app interface server address and H5 server address;
若否,则使用正式环境配置初始化app接口服务器地址与H5服务器地址。If not, use the formal environment configuration to initialize the app interface server address and H5 server address.
可选地,所述根据应用程序是否处于调试模式执行对应的环境配置初始化动作,配置目标环境的服务器地址信息,还包括以下步骤:Optionally, the performing of the corresponding environment configuration initialization action according to whether the application is in the debugging mode to configure the server address information of the target environment further includes the following steps:
当应用程序处于调试模式,且本地存储的环境标识指向自定义环境时,从本地存储获取自定义的app服务器地址和H5服务器地址。When the application is in debug mode and the environment identifier of the local storage points to the custom environment, the custom app server address and H5 server address are obtained from the local storage.
可选地,所述响应于对所述登录页面的登录接口调用指令,获取目标用户的信息以及所述目标用户的服务器配置信息,并进入到环境切换页面,包括:Optionally, in response to the login interface calling instruction of the login page, obtaining the target user information and the server configuration information of the target user, and entering the environment switching page includes:
响应于对所述登录页面的登录接口调用指令,获取目标用户的信息;In response to a login interface call instruction for the login page, obtaining information of a target user;
根据所述目标用户的信息,获取mqtt的配置信息;According to the information of the target user, obtain the configuration information of mqtt;
其中,所述mqtt的配置信息包括:mqtt服务器地址、端口号、连接用户名、连接密码。The configuration information of the MQTT includes: MQTT server address, port number, connection username, and connection password.
可选地,所述方法还包括:Optionally, the method further comprises:
在完成环境的切换后,识别应用程序所处的环境类型,当应用程序所处的环境类型为预发布环境或正式环境时,验证mqtt服务器证书,并在验证通过后连接mqtt服务器,并初始化所述登录界面。After completing the environment switching, identify the environment type in which the application is located. When the environment type in which the application is located is a pre-release environment or a formal environment, verify the mqtt server certificate, connect to the mqtt server after the verification is passed, and initialize the login interface.
可选地,所述环境类型包括开发环境、测试环境、预发布环境、自定义环境、正式环境。Optionally, the environment types include development environment, test environment, pre-release environment, custom environment, and formal environment.
本发明实施例的另一方面还提供了一种多环境配置的切换系统,包括:Another aspect of the embodiment of the present invention further provides a switching system for multiple environment configurations, including:
第一模块,用于响应于应用程序的启动信号,根据应用程序是否处于调试模式执行对应的环境配置初始化动作,配置目标环境的服务器地址信息;The first module is used to respond to the start signal of the application program, execute the corresponding environment configuration initialization action according to whether the application program is in the debugging mode, and configure the server address information of the target environment;
第二模块,用于初始化登陆页面,并显示所述登陆页面;The second module is used to initialize the login page and display the login page;
第三模块,用于响应于对所述登录页面的登录接口调用指令,获取目标用户的信息以及所述目标用户的服务器配置信息,并进入到环境切换页面;The third module is used to obtain the target user's information and the target user's server configuration information in response to the login interface calling instruction of the login page, and enter the environment switching page;
第四模块,用于响应于对所述环境切换页面的环境切换操作,将环境标识保存到本地;A fourth module is used to save the environment identifier locally in response to the environment switching operation on the environment switching page;
第五模块,用于根据所述环境标识获取对应的环境配置信息,并切换到指定的环境,退出当前用户登录,返回执行响应于应用程序的启动信号,根据应用程序是否处于调试模式执行对应的环境配置初始化动作,配置目标环境的服务器地址信息的步骤,直至完成应用程序的开发测试;The fifth module is used to obtain the corresponding environment configuration information according to the environment identifier, switch to the specified environment, log out the current user, return to execute the corresponding environment configuration initialization action in response to the application startup signal, and configure the server address information of the target environment according to whether the application is in debugging mode, until the development and testing of the application is completed;
其中,每个环境标识指代不同的环境类型。Each environment identifier refers to a different environment type.
本发明实施例的另一方面还提供了一种电子设备,包括处理器以及存储器;Another aspect of an embodiment of the present invention further provides an electronic device, including a processor and a memory;
所述存储器用于存储程序;The memory is used to store programs;
所述处理器执行所述程序实现如前面所述的方法。The processor executes the program to implement the method described above.
本发明实施例的另一方面还提供了一种计算机可读存储介质,所述存储介质存储有程序,所述程序被处理器执行实现如前面所述的方法。Another aspect of the embodiments of the present invention further provides a computer-readable storage medium, wherein the storage medium stores a program, and the program is executed by a processor to implement the method described above.
本发明实施例的另一方面还提供了一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时实现如前面所述的方法Another aspect of the present invention provides a computer program product, including a computer program, which implements the method described above when executed by a processor.
本发明的实施例响应于应用程序的启动信号,根据应用程序是否处于调试模式执行对应的环境配置初始化动作,配置目标环境的服务器地址信息;初始化登陆页面,并显示所述登陆页面;响应于对所述登录页面的登录接口调用指令,获取目标用户的信息以及所述目标用户的服务器配置信息,并进入到环境切换页面;响应于对所述环境切换页面的环境切换操作,将环境标识保存到本地;根据所述环境标识获取对应的环境配置信息,并切换到指定的环境,退出当前用户登录,返回执行响应于应用程序的启动信号,根据应用程序是否处于调试模式执行对应的环境配置初始化动作,配置目标环境的服务器地址信息的步骤,直至完成应用程序的开发测试。本发明实施例高效且维护成本低,能够实现应用软件内的多环境实时切换。The embodiment of the present invention responds to the startup signal of the application program, performs the corresponding environment configuration initialization action according to whether the application program is in the debugging mode, configures the server address information of the target environment; initializes the login page, and displays the login page; responds to the login interface call instruction of the login page, obtains the information of the target user and the server configuration information of the target user, and enters the environment switching page; responds to the environment switching operation of the environment switching page, saves the environment identification locally; obtains the corresponding environment configuration information according to the environment identification, switches to the specified environment, logs out of the current user, returns to execute the steps of responding to the startup signal of the application program, performing the corresponding environment configuration initialization action according to whether the application program is in the debugging mode, and configuring the server address information of the target environment, until the development and testing of the application program is completed. The embodiment of the present invention is efficient and has low maintenance cost, and can realize the real-time switching of multiple environments in the application software.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
图1为本发明实施例提供的一种实施环境示意图;FIG1 is a schematic diagram of an implementation environment provided by an embodiment of the present invention;
图2为本发明实施例提供的整体步骤流程图;FIG2 is a flowchart of the overall steps provided by an embodiment of the present invention;
图3为本发明实施例提供的具体应用场景下的实施过程图;FIG3 is a diagram of an implementation process in a specific application scenario provided by an embodiment of the present invention;
图4为本发明实施例提供的电子设备的结构示意图。FIG. 4 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention.
具体实施方式DETAILED DESCRIPTION
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本发明实施例相一致的所有实施方式,它们仅是与如所附权利要求书中所详述的、本发明实施例的一些方面相一致的装置和方法的例子。In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present invention. They are only examples of devices and methods consistent with some aspects of the embodiments of the present invention as detailed in the attached claims.
可以理解,本发明所使用的术语“第一”、“第二”等可在本文中用于描述各种概念,但除非特别说明,这些概念不受这些术语限制。这些术语仅用于将一个概念与另一个概念区分。例如,在不脱离本发明实施例范围的情况下,第一信息也可以被称为第二信息,类似地,第二信息也可以被称为第一信息。取决于语境,如在此所使用的词语“若”、“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”。It is understood that the terms "first", "second", etc. used in the present invention may be used herein to describe various concepts, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the embodiments of the present invention, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
本发明所使用的术语“至少一个”、“多个”、“每个”、“任一”等,至少一个包括一个、两个或两个以上,多个包括两个或两个以上,每个是指对应的多个中的每一个,任一是指多个中的任意一个。The terms "at least one", "multiple", "each", "any", etc. used in the present invention, at least one includes one, two or more, multiple includes two or more, each refers to each of the corresponding multiple, and any refers to any one of the multiple.
除非另有定义,本文所使用的所有的技术和科学术语与属于本发明的技术领域的技术人员通常理解的含义相同。本文中所使用的术语只是为了描述本发明实施例的目的,不是旨在限制本发明。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present invention belongs. The terms used herein are only for the purpose of describing the embodiments of the present invention and are not intended to limit the present invention.
在对本发明实施例进行详细说明之前,首先对本发明实施例中涉及的部分相关技术进行说明,如下:终端系统的应用软件为app l icat ion,简称为app。Before describing the embodiments of the present invention in detail, some related technologies involved in the embodiments of the present invention are first described as follows: the application software of the terminal system is application software, referred to as app for short.
1、app请求由接口服务器地址+接口路径+(必要的参数)构成。1. The app request consists of the interface server address + interface path + (necessary parameters).
2、app里面的H5地址由H5服务器地址+H5页面路径+(必要的参数)构成。2. The H5 address in the app is composed of the H5 server address + H5 page path + (necessary parameters).
3、开发环境、测试环境、预发布环境、正式环境对应的接口服务器地址与H5服务器地址是固定不变的,因此在切换到自定义环境的时候,需要保存自定义的接口服务器地址与自定义的H5服务器地址到本地,并保存环境标识到本地;切换到非自定义环境的时候只需要保存环境标识到本地。3. The interface server address and H5 server address corresponding to the development environment, test environment, pre-release environment, and formal environment are fixed. Therefore, when switching to a custom environment, you need to save the custom interface server address and custom H5 server address locally, and save the environment identifier locally; when switching to a non-custom environment, you only need to save the environment identifier locally.
本发明实施例提供的多环境配置的切换方法,涉及计算机技术领域。本发明实施例提供的多环境配置的切换方法可应用于终端中,也可应用于服务器中,还可以是运行于终端或服务器中的软件。在一些实施例中,终端可以是智能手机、平板电脑、笔记本电脑、台式计算机、智能音箱、智能手表以及车载终端等,但并不局限于此;服务器端可以配置成独立的物理服务器,也可以配置成多个物理服务器构成的服务器集群或者分布式系统,还可以配置成提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、CDN以及大数据和人工智能平台等基础云计算服务的云服务器,服务器还可以是区块链网络中的一个节点服务器;软件可以是实现多环境配置的切换方法的应用等,但并不局限于以上形式。The switching method of multi-environment configuration provided by the embodiment of the present invention relates to the field of computer technology. The switching method of multi-environment configuration provided by the embodiment of the present invention can be applied to a terminal, can also be applied to a server, and can also be software running in a terminal or a server. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, and a car terminal, etc., but is not limited to this; the server side can be configured as an independent physical server, or it can be configured as a server cluster or a distributed system composed of multiple physical servers, and can also be configured as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The server can also be a node server in a blockchain network; the software can be an application that implements the switching method of multi-environment configuration, etc., but is not limited to the above forms.
本发明可用于众多通用或专用的计算机系统环境或配置中。例如:个人计算机、服务器计算机、手持设备或便携式设备、平板型设备、多处理器系统、基于微处理器的系统、置顶盒、可编程的消费电子设备、网络PC、小型计算机、大型计算机、包括以上任何系统或设备的分布式计算环境等等。本发明可以在由计算机执行的计算机可执行指令的一般上下文中描述,例如程序模块。一般地,程序模块包括执行特定任务或实现特定抽象数据类型的例程、程序、对象、组件、数据结构等等。也可以在分布式计算环境中实践本发明,在这些分布式计算环境中,由通过通信网络而被连接的远程处理设备来执行任务。在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存储介质中。The present invention can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present invention can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present invention can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
如图1所示,是发明实施例提供的一种实施环境示意图。参照图1,该实施环境包括服务器101和至少一个终端102。服务器101和终端102之间可以通过无线或者有线的方式进行网络连接,完成数据传输交换。As shown in Figure 1, it is a schematic diagram of an implementation environment provided by an embodiment of the invention. Referring to Figure 1, the implementation environment includes a server 101 and at least one terminal 102. The server 101 and the terminal 102 can be connected to the network in a wireless or wired manner to complete data transmission and exchange.
服务器101可以是独立的物理服务器,也可以是多个物理服务器构成的服务器集群或者分布式系统,还可以是提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、CDN(Content De l ivery Network,内容分发网络)、以及大数据和人工智能平台等基础云计算服务的云服务器。Server 101 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), as well as big data and artificial intelligence platforms.
另外,服务器101还可以是区块链网络中的一个节点服务器。其中,区块链是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。In addition, the server 101 can also be a node server in the blockchain network. Blockchain is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithm.
终端102可以是智能手机、平板电脑、笔记本电脑、台式计算机、智能音箱、智能手表等,其中,终端102还可以是前面举例说明的各种设备类型的车载终端,但并不局限于此。终端102以及服务器101可以通过有线或无线通信方式进行直接或间接地连接,本发明实施例在此不做限制。The terminal 102 may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc. The terminal 102 may also be a vehicle-mounted terminal of various device types described above, but is not limited thereto. The terminal 102 and the server 101 may be directly or indirectly connected via wired or wireless communication, which is not limited in this embodiment of the present invention.
相关现有技术提供的app多环境打包方法,每次打出的包对应一个环境地址,打出来之后则不能修改以及变化,如果测试人员手机终端安装了这个包,需要切换环境时,只能重新打一个新环境的包,并覆盖安装之前的包。现有技术的target打包的配置更加复杂,多target会生成多个info.p l i st文件,每个info.p l i st文件与每个target一一对应,如果项目在开发过程中需要使用一些前面没有想到的权限(比如相机、相册、麦克风、定位等),则需要到每个target对应的info.p l i st文件去分别增加对应的权限字段来完成修改。The related prior art provides a multi-environment app packaging method, where each package printed corresponds to an environment address, and cannot be modified or changed after being printed. If the tester's mobile terminal has installed this package and needs to switch environments, he can only re-print a new environment package and overwrite the previously installed package. The configuration of target packaging in the prior art is more complicated. Multiple targets will generate multiple info.pl i st files, and each info.pl i st file corresponds to each target one by one. If the project needs to use some previously unthought-of permissions (such as camera, photo album, microphone, positioning, etc.) during the development process, it is necessary to go to the info.pl i st file corresponding to each target to add the corresponding permission fields to complete the modification.
而本发明的方法是针对在一个app内的多环境配置切换方法,即,打包将应用程序包安装到手机上后,测试人员在不了解任何终端系统开发技术的基础上,能够进入应用软件(app)的环境切换页面中进行对应的环境切换配置,而无需在切换环境的时候重新安装应用程序包,也无需重新启动app。The method of the present invention is a method for switching multiple environment configurations within an app, that is, after packaging and installing the application package on a mobile phone, the tester can enter the environment switching page of the application software (app) to perform corresponding environment switching configuration without having to reinstall the application package or restart the app when switching environments, without having to understand any terminal system development technology.
如果现有技术的方法要测试开发环境、测试环境和正式环境,则它要打三个应用程序包,并分别安装三个应用程序包来进行环境配置以及对应环境下的测试,而本发明只需要打一个应用程序包,并在该应用程序包安装按成后,进入app的环境切换页面便能进行多环境的切换、对应环境的配置切换,简单高效且易于管理。If the prior art method is to test the development environment, the test environment and the formal environment, it needs to install three application packages and respectively perform environment configuration and testing in the corresponding environments. However, the present invention only needs to install one application package, and after the application package is installed, entering the environment switching page of the app can switch between multiple environments and switch the configuration of the corresponding environment. It is simple, efficient and easy to manage.
另外,由于现有技术会生成多个配置文件(如,info.p l i st),进而会导致维护成本变高。In addition, the prior art generates multiple configuration files (eg, info.pl st), which in turn leads to higher maintenance costs.
示例性地基于图1所示的实施环境,本发明实施例提供了一种多环境配置的切换方法,下面以该多环境配置的切换方法应用于服务器101中为例子进行说明,可以理解的是,该方法也可以应用于终端102中。Exemplarily based on the implementation environment shown in FIG. 1 , an embodiment of the present invention provides a method for switching multiple environment configurations. The following is explained using the example of applying the method for switching multiple environment configurations to a server 101 . It is understandable that the method can also be applied to a terminal 102 .
参照图2,图2为本发明实施例提供的应用于服务器的多环境配置的切换方法的流程图,该法的执行主体可以是前述的任意一种计算机设备(包括服务器或者终端)。在本实施例中,终端系统可以为移动终端操作系统,具体以iOS系统作为该终端系统,对应地,应用程序包为应用程序包(IPA);在实际实施时,终端系统可以为安卓系统(Android),对应地,应用程序包为应用程序包(apk)。终端系统还可以为Linux系统,本发明对终端系统的类型在此不做限定。参照图2,该方法可以包括以下步骤:Referring to Figure 2, Figure 2 is a flow chart of a switching method for multi-environment configuration applied to a server provided in an embodiment of the present invention. The executor of the method may be any of the aforementioned computer devices (including a server or a terminal). In this embodiment, the terminal system may be a mobile terminal operating system, specifically an iOS system as the terminal system, and correspondingly, the application package is an application package (IPA); in actual implementation, the terminal system may be an Android system (Android), and correspondingly, the application package is an application package (apk). The terminal system may also be a Linux system, and the present invention does not limit the type of terminal system. Referring to Figure 2, the method may include the following steps:
S100、响应于应用程序的启动信号,根据应用程序是否处于调试模式执行对应的环境配置初始化动作,配置目标环境的服务器地址信息;S100, in response to a start signal of an application, executing a corresponding environment configuration initialization action according to whether the application is in a debugging mode, and configuring server address information of a target environment;
其中,本发明实施例的应用程序的启动信号,可以例如是手机终端的开机信号、在点击应用程序打开程序界面时的启动信号。可以理解的是,应用程序的启动方式可以包括冷启动、温启动与热启动,三种启动状态,每种状态都会影响应用向用户显示所需的时间,本发明不对应用程序的启动方式进行限定。The application startup signal of the embodiment of the present invention may be, for example, a power-on signal of a mobile terminal or a startup signal when clicking on an application to open a program interface. It is understandable that the startup mode of an application may include three startup states: cold startup, warm startup, and hot startup. Each state affects the time required for the application to be displayed to the user. The present invention does not limit the startup mode of the application.
对于本发明实施例在判断应用程序是否处于调试模式时,示例性地,本发明实施例可以在后台代码加入sys.gettrace()函数来判断是否处于调试模式,然后通过pr int()函数将输出"Debug"或"Not Debug",取决于sys.gettrace()函数的返回值。本发明实施例不对调试模式的判断方式进行限定。When determining whether an application is in debug mode, the embodiment of the present invention may add a sys.gettrace() function to the background code to determine whether the application is in debug mode, and then output "Debug" or "Not Debug" through the print() function, depending on the return value of the sys.gettrace() function. The embodiment of the present invention does not limit the method for determining the debug mode.
S200、初始化登陆页面,并显示所述登陆页面;S200, initializing a login page and displaying the login page;
其中,登陆页面可以示例性地包括登录窗口,用于获取用户的登录信息,也可以进行登陆页面的显示风格进行自定义配置,在此不做限定。The login page may exemplarily include a login window for obtaining the user's login information, and the display style of the login page may also be customized, which is not limited here.
S300、响应于对所述登录页面的登录接口调用指令,获取目标用户的信息以及所述目标用户的服务器配置信息,并进入到环境切换页面;S300, in response to a login interface call instruction for the login page, obtaining information of a target user and server configuration information of the target user, and entering an environment switching page;
其中,本发明实施例的服务器配置信息可以包括但不限于mqtt服务器地址、端口号、连接用户名、连接密码等。Among them, the server configuration information of the embodiment of the present invention may include but is not limited to the MQTT server address, port number, connection user name, connection password, etc.
S400、响应于对所述环境切换页面的环境切换操作,将环境标识保存到本地;S400, in response to an environment switching operation on the environment switching page, saving the environment identifier locally;
其中,本发明实施例的环境切换操作可以包括对环境切换页面的点击操作,也可以是语音控制的语音指令,还可以是远程后台的控制指令,本发明实施例不对环境切换操作的具体操作动作和执行方式进行限定。Among them, the environment switching operation of the embodiment of the present invention may include a click operation on the environment switching page, or a voice command of voice control, or a control command of a remote background. The embodiment of the present invention does not limit the specific operation actions and execution methods of the environment switching operation.
S500、根据所述环境标识获取对应的环境配置信息,并切换到指定的环境,退出当前用户登录,返回执行响应于应用程序的启动信号,根据应用程序是否处于调试模式执行对应的环境配置初始化动作,配置目标环境的服务器地址信息的步骤,直至完成应用程序的开发测试;S500, obtaining corresponding environment configuration information according to the environment identifier, switching to the specified environment, logging out the current user, returning to the step of executing in response to the application startup signal, executing the corresponding environment configuration initialization action according to whether the application is in debugging mode, and configuring the server address information of the target environment until the development and testing of the application is completed;
其中,每个环境标识指代不同的环境类型。Each environment identifier refers to a different environment type.
可选地,所述根据应用程序是否处于调试模式执行对应的环境配置初始化动作,配置目标环境的服务器地址信息,包括以下步骤:Optionally, performing a corresponding environment configuration initialization action according to whether the application is in debugging mode to configure the server address information of the target environment includes the following steps:
判断应用程序是否处于调试模式;Determine whether the application is in debug mode;
若是,则根据本地存储的环境标识,判断对应的环境类型,记录环境类型并初始化app接口服务器地址和H5服务器地址;If so, determine the corresponding environment type based on the locally stored environment identifier, record the environment type and initialize the app interface server address and H5 server address;
若否,则使用正式环境配置初始化app接口服务器地址与H5服务器地址。If not, use the formal environment configuration to initialize the app interface server address and H5 server address.
可选地,所述根据应用程序是否处于调试模式执行对应的环境配置初始化动作,配置目标环境的服务器地址信息,还包括以下步骤:Optionally, the performing of the corresponding environment configuration initialization action according to whether the application is in the debugging mode to configure the server address information of the target environment further includes the following steps:
当应用程序处于调试模式,且本地存储的环境标识指向自定义环境时,从本地存储获取自定义的app服务器地址和H5服务器地址。When the application is in debug mode and the environment identifier of the local storage points to the custom environment, the custom app server address and H5 server address are obtained from the local storage.
可选地,所述响应于对所述登录页面的登录接口调用指令,获取目标用户的信息以及所述目标用户的服务器配置信息,并进入到环境切换页面,包括:Optionally, in response to the login interface calling instruction of the login page, obtaining the target user information and the server configuration information of the target user, and entering the environment switching page includes:
响应于对所述登录页面的登录接口调用指令,获取目标用户的信息;In response to a login interface call instruction for the login page, obtaining information of a target user;
根据所述目标用户的信息,获取mqtt的配置信息;According to the information of the target user, obtain the configuration information of mqtt;
其中,所述mqtt的配置信息包括:mqtt服务器地址、端口号、连接用户名、连接密码。The configuration information of the MQTT includes: MQTT server address, port number, connection username, and connection password.
可选地,所述方法还包括:Optionally, the method further comprises:
在完成环境的切换后,识别应用程序所处的环境类型,当应用程序所处的环境类型为预发布环境或正式环境时,验证mqtt服务器证书,并在验证通过后连接mqtt服务器,并初始化所述登录界面。After completing the environment switching, identify the environment type in which the application is located. When the environment type in which the application is located is a pre-release environment or a formal environment, verify the mqtt server certificate, connect to the mqtt server after the verification is passed, and initialize the login interface.
可选地,所述环境类型包括开发环境、测试环境、预发布环境、自定义环境、正式环境。Optionally, the environment types include development environment, test environment, pre-release environment, custom environment, and formal environment.
下面结合说明书附图,对本发明在具体应用场景下的实施过程进行详细描述:The implementation process of the present invention in a specific application scenario is described in detail below in conjunction with the accompanying drawings of the specification:
如图3所示,本发明实施例的实施过程包括以下步骤:As shown in FIG3 , the implementation process of the embodiment of the present invention includes the following steps:
1、启动app。1. Launch the app.
2、初始化环境配置:如果是不是Debug模式,记录app环境为正式环境,直接使用正式环境配置初始化app接口服务器地址与H5服务器地址,如果是Debug模式则判断本地是否有环境标识,如果有环境标识,根据环境标识判断当前的环境类型,记录环境类型并初始化app接口服务器地址和H5服务器地址(如果判断是自定义环境时,从本地存储获取自定义的服务器地址和H5服务器地址)。2. Initialize environment configuration: If it is not Debug mode, record the app environment as the formal environment, and directly use the formal environment configuration to initialize the app interface server address and H5 server address. If it is Debug mode, determine whether there is an environment identifier locally. If there is an environment identifier, determine the current environment type according to the environment identifier, record the environment type and initialize the app interface server address and H5 server address (if it is determined to be a custom environment, obtain the custom server address and H5 server address from local storage).
需要说明的是,本发明实施例提到环境配置过程中需要配置接口服务器和H5服务器的信息,其中,接口服务器地址用于后续页面中的网络数据获取,每个网络数据获取都需要完整的接口服务器地址+路径+参数。H5服务器地址是在app里面会加载一些H5页面,加载每一个H5页面都需要完整的页面地址,页面地址是要用H5服务器地址+H5页面路径+(必要的参数)构成的。It should be noted that the embodiment of the present invention mentions that the information of the interface server and the H5 server needs to be configured during the environment configuration process, wherein the interface server address is used for network data acquisition in subsequent pages, and each network data acquisition requires a complete interface server address + path + parameters. The H5 server address is used to load some H5 pages in the app, and a complete page address is required to load each H5 page, and the page address is composed of the H5 server address + H5 page path + (necessary parameters).
3、初始化登录页面。3. Initialize the login page.
需要说明的是,本发明实施例中,当步骤进行到登录页面,就已经进入开发流程了,只是后续的网络请求需要用到前面初始化的app接口服务器地址,H5页面加载时需要用到前面初始化的app H5服务器地址。It should be noted that in the embodiment of the present invention, when the step proceeds to the login page, the development process has been entered, but the subsequent network requests need to use the previously initialized app interface server address, and the previously initialized app H5 server address is needed when the H5 page is loaded.
4、点击登录调用登录接口,成功后调用接口获取用户信息、获取mqtt配置信息连接mqtt(连接mqtt前判断app环境类型,如果app环境类型是预发布或者正式环境则需要校验mqtt服务器证书,否则不校验mqtt服务器证书)并进入到首页。4. Click Login to call the login interface. After success, call the interface to obtain user information and mqtt configuration information to connect to mqtt (determine the app environment type before connecting to mqtt. If the app environment type is a pre-release or formal environment, you need to verify the mqtt server certificate, otherwise the mqtt server certificate is not verified) and enter the homepage.
5、测试人员可以到设置页面切换环境,切换环境时,主要就是保存环境标识到本地,每个环境对应不同的环境标识(可以设定开发环境对应标识A,测试环境对应B、预发布环境对应C,自定义环境对应D(自定义环境需要额外保存自定义的接口服务器地址和H5服务器地址),正式环境对应E),切换到相应环境后(app内部会退出登录、清空用户登录数据、断开Mqtt连接,清空Mqtt配置信息数据等),然后重新走初始化环境配置流程。5. Testers can switch environments on the settings page. When switching environments, the main thing is to save the environment identifier locally. Each environment corresponds to a different environment identifier (you can set the development environment to correspond to identifier A, the test environment to correspond to B, the pre-release environment to correspond to C, the custom environment to correspond to D (the custom environment needs to save the custom interface server address and H5 server address), and the formal environment to correspond to E). After switching to the corresponding environment (the app will log out, clear the user login data, disconnect the Mqtt connection, clear the Mqtt configuration information data, etc.), then re-initialize the environment configuration process.
其中,mqtt的配置信息包括:mqtt服务器地址、端口号、连接用户名、连接密码等。需要说明的是,上述mqtt的配置信息与切换环境无关,本实施例在后续要根据环境判断连接mqtt服务器的时候,是否需要校验mqtt服务器证书,因为在开发、测试环境mqtt服务器一般都没有配置校验证书。Among them, the configuration information of MQTT includes: MQTT server address, port number, connection username, connection password, etc. It should be noted that the above MQTT configuration information has nothing to do with the switching environment. In this embodiment, when connecting to the MQTT server, it is necessary to verify the MQTT server certificate according to the environment in the future, because the MQTT server is generally not configured with a verification certificate in the development and test environment.
需要说明的是,对于mqtt服务器的校验过程,由于在iOS中使用CocoaMQTT库进行MQTT通信时,如果MQTT服务器使用了SSL/TLS进行加密,那么就需要对服务器的证书进行校验以确保通信的安全性。CocoaMQTT本身并不直接处理证书校验的逻辑,而是依赖于iOS的安全框架和底层的网络库来进行。It should be noted that for the verification process of the mqtt server, since when using the CocoaMQTT library for MQTT communication in iOS, if the MQTT server uses SSL/TLS for encryption, then the server certificate needs to be verified to ensure the security of communication. CocoaMQTT itself does not directly handle the logic of certificate verification, but relies on the iOS security framework and the underlying network library to do so.
在iOS中,当使用URLSess ion或底层的NSStream、CFStream进行网络通信时,证书校验是自动进行的。系统会使用其内置的信任策略来验证服务器证书的合法性。这包括检查证书是否由受信任的根证书颁发机构签发,证书是否过期,证书上的域名是否与请求的域名匹配等。In iOS, when using URLSession or the underlying NSStream and CFStream for network communication, certificate verification is performed automatically. The system uses its built-in trust policy to verify the legitimacy of the server certificate. This includes checking whether the certificate is issued by a trusted root certificate authority, whether the certificate is expired, whether the domain name on the certificate matches the requested domain name, etc.
因此,在一些实施例中,只需要设置一个boo l值,如果不做校验,后面就不会再做这些安全校验,因为很多的mqtt开发和测试服务器都没配置校验证书,本发明对此不做限制。Therefore, in some embodiments, only a bool value needs to be set. If no verification is performed, these security verifications will not be performed later. Because many MQTT development and test servers are not configured with verification certificates, the present invention does not limit this.
综上,本发明实施例的多环境切换配置的方法具有高效、准确且易于管理的优点,能减少开发人员的打包工作与加快测试人员的测试进度。In summary, the method for multi-environment switching configuration in the embodiment of the present invention has the advantages of being efficient, accurate and easy to manage, and can reduce the packaging work of developers and speed up the testing progress of testers.
本发明实施例的另一方面还提供了一种多环境配置的切换系统,包括:Another aspect of the embodiment of the present invention further provides a switching system for multiple environment configurations, including:
第一模块,用于响应于应用程序的启动信号,根据应用程序是否处于调试模式执行对应的环境配置初始化动作,配置目标环境的服务器地址信息;The first module is used to respond to the start signal of the application program, execute the corresponding environment configuration initialization action according to whether the application program is in the debugging mode, and configure the server address information of the target environment;
第二模块,用于初始化登陆页面,并显示所述登陆页面;The second module is used to initialize the login page and display the login page;
第三模块,用于响应于对所述登录页面的登录接口调用指令,获取目标用户的信息以及所述目标用户的服务器配置信息,并进入到环境切换页面;The third module is used to obtain the target user's information and the target user's server configuration information in response to the login interface calling instruction of the login page, and enter the environment switching page;
第四模块,用于响应于对所述环境切换页面的环境切换操作,将环境标识保存到本地;A fourth module is used to save the environment identifier locally in response to the environment switching operation on the environment switching page;
第五模块,用于根据所述环境标识获取对应的环境配置信息,并切换到指定的环境,退出当前用户登录,返回执行响应于应用程序的启动信号,根据应用程序是否处于调试模式执行对应的环境配置初始化动作,配置目标环境的服务器地址信息的步骤,直至完成应用程序的开发测试;The fifth module is used to obtain the corresponding environment configuration information according to the environment identifier, switch to the specified environment, log out the current user, return to execute the corresponding environment configuration initialization action in response to the application startup signal, and configure the server address information of the target environment according to whether the application is in debugging mode, until the development and testing of the application is completed;
其中,每个环境标识指代不同的环境类型。Each environment identifier refers to a different environment type.
可以理解的是,上述方法实施例中的内容均适用于本系统实施例中,本系统实施例所具体实现的功能与上述方法实施例相同,并且达到的有益效果与上述方法实施例所达到的有益效果也相同。It can be understood that the contents of the above method embodiments are all applicable to the present system embodiments, the functions specifically implemented by the present system embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
本发明实施例还提供了一种电子设备,电子设备包括存储器和处理器,存储器存储有计算机程序,处理器执行计算机程序时实现上述多环境配置的切换方法。该电子设备可以为包括平板电脑、车载电脑等任意智能终端。The embodiment of the present invention further provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above-mentioned multi-environment configuration switching method when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.
可以理解的是,上述方法实施例中的内容均适用于本设备实施例中,本设备实施例所具体实现的功能与上述方法实施例相同,并且达到的有益效果与上述方法实施例所达到的有益效果也相同。It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
请参阅图4,图4示意了另一实施例的电子设备的硬件结构,电子设备包括:Please refer to FIG. 4 , which schematically shows the hardware structure of an electronic device according to another embodiment. The electronic device includes:
处理器401,可以采用通用的CPU(Centra l Process ingUn it,中央处理器)、微处理器、应用专用集成电路(App l icat ionSpecificI ntegratedCi rcu it,ASIC)、或者一个或多个集成电路等方式实现,用于执行相关程序,以实现本发明实施例所提供的技术方案;The processor 401 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present invention.
存储器402,可以采用只读存储器(ReadOn l yMemory,ROM)、静态存储设备、动态存储设备或者随机存取存储器(RandomAccessMemory,RAM)等形式实现。存储器402可以存储操作系统和其他应用程序,在通过软件或者固件来实现本说明书实施例所提供的技术方案时,相关的程序代码保存在存储器402中,并由处理器401来调用执行本发明实施例的多环境配置的切换方法;The memory 402 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 402 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 402, and the processor 401 calls and executes the switching method of the multi-environment configuration of the embodiment of the present invention;
输入/输出接口403,用于实现信息输入及输出;Input/output interface 403, used to implement information input and output;
通信接口404,用于实现本设备与其他设备的通信交互,可以通过有线方式(例如USB、网线等)实现通信,也可以通过无线方式(例如移动网络、WI FI、蓝牙等)实现通信;Communication interface 404, used to realize communication interaction between the device and other devices, which can be realized through wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WI FI, Bluetooth, etc.);
总线405,在设备的各个组件(例如处理器401、存储器402、输入/输出接口403和通信接口404)之间传输信息;Bus 405 , which transmits information between various components of the device (e.g., processor 401 , memory 402 , input/output interface 403 , and communication interface 404 );
其中处理器401、存储器402、输入/输出接口403和通信接口404通过总线405实现彼此之间在设备内部的通信连接。The processor 401 , the memory 402 , the input/output interface 403 and the communication interface 404 are connected to each other in communication within the device via the bus 405 .
本发明实施例还提供了一种计算机可读存储介质,该计算机可读存储介质存储有计算机程序,该计算机程序被处理器执行时实现上述多环境配置的切换方法。An embodiment of the present invention further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the switching method of the multi-environment configuration is implemented.
可以理解的是,上述方法实施例中的内容均适用于本存储介质实施例中,本存储介质实施例所具体实现的功能与上述方法实施例相同,并且达到的有益效果与上述方法实施例所达到的有益效果也相同。It can be understood that the contents of the above method embodiments are all applicable to the present storage medium embodiments, the functions specifically implemented by the present storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
存储器作为一种非暂态计算机可读存储介质,可用于存储非暂态软件程序以及非暂态性计算机可执行程序。此外,存储器可以包括高速随机存取存储器,还可以包括非暂态存储器,例如至少一个磁盘存储器件、闪存器件、或其他非暂态固态存储器件。在一些实施方式中,存储器可选包括相对于处理器远程设置的存储器,这些远程存储器可以通过网络连接至该处理器。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
需要说明的是,在本发明的各个具体实施方式中,当涉及到需要根据用户信息、用户行为数据,用户历史数据以及用户位置信息等与用户身份或特性相关的数据进行相关处理时,都会先获得用户的许可或者同意,而且,对这些数据的收集、使用和处理等,都会遵守相关法律法规和标准。此外,当本发明实施例需要获取用户的敏感个人信息时,会通过弹窗或者跳转到确认页面等方式获得用户的单独许可或者单独同意,在明确获得用户的单独许可或者单独同意之后,再获取用于使本发明实施例能够正常运行的必要的用户相关数据。It should be noted that in various specific embodiments of the present invention, when it comes to the need to perform relevant processing based on data related to user identity or characteristics such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of these data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present invention needs to obtain the user's sensitive personal information, it will obtain the user's separate permission or consent through a pop-up window or jump to a confirmation page, and after clearly obtaining the user's separate permission or consent, it will obtain the necessary user-related data for the normal operation of the embodiment of the present invention.
在一些可选择的实施例中,在方框图中提到的功能/操作可以不按照操作示图提到的顺序发生。例如,取决于所涉及的功能/操作,连续示出的两个方框实际上可以被大体上同时地执行或所述方框有时能以相反顺序被执行。此外,在本发明的流程图中所呈现和描述的实施例以示例的方式被提供,目的在于提供对技术更全面的理解。所公开的方法不限于本文所呈现的操作和逻辑流程。可选择的实施例是可预期的,其中各种操作的顺序被改变以及其中被描述为较大操作的一部分的子操作被独立地执行。In some selectable embodiments, the function/operation mentioned in the block diagram may not occur in the order mentioned in the operation diagram. For example, depending on the function/operation involved, the two boxes shown in succession can actually be executed substantially simultaneously or the boxes can sometimes be executed in reverse order. In addition, the embodiment presented and described in the flow chart of the present invention is provided by way of example, for the purpose of providing a more comprehensive understanding of technology. The disclosed method is not limited to the operation and logic flow presented herein. Selectable embodiments are expected, wherein the order of various operations is changed and the sub-operation of a part for which is described as a larger operation is performed independently.
此外,虽然在功能性模块的背景下描述了本发明,但应当理解的是,除非另有相反说明,所述的功能和/或特征中的一个或多个可以被集成在单个物理装置和/或软件模块中,或者一个或多个功能和/或特征可以在单独的物理装置或软件模块中被实现。还可以理解的是,有关每个模块的实际实现的详细讨论对于理解本发明是不必要的。更确切地说,考虑到在本文中公开的装置中各种功能模块的属性、功能和内部关系的情况下,在工程师的常规技术内将会了解该模块的实际实现。因此,本领域技术人员运用普通技术就能够在无需过度试验的情况下实现在权利要求书中所阐明的本发明。还可以理解的是,所公开的特定概念仅仅是说明性的,并不意在限制本发明的范围,本发明的范围由所附权利要求书及其等同方案的全部范围来决定。In addition, although the present invention is described in the context of functional modules, it should be understood that, unless otherwise specified, one or more of the functions and/or features described may be integrated into a single physical device and/or software module, or one or more functions and/or features may be implemented in separate physical devices or software modules. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the present invention. More specifically, in view of the properties, functions, and internal relationships of the various functional modules in the device disclosed herein, the actual implementation of the module will be understood within the conventional skills of the engineer. Therefore, those skilled in the art can implement the present invention set forth in the claims without excessive experimentation using ordinary techniques. It is also understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present invention, which is determined by the full scope of the appended claims and their equivalents.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-On ly Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.
在流程图中表示或在此以其他方式描述的逻辑和/或步骤,例如,可以被认为是用于实现逻辑功能的可执行指令的定序列表,可以具体实现在任何计算机可读介质中,以供指令执行系统、装置或设备(如基于计算机的系统、包括处理器的系统或其他可以从指令执行系统、装置或设备取指令并执行指令的系统)使用,或结合这些指令执行系统、装置或设备而使用。就本说明书而言,“计算机可读介质”可以是任何可以包含、存储、通信、传播或传输程序以供指令执行系统、装置或设备或结合这些指令执行系统、装置或设备而使用的装置。The logic and/or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.
计算机可读介质的更具体的示例(非穷尽性列表)包括以下:具有一个或多个布线的电连接部(电子装置)、便携式计算机盘盒(磁装置)、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编辑只读存储器(EPROM或闪速存储器)、光纤装置以及便携式光盘只读存储器(CDROM)。另外,计算机可读介质甚至可以是可在其上打印所述程序的纸或其他合适的介质,因为可以例如通过对纸或其他介质进行光学扫描,接着进行编辑、解译或必要时以其他合适方式进行处理来以电子方式获得所述程序,然后将其存储在计算机存储器中。More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.
应当理解,本发明的各部分可以用硬件、软件、固件或它们的组合来实现。在上述实施方式中,多个步骤或方法可以用存储在存储器中且由合适的指令执行系统执行的软件或固件来实现。例如,如果用硬件来实现,和在另一实施方式中一样,可用本领域公知的下列技术中的任一项或他们的组合来实现:具有用于对数据信号实现逻辑功能的逻辑门电路的离散逻辑电路,具有合适的组合逻辑门电路的专用集成电路,可编程门阵列(PGA),现场可编程门阵列(FPGA)等。It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本发明的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不一定指的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任何的一个或多个实施例或示例中以合适的方式结合。In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
尽管已经示出和描述了本发明的实施例,本领域的普通技术人员可以理解:在不脱离本发明的原理和宗旨的情况下可以对这些实施例进行多种变化、修改、替换和变型,本发明的范围由权利要求及其等同物限定。Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.
以上是对本发明的较佳实施进行了具体说明,但本发明并不限于所述实施例,熟悉本领域的技术人员在不违背本发明精神的前提下还可做出种种的等同变形或替换,这些等同的变形或替换均包含在本发明权利要求所限定的范围内。The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the described embodiments. Those skilled in the art may make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present invention.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410827539.8ACN118838631A (en) | 2024-06-25 | 2024-06-25 | Multi-environment configuration switching method, system and storage medium |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410827539.8ACN118838631A (en) | 2024-06-25 | 2024-06-25 | Multi-environment configuration switching method, system and storage medium |
| Publication Number | Publication Date |
|---|---|
| CN118838631Atrue CN118838631A (en) | 2024-10-25 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202410827539.8APendingCN118838631A (en) | 2024-06-25 | 2024-06-25 | Multi-environment configuration switching method, system and storage medium |
| Country | Link |
|---|---|
| CN (1) | CN118838631A (en) |
| Publication | Publication Date | Title |
|---|---|---|
| US9003412B1 (en) | Performing identified repeatable computations in a changing computing environment | |
| US8874953B2 (en) | System and method of cloud testing and remote monitoring for integrated circuit components in system validation | |
| WO2018137564A1 (en) | Service processing method and apparatus | |
| US10255151B1 (en) | Security testing using a computer add-in card | |
| CN110764846B (en) | A method for realizing cross-browser invoking computer external devices based on local proxy service | |
| WO2017166447A1 (en) | Method and device for loading kernel module | |
| US10261880B1 (en) | Error generation using a computer add-in card | |
| CN107844306B (en) | Application program repairing method and device, storage medium and terminal | |
| US10656939B2 (en) | Modeling lifetime of hybrid software application using application manifest | |
| WO2020211360A1 (en) | Mock test method and system, electronic device, and computer non-volatile readable storage medium | |
| CN112996020A (en) | Bluetooth-based automatic testing method and device and Bluetooth testing terminal | |
| CN114448823B (en) | NFS service testing method and system and electronic equipment | |
| CN110244963B (en) | Data updating method and device and terminal equipment | |
| JP6283096B2 (en) | Program test service | |
| EP4350516A1 (en) | Control method and electronic device | |
| CN111897728B (en) | Interface debugging method and related equipment | |
| CN112580086B (en) | Configuration file access protection method, device, equipment and storage medium | |
| CN118295678A (en) | Firmware programming method, device and medium for basic input/output system | |
| Rothman et al. | Harnessing the UEFI Shell: Moving the platform beyond DOS | |
| WO2020221161A1 (en) | Computing job processing method and system, mobile device and acceleration device | |
| CN118838631A (en) | Multi-environment configuration switching method, system and storage medium | |
| CN115454856B (en) | Multi-application security detection method, device, medium and electronic equipment | |
| CN107247661B (en) | Method and system for supporting automatic verification of installation package of application | |
| CN113407490B (en) | Method, device, electronic device and storage medium for exporting private directory files | |
| CN118277229A (en) | Vehicle upgrade test method and device, electronic equipment and storage medium |
| 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 |