CN111381836A - Switching method and device of application program deployment environment - Google Patents
Switching method and device of application program deployment environment Download PDFInfo
- Publication number
- CN111381836A CN111381836A CN201811644739.0A CN201811644739A CN111381836A CN 111381836 A CN111381836 A CN 111381836A CN 201811644739 A CN201811644739 A CN 201811644739A CN 111381836 A CN111381836 A CN 111381836A
- Authority
- CN
- China
- Prior art keywords
- environment
- application
- user
- deployment environment
- deployment
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/61—Installation
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- User Interface Of Digital Computer (AREA)
- Stored Programmes (AREA)
Abstract
本发明公开了一种应用程序部署环境的切换方法及装置。其中,方法包括:监测用户操作,根据用户操作判断是否满足应用程序的部署环境切换条件;若是,则呈现包含多个部署环境选项的显示窗口;监测用户对任一部署环境选项的选择操作,根据选择操作将应用程序的当前环境切换至对应的部署环境。基于本发明提供的方案,可以很方便地在不同部署环境之间切换,无需再针对每个部署环境提供一个应用程序包,通过提供一个应用程序包就能方便地实现开发、测试、发布,简化了用户操作。
The invention discloses a switching method and device for application deployment environment. Wherein, the method includes: monitoring a user operation, and judging whether a deployment environment switching condition of the application program is satisfied according to the user operation; if so, presenting a display window including a plurality of deployment environment options; Select Action to switch the current environment of the application to the corresponding deployment environment. Based on the solution provided by the present invention, it is easy to switch between different deployment environments, and it is no longer necessary to provide an application package for each deployment environment. user action.
Description
技术领域technical field
本发明涉及互联网技术领域,具体涉及一种应用程序部署环境的切换方法及装置。The present invention relates to the field of Internet technologies, in particular to a method and device for switching application deployment environments.
背景技术Background technique
随着互联网技术的发展,基于互联网的各种应用程序应运而生。现有的应用程序从开发到上线包括以下环境:开发环节、测试环节、发布环节等环节,每个环境都对应一个应用程序包,且都对应一种部署环境。通常情况下,应用程序在发布后,使用者在使用时可能会遇到问题,此时就需要到测试环境进行测试以解决相应的问题,然而,由于已经发布了应用程序,就无法切换至测试环境。With the development of Internet technology, various Internet-based applications emerge as the times require. Existing applications include the following environments from development to launch: development, testing, and release. Each environment corresponds to an application package and a deployment environment. Usually, after the application is released, users may encounter problems when using it. At this time, it is necessary to test in the test environment to solve the corresponding problems. However, since the application has been released, it is impossible to switch to testing. surroundings.
另外,现有技术中,开发人员在开发完成后,需要向测试人员发两个包:发布包和测试包,很可能出现开发人员仅提供了一个应用程序包的情况,测试人员还需要告知开发人员,提供两个包,过程比较繁琐,无法实现提供一个应用程序包就可以在多个部署环境之间自由切换。In addition, in the prior art, after the development is completed, the developer needs to send two packages to the tester: a release package and a test package. It is very likely that the developer only provides one application package, and the tester also needs to inform the developer Personnel, provide two packages, the process is cumbersome, and it is impossible to provide one application package to switch freely between multiple deployment environments.
发明内容SUMMARY OF THE INVENTION
鉴于上述问题,提出了本发明以便提供一种克服上述问题或者至少部分地解决上述问题的应用程序部署环境的切换方法及装置。In view of the above problems, the present invention is proposed in order to provide a switching method and device for an application deployment environment that overcomes the above problems or at least partially solves the above problems.
根据本发明的一个方面,提供了一种应用程序部署环境的切换方法,包括:According to an aspect of the present invention, a method for switching application deployment environments is provided, including:
监测用户操作,根据用户操作判断是否满足应用程序的部署环境切换条件;Monitor user operations, and judge whether the application deployment environment switching conditions are met according to user operations;
若是,则呈现包含多个部署环境选项的显示窗口;If so, present a display window containing multiple deployment environment options;
监测用户对任一部署环境选项的选择操作,根据选择操作将应用程序的当前环境切换至对应的部署环境。Monitor the user's selection operation of any deployment environment option, and switch the current environment of the application to the corresponding deployment environment according to the selection operation.
根据本发明的另一方面,提供了一种应用程序部署环境的切换装置,包括:According to another aspect of the present invention, an apparatus for switching an application deployment environment is provided, comprising:
第一监测模块,适于监测用户操作;a first monitoring module, adapted to monitor user operations;
第一判断模块,适于根据用户操作判断是否满足应用程序的部署环境切换条件;a first judging module, adapted to judge whether the deployment environment switching conditions of the application are satisfied according to the user operation;
呈现模块,适于若判断出满足应用程序的部署环境切换条件,则呈现包含多个部署环境选项的显示窗口;a presentation module, adapted to present a display window including a plurality of deployment environment options if it is determined that the deployment environment switching condition of the application is satisfied;
第二监测模块,适于监测用户对任一部署环境选项的选择操作;The second monitoring module is suitable for monitoring the user's selection operation of any deployment environment option;
切换模块,适于根据选择操作将应用程序的当前环境切换至对应的部署环境。The switching module is adapted to switch the current environment of the application to the corresponding deployment environment according to the selection operation.
根据本发明的又一方面,提供了一种计算设备,包括:处理器、存储器、通信接口和通信总线,处理器、存储器和通信接口通过通信总线完成相互间的通信;According to another aspect of the present invention, a computing device is provided, including: a processor, a memory, a communication interface, and a communication bus, and the processor, the memory, and the communication interface communicate with each other through the communication bus;
存储器用于存放至少一可执行指令,可执行指令使处理器执行上述应用程序部署环境的切换方法对应的操作。The memory is used for storing at least one executable instruction, and the executable instruction enables the processor to perform the operation corresponding to the above-mentioned switching method of the application deployment environment.
根据本发明的再一方面,提供了一种计算机存储介质,存储介质中存储有至少一可执行指令,可执行指令使处理器执行如上述应用程序部署环境的切换方法对应的操作。According to yet another aspect of the present invention, a computer storage medium is provided. The storage medium stores at least one executable instruction, and the executable instruction causes the processor to perform operations corresponding to the foregoing application deployment environment switching method.
根据本发明提供的方案,监测用户操作,根据用户操作判断是否满足应用程序的部署环境切换条件;若是,则呈现包含多个部署环境选项的显示窗口;监测用户对任一部署环境选项的选择操作,根据选择操作将应用程序的当前环境切换至对应的部署环境。基于本发明提供的方案,可以很方便地在不同部署环境之间切换,无需再针对每个部署环境提供一个应用程序包,通过提供一个应用程序包就能方便地实现开发、测试、发布,简化了用户操作。According to the solution provided by the present invention, the user operation is monitored, and whether the deployment environment switching condition of the application program is satisfied is judged according to the user operation; if so, a display window containing multiple deployment environment options is presented; the user's selection operation on any deployment environment option is monitored. , and switch the current environment of the application to the corresponding deployment environment according to the selection operation. Based on the solution provided by the present invention, it is easy to switch between different deployment environments, and it is no longer necessary to provide an application package for each deployment environment. user action.
上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。The above description is only an overview of the technical solutions of the present invention, in order to be able to understand the technical means of the present invention more clearly, it can be implemented according to the content of the description, and in order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand , the following specific embodiments of the present invention are given.
附图说明Description of drawings
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are for the purpose of illustrating preferred embodiments only and are not to be considered limiting of the invention. Also, the same components are denoted by the same reference numerals throughout the drawings. In the attached image:
图1示出了根据本发明一个实施例的应用程序部署环境的切换方法的流程示意图;1 shows a schematic flowchart of a method for switching an application deployment environment according to an embodiment of the present invention;
图2A示出了根据本发明另一个实施例的应用程序部署环境的切换方法的流程示意图;2A shows a schematic flowchart of a method for switching an application deployment environment according to another embodiment of the present invention;
图2B为应用程序页面的预设位置的示意图;2B is a schematic diagram of a preset position of an application page;
图2C为包含多个部署环境选项的显示窗口的示意图;2C is a schematic diagram of a display window containing multiple deployment environment options;
图3示出了根据本发明又一个实施例的应用程序部署环境的切换方法的流程示意图;3 shows a schematic flowchart of a method for switching application deployment environments according to yet another embodiment of the present invention;
图4示出了根据本发明一个实施例的应用程序部署环境的切换装置的结构示意图;FIG. 4 shows a schematic structural diagram of a switching device for an application deployment environment according to an embodiment of the present invention;
图5示出了根据本发明一个实施例的计算设备的结构示意图。FIG. 5 shows a schematic structural diagram of a computing device according to an embodiment of the present invention.
具体实施方式Detailed ways
下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided so that the present disclosure will be more thoroughly understood, and will fully convey the scope of the present disclosure to those skilled in the art.
图1示出了根据本发明一个实施例的应用程序部署环境的切换方法的流程示意图。如图1所示,该方法包括以下步骤:FIG. 1 shows a schematic flowchart of a method for switching an application deployment environment according to an embodiment of the present invention. As shown in Figure 1, the method includes the following steps:
步骤S100,监测用户操作。Step S100, monitoring user operations.
用户操作指用户利用终端所做的一些操作,通过监测用户操作,可以确定是否执行部署环境切换。User operations refer to some operations performed by the user using the terminal. By monitoring the user operations, it can be determined whether to perform deployment environment switching.
步骤S101,根据用户操作判断是否满足应用程序的部署环境切换条件,若是,则执行步骤S102。Step S101 , according to the user operation, it is judged whether the deployment environment switching condition of the application program is satisfied, and if so, step S102 is executed.
应用程序部署环境是针对应用程序所部署的环境,在本实施例中,部署环境包含:开发环境、测试环境、发布环境选项和/或个人环境。The application deployment environment is an environment for application deployment. In this embodiment, the deployment environment includes: a development environment, a test environment, a release environment option, and/or a personal environment.
其中,开发环境是程序员开发时所使用的环境,为了开发调试方便,一般打开全部错误报告。Among them, the development environment is the environment used by programmers for development. For the convenience of development and debugging, all error reports are generally opened.
测试环境是指测试人员利用一些工具及数据所模拟出的、接近真实用户使用环境的环境,测试环境的目的是为了使测试结果更加真实有效。一个应用程序在测试环境工作不正常,那么肯定不能把它发布使用。The test environment refers to an environment that is simulated by testers using some tools and data, and is close to the real user environment. The purpose of the test environment is to make the test results more real and effective. An application that doesn't work properly in a test environment is definitely not ready to be released for use.
发布环境是真实用户可以访问的环境,一般会关掉错误报告,打开错误日志。The publishing environment is an environment accessible to real users, generally turning off error reporting and turning on error logging.
个人环境是针对个人开发或测试所使用的环境。A personal environment is an environment used for personal development or testing.
通常情况下,启动应用程序后,或者进入到应用程序的某个页面后,应用程序都将对应唯一的部署环境,本实施例支持切换部署环境,其中,部署环境切换条件是切换部署环境时应该满足的条件,在满足部署环境切换条件时,允许执行部署环境之间的切换。Under normal circumstances, after starting the application or entering a certain page of the application, the application will correspond to a unique deployment environment. This embodiment supports switching deployment environments. The deployment environment switching condition is that when switching the deployment environment, the If the conditions are met, switching between deployment environments is allowed when the deployment environment switching conditions are met.
步骤S102,呈现包含多个部署环境选项的显示窗口。Step S102, presenting a display window including multiple deployment environment options.
在根据用户操作判断出满足应用程序的部署环境切换条件的情况下,向用户呈现包含多个部署环境选项的显示窗口,其中,多个部署环境选项包括:测试环境选项、开发环境选项、发布环境选项和/或个人环境选项。在将包含多个部署环境选项的显示窗口呈现给用户后,用户可以根据实际需要从显示窗口显示的多个部署环境选项中选择一个部署环境选项。When it is determined according to the user operation that the deployment environment switching conditions of the application are satisfied, a display window containing multiple deployment environment options is presented to the user, wherein the multiple deployment environment options include: testing environment options, development environment options, and release environment options options and/or personal environment options. After the display window containing multiple deployment environment options is presented to the user, the user can select one deployment environment option from the multiple deployment environment options displayed in the display window according to actual needs.
步骤S103,监测用户对任一部署环境选项的选择操作,根据选择操作将应用程序的当前环境切换至对应的部署环境。Step S103: Monitor the user's selection operation on any deployment environment option, and switch the current environment of the application to the corresponding deployment environment according to the selection operation.
部署环境选项与部署环境相对应,例如,开发环境选项与开发环境相对应,测试环境选项与测试环境相对应,发布环境选项与发布环境相对应,个人环境选项与个人环境相对应。Deployment environment options correspond to deployment environments, for example, development environment options correspond to development environments, test environment options correspond to test environments, release environment options correspond to release environments, and personal environment options correspond to personal environments.
用户想切换至相应的部署环境,可以通过选择相应的部署环境选项来进行切换,因此,需要实时监测用户对显示窗口中的部署环境选项的选择操作,例如,用户对显示窗口中的任一部署环境选项的点击操作,可以视为用户选择了相应的部署环境选项,根据该选择操作,将应用程序的当前环境切换至对应的部署环境。If the user wants to switch to the corresponding deployment environment, he can switch by selecting the corresponding deployment environment option. Therefore, the user's selection operation on the deployment environment option in the display window needs to be monitored in real time. The click operation of the environment option can be regarded as the user selecting the corresponding deployment environment option, and according to the selection operation, the current environment of the application is switched to the corresponding deployment environment.
应用程序的当前环境是启动应用程序后,或者进入到应用程序的某个页面后,应用程序当前所处的部署环境,可能是开发环境、测试环境、发布环境选项或个人环境中的任意一种环境。The current environment of the application is the current deployment environment of the application after starting the application or entering a certain page of the application, which may be any of the development environment, test environment, release environment option or personal environment surroundings.
根据本发明上述实施例提供的方法,监测用户操作,根据用户操作判断是否满足应用程序的部署环境切换条件;若是,则呈现包含多个部署环境选项的显示窗口;监测用户对任一部署环境选项的选择操作,根据选择操作将应用程序的当前环境切换至对应的部署环境。基于本发明提供的方案,可以很方便地在不同部署环境之间切换,无需再针对每个部署环境提供一个应用程序包,通过提供一个应用程序包就能方便地实现开发、测试、发布,简化了用户操作。According to the method provided by the above-mentioned embodiments of the present invention, the user operation is monitored, and whether the deployment environment switching condition of the application program is satisfied is judged according to the user operation; if yes, a display window containing multiple deployment environment options is presented; , switch the current environment of the application to the corresponding deployment environment according to the selection operation. Based on the solution provided by the present invention, it is easy to switch between different deployment environments, and it is no longer necessary to provide an application package for each deployment environment. user action.
图2A示出了根据本发明另一个实施例的应用程序部署环境的切换方法的流程示意图。如图2A所示,该方法包括以下步骤:FIG. 2A shows a schematic flowchart of a method for switching an application deployment environment according to another embodiment of the present invention. As shown in Figure 2A, the method includes the following steps:
步骤S200,检测应用程序所在终端的联网地址信息。Step S200, detecting the network address information of the terminal where the application program is located.
本方法由安装在终端上的应用程序执行,安装有应用程序的终端联网后,可以使用相应的应用程序,因此,可以通过检测应用程序所在终端的联网地址信息,确定是否继续应用程序部署环境的切换,其中,每个终端都对应一联网地址信息,联网地址信息为终端所接入网络的地址信息,例如可以是IP地址。This method is executed by the application program installed on the terminal. After the terminal installed with the application program is connected to the Internet, the corresponding application program can be used. Therefore, whether to continue the application deployment environment can be determined by detecting the network address information of the terminal where the application program is located. Handover, wherein each terminal corresponds to a piece of networking address information, and the networking address information is the address information of the network accessed by the terminal, such as an IP address.
步骤S201,判断联网地址信息是否在预设白名单中,若是,则执行步骤S202。In step S201, it is determined whether the network address information is in the preset white list, and if so, step S202 is executed.
预设白名单记录了一些联网地址信息,表明当应用程序所在终端的联网地址信息为预设白名单中记录的联网地址信息时,会执行监测用户操作的步骤。The preset whitelist records some networking address information, indicating that when the networking address information of the terminal where the application is located is the networking address information recorded in the preset whitelist, the step of monitoring user operations will be performed.
在本发明可选实施方式中,预设白名单中记录的可以是IP地址段,从而减少存储量。若应用程序所在终端的IP地址属于任一IP地址段,则可以确定IP地址在预设白名单中。In an optional embodiment of the present invention, the IP address segment may be recorded in the preset whitelist, thereby reducing the storage amount. If the IP address of the terminal where the application program is located belongs to any IP address segment, it can be determined that the IP address is in the preset whitelist.
通常情况下,工作中的开发人员、测试人员等有应用程序部署环境的切换需求,因此,应用程序部署环境之间的切换应该是在办公网络环境下执行的,预设白名单中记录的是一些公司、企业的联网地址信息,在检测到应用程序所在终端的联网地址信息,判断联网地址信息是否在预设白名单中,若联网地址信息在预设白名单中,可以执行监测用户操作的步骤,若联网地址信息不再预设白名单中,则结束方法。Usually, developers and testers at work have switching requirements for application deployment environments. Therefore, switching between application deployment environments should be performed in the office network environment. The default whitelist records are The network address information of some companies and enterprises, after detecting the network address information of the terminal where the application program is located, determines whether the network address information is in the preset whitelist. Step, if the network address information is no longer in the preset white list, the method ends.
步骤S202,监测在应用程序页面的预设位置触发的第一用户操作。Step S202, monitoring the first user operation triggered at the preset position of the application page.
在判断出联网地址信息在预设白名单中之后,需要监测用户对应用程序页面的预设位置的第一用户操作,其中,第一用户操作可以是点击操作或滑动操作等,这里不做具体限定,而预设位置也可以根据实际需要进行设置,图2B中的①-⑦为应用程序页面的7个预设位置,可以监测用户对7个位置中任意一个位置触发的第一用户操作。本实施例中的预设位置为应用程序页面中比较隐秘的位置,从而有效地减少了使用者误操作的情况。After judging that the network address information is in the preset whitelist, it is necessary to monitor the user's first user operation on the preset position of the application page, wherein the first user operation may be a click operation or a sliding operation, etc., which will not be detailed here. The preset positions can also be set according to actual needs. ①-⑦ in FIG. 2B are the seven preset positions of the application page, and the first user operation triggered by the user on any one of the seven positions can be monitored. The preset position in this embodiment is a relatively secret position in the application page, thereby effectively reducing the misoperation of the user.
为了避免因用户的误操作而执行部署环境切换,本实施例对第一用户操作的操作次数、第一用户操作的操作时长进行了限定,规定,第一用户操作的操作次数大于或等于预设次数阈值,和/或,第一用户操作的操作时长小于或等于预设时长阈值。其中,本领域技术人员可以根据实际需要灵活设置预设次数阈值及预设时长阈值,例如,将预设次数阈值设置为10次,将预设时长阈值为5秒,当第一用户操作的操作次数小于10次,或者第一用户操作的操作时长大于5秒时,确定第一用户操作不满足部署环境切换条件,从而能够精准地控制部署环境之间的切换,避免给用户造成困扰。In order to avoid the deployment environment switching due to user's misoperation, this embodiment limits the number of operations performed by the first user and the operation duration of the first user operation. It is stipulated that the number of operations performed by the first user is greater than or equal to the preset number of operations. The number of times threshold, and/or the operation duration of the first user operation is less than or equal to the preset duration threshold. Among them, those skilled in the art can flexibly set the preset number of times threshold and the preset duration threshold according to actual needs. For example, the preset number of times threshold is set to 10 times, and the preset duration threshold is set to 5 seconds. When the first user operates the operation When the number of times is less than 10 times, or the operation duration of the first user operation is greater than 5 seconds, it is determined that the first user operation does not meet the deployment environment switching conditions, so that the switching between deployment environments can be accurately controlled to avoid causing confusion to the user.
步骤S203,若监测到第一用户操作且确定指定路径下存在预设隐藏文件,则确定满足应用程序的部署环境切换条件。Step S203, if the first user operation is monitored and it is determined that a preset hidden file exists in the specified path, it is determined that the deployment environment switching condition of the application is satisfied.
为了避免对应用程序页面的预设位置触发的第一用户操作的具体操作情况被其他用户获知,其他用户通过部署环境之间的切换而恶意地对应用程序进行修改,本实施例规定两个条件,两个条件同时满足时,可以确定满足应用程序的部署环境切换条件,只满足其中一个条件时,例如,仅监测到第一用户操作,或者仅确定指定路径下存在预设隐藏文件时,并不满足应用程序的部署环境切换条件。隐藏文件是不可见的,文件的状态信息为隐藏状态,而且可以根据实际需要在指定路径下添加预设隐藏文件。In order to avoid the specific operation situation of the first user operation triggered by the preset position of the application page from being known by other users, and other users maliciously modify the application program by switching between deployment environments, this embodiment stipulates two conditions , when both conditions are met at the same time, it can be determined that the deployment environment switching conditions of the application are met, and when only one of the conditions is met, for example, only the first user operation is monitored, or only when it is determined that there is a preset hidden file in the specified path, and The deployment environment switching conditions for the application are not met. Hidden files are invisible, the state information of the files is hidden, and preset hidden files can be added in the specified path according to actual needs.
步骤S204,呈现包含多个部署环境选项的显示窗口。Step S204, presenting a display window including multiple deployment environment options.
在确定满足应用程序的部署环境切换条件的情况下,向用户呈现包含多个部署环境选项的显示窗口,其中,多个部署环境选项包括:测试环境选项、开发环境选项、发布环境选项和/或个人环境选项,如图2C所示。在将包含多个部署环境选项的显示窗口呈现给用户后,用户可以根据实际需要从显示窗口显示的多个部署环境选项中选择一个部署环境选项。If it is determined that the deployment environment switching condition of the application is satisfied, a display window containing a plurality of deployment environment options is presented to the user, wherein the plurality of deployment environment options include: a test environment option, a development environment option, a release environment option, and/or Personal environment options, as shown in Figure 2C. After the display window containing multiple deployment environment options is presented to the user, the user can select one deployment environment option from the multiple deployment environment options displayed in the display window according to actual needs.
该显示窗口除了可以显示多个部署环境选项外,还可以显示“确定”选项和“取消”选项,提升部署环境之间切换的准确性,以及方便用户退出部署环境选择。In addition to displaying multiple deployment environment options, the display window can also display an "OK" option and a "Cancel" option, which improves the accuracy of switching between deployment environments and facilitates the user to exit the deployment environment selection.
步骤S205,监测用户对任一部署环境选项的选择操作,根据选择操作将应用程序的当前环境切换至对应的部署环境。Step S205, monitoring the user's selection operation on any deployment environment option, and switching the current environment of the application to the corresponding deployment environment according to the selection operation.
部署环境选项与部署环境相对应,例如,开发环境选项与开发环境相对应,测试环境选项与测试环境相对应,发布环境选项与发布环境相对应,个人环境选项与个人环境相对应。Deployment environment options correspond to deployment environments, for example, development environment options correspond to development environments, test environment options correspond to test environments, release environment options correspond to release environments, and personal environment options correspond to personal environments.
用户想将应用程序的当前环境切换至其它的部署环境,可以通过选择相应的部署环境选项来进行切换,因此,需要实时监测用户对显示窗口中的部署环境选项的选择操作,例如,用户对显示窗口中的任一部署环境选项的点击操作,可以视为用户选择了相应的部署环境选项,根据该选择操作,将应用程序的当前环境切换至对应的部署环境。If the user wants to switch the current environment of the application to another deployment environment, he can switch by selecting the corresponding deployment environment option. Therefore, it is necessary to monitor the user's selection operation of the deployment environment option in the display window in real time. The click operation of any deployment environment option in the window may be regarded as the user selecting the corresponding deployment environment option, and according to the selection operation, the current environment of the application is switched to the corresponding deployment environment.
在该显示窗口中,还可以显示“确定”选项和“取消”选项,用户在选择了任一部署环境选项后,需要点击“确定”选项,在监测到用户对“确定”选项的触发操作后,将应用程序的当前环境切换至对应的部署环境,这样可以避免由于用户的误操作,导致地频繁切换。In this display window, the "OK" option and the "Cancel" option can also be displayed. After the user selects any deployment environment option, he needs to click the "OK" option. After monitoring the user's trigger operation on the "OK" option , to switch the current environment of the application to the corresponding deployment environment, so as to avoid frequent switching due to user's misoperation.
在本实施例中,可能出现在向用户呈现了包含多个部署环境选项的显示窗口后,用户又不想将应用程序的当前环境切换到其它部署环境的情况,此时,用户可以通过点击“取消”选项,取消部署环境之间的切换。In this embodiment, it may happen that after a display window containing multiple deployment environment options is presented to the user, the user does not want to switch the current environment of the application to another deployment environment. In this case, the user can click "Cancel" " option to cancel switching between deployment environments.
其中,应用程序的当前环境为应用程序当前所处的环境,可能是开发环境、测试环境、发布环境选项或个人环境中的任意一种环境。Wherein, the current environment of the application is the current environment of the application, which may be any one of a development environment, a testing environment, a release environment option, or a personal environment.
举例说明,应用程序的当前环境为发布环境,应用程序发布后,使用者在使用过程中并不能完全避免不产生任何问题,在产生问题后,需要解决相应的问题,此时,可能需要将应用程序的当前环境切换至测试环境进行测试,具体地,若监测到第一用户操作且确定指定路径下存在预设隐藏文件,则确定满足应用程序的部署环境切换条件,向用户(开发人员或测试人员等)呈现显示窗口,显示窗口包含:测试环境选项、开发环境选项、发布环境选项和个人环境选项,监测到用户对测试环境选项的选择操作,则根据该选择操作将应用程序的当前环境(发布环境)切换至测试环境,其中,测试环境、开发环境、发布环境对应着相应的服务器,每个服务器都对应有相应的服务器地址,切换部署环境即更改相应的访问接口。For example, the current environment of the application is the release environment. After the application is released, the user cannot completely avoid any problems during use. After the problem occurs, the corresponding problem needs to be solved. The current environment of the program is switched to the test environment for testing. Specifically, if the first user operation is monitored and it is determined that a preset hidden file exists under the specified path, it is determined that the deployment environment switching conditions of the application are satisfied, and the user (developer or tester) personnel, etc.) to present a display window, which includes: test environment options, development environment options, release environment options, and personal environment options. If the user's selection operation on the test environment option is detected, the current environment ( The release environment) is switched to the test environment, wherein the test environment, the development environment, and the release environment correspond to corresponding servers, and each server corresponds to a corresponding server address. Switching the deployment environment means changing the corresponding access interface.
再例如,应用程序的当前环境为开发环境,满足应用程序部署环境切换条件后,向用户呈现显示窗口,显示窗口包含:测试环境选项、开发环境选项、发布环境选项和个人环境选项,监测到用户对测试环境选项的选择操作,则根据该选择操作将应用程序的当前环境(开发环境)切换至测试环境。For another example, the current environment of the application is the development environment. After the application deployment environment switching conditions are met, a display window is presented to the user. The display window includes: testing environment options, development environment options, publishing environment options, and personal environment options. For the selection operation of the test environment option, the current environment (development environment) of the application is switched to the test environment according to the selection operation.
利用本实施例提供的应用程序部署环境的切换方法,通过提供一个应用程序包就可以实现多个部署环境之间的切换,减少了需要提供的应用程序包的数量,而且,克服了现有技术中,在应用程序发布后就无法切换到测试环境等问题。另外,也能够避免用户频繁地将所开发的应用程序包或者测试的应用程序包上传至开发环境或测试环境,以及,每次都需要从开发环境或测试环境获取本次所需的应用程序包。By using the method for switching application deployment environments provided by this embodiment, switching between multiple deployment environments can be realized by providing one application package, which reduces the number of application packages that need to be provided, and overcomes the problems of the prior art. , it is impossible to switch to the test environment after the application is released. In addition, it can also avoid that the user frequently uploads the developed application package or the tested application package to the development environment or the test environment, and each time the required application package needs to be obtained from the development environment or the test environment. .
在本发明一种可选实施方式中,根据选择操作将应用程序的当前环境切换至对应的部署环境进一步包括:In an optional embodiment of the present invention, switching the current environment of the application to the corresponding deployment environment according to the selection operation further includes:
根据用户对个人环境选项的选择操作,呈现包含IP地址输入框的显示窗口;根据用户在IP地址输入框中输入的IP地址,将应用程序的当前环境切换至个人环境。According to the user's selection operation on the personal environment option, a display window including an IP address input box is presented; according to the IP address entered by the user in the IP address input box, the current environment of the application is switched to the personal environment.
用户选择个人环境选项,可以确定是想将应用程序的当前环境切换到个人环境,其中,个人环境是由用户的个人终端所搭建的,允许只针对个人终端进行开发或测试,无需再将个人负责部分多次上传至开发环境或测试环境,方便个人操作,因此,在监测到用户对个人环境选项的选择操作后,根据用户对个人环境选项的选择操作,向用户呈现包含IP地址输入框的显示窗口,在呈现该显示窗口后,用户在IP地址输入框中输入相应的IP地址,根据用户在IP地址输入框中输入的IP地址,将应用程序的当前环境切换至个人环境。When the user selects the personal environment option, it can be determined that they want to switch the current environment of the application to the personal environment, where the personal environment is built by the user's personal terminal, and it is allowed to develop or test only for the personal terminal, without the need for personal responsibility. Parts are uploaded to the development environment or test environment for many times, which is convenient for personal operation. Therefore, after monitoring the user's selection operation on the personal environment option, according to the user's selection operation on the personal environment option, a display including an IP address input box is presented to the user. After the display window is presented, the user enters the corresponding IP address in the IP address input box, and switches the current environment of the application to the personal environment according to the IP address entered by the user in the IP address input box.
根据本发明上述实施例提供的方法,在判断出应用程序所在终端的联网地址信息在预设白名单中的情况下,监测用户操作,可以提升应用程序部署环境切换的安全性,通过设置两个部署环境切换条件,进一步提升了应用程序部署环境切换的安全性,避免了因用户误操作而导致频繁切换,或者其他用户的恶意操作的问题,此外,还使用户可以很方便地在不同部署环境之间切换,无需再针对每个部署环境提供一个应用程序包,通过提供一个应用程序包就能方便地实现开发、测试、发布,简化了用户操作。According to the method provided by the above embodiments of the present invention, when it is determined that the network address information of the terminal where the application program is located is in the preset whitelist, monitoring user operations can improve the security of application deployment environment switching. By setting two Deployment environment switching conditions further improve the security of application deployment environment switching, avoid frequent switching due to user misoperation, or malicious operations by other users, and also enable users to easily switch between different deployment environments. It is no longer necessary to provide an application package for each deployment environment. By providing an application package, development, testing, and release can be easily implemented, which simplifies user operations.
图3示出了根据本发明又一个实施例的应用程序部署环境的切换方法的流程示意图。如图3所示,该方法包括以下步骤:FIG. 3 shows a schematic flowchart of a method for switching an application deployment environment according to another embodiment of the present invention. As shown in Figure 3, the method includes the following steps:
步骤S300,检测应用程序所在终端的联网地址信息。Step S300, detecting the network address information of the terminal where the application program is located.
步骤S301,判断联网地址信息是否在预设白名单中,若是,则执行步骤S302。In step S301, it is determined whether the network address information is in the preset white list, and if so, step S302 is executed.
图3所示实施例中的步骤S300-步骤S301与图2所示实施例中的步骤S200-步骤S201类似,这里不再赘述。Steps S300 to S301 in the embodiment shown in FIG. 3 are similar to steps S200 to S201 in the embodiment shown in FIG. 2 , and details are not repeated here.
步骤S302,监听因第二用户操作所触发的广播消息。Step S302 , monitor the broadcast message triggered by the operation of the second user.
其中,第二用户操作为信息输入操作,且输入的信息符合预设格式。The second user operation is an information input operation, and the input information conforms to a preset format.
例如,用户在拨号页面利用拨号键盘输入预设格式的信息,并将所输入的信息进行广播,应用程序可以监听到该广播消息,对于多个应用程序,可以设置输入不同的信息,在本实施例中,本领域技术人员可以根据实际需要灵活设置格式,例如,预设格式为*#*#XXXXXX#*#*。For example, the user uses the dialing keyboard to input information in a preset format on the dialing page, and broadcasts the input information, and the application program can monitor the broadcast message. For multiple application programs, different information can be set to input. In this implementation In an example, those skilled in the art can flexibly set the format according to actual needs, for example, the preset format is *#*#XXXXXX#*#*.
步骤S303,若监听到广播消息且确定指定路径下存在预设隐藏文件,则确定满足应用程序的部署环境切换条件。Step S303, if the broadcast message is monitored and it is determined that a preset hidden file exists in the specified path, it is determined that the deployment environment switching condition of the application is satisfied.
为了避免第二用户操作所触发的广播消息被其他用户获知,其他用户通过部署环境之间的切换而恶意地对应用程序进行修改,本实施例规定两个条件,两个条件同时满足时,可以确定满足应用程序的部署环境切换条件,只满足其中一个条件时,例如,仅监测到广播消息,或者仅确定指定路径下存在预设隐藏文件时,并不满足应用程序的部署环境切换条件。隐藏文件是不可见的,文件的状态信息为隐藏状态,而且可以根据实际需要在指定路径下添加预设隐藏文件。In order to prevent the broadcast message triggered by the operation of the second user from being known to other users, and other users maliciously modify the application program by switching between deployment environments, this embodiment specifies two conditions. It is determined that the deployment environment switching conditions of the application are satisfied. When only one of the conditions is satisfied, for example, only a broadcast message is detected, or it is only determined that a preset hidden file exists in the specified path, the deployment environment switching conditions of the application are not satisfied. Hidden files are invisible, the state information of the files is hidden, and preset hidden files can be added in the specified path according to actual needs.
步骤S304,呈现包含多个部署环境选项的显示窗口。Step S304, presenting a display window including multiple deployment environment options.
步骤S305,监测用户对任一部署环境选项的选择操作,根据选择操作将应用程序的当前环境切换至对应的部署环境。Step S305, monitoring the user's selection operation of any deployment environment option, and switching the current environment of the application to the corresponding deployment environment according to the selection operation.
图3所示实施例中的步骤S304-步骤S305与图2所示实施例中的步骤S204-步骤S205类似,这里不再赘述。Steps S304 to S305 in the embodiment shown in FIG. 3 are similar to steps S204 to S205 in the embodiment shown in FIG. 2 , and details are not repeated here.
根据本发明上述实施例提供的方法,在判断出应用程序所在终端的联网地址信息在预设白名单中的情况下,监测用户操作,可以提升应用程序部署环境切换的安全性,通过设置两个部署环境切换条件,进一步提升了应用程序部署环境切换的安全性,避免了因用户误操作而导致频繁切换,或者其他用户的恶意操作的问题,此外,还使用户可以很方便地在不同部署环境之间切换,无需再针对每个部署环境提供一个应用程序包,通过提供一个应用程序包就能方便地实现开发、测试、发布,简化了用户操作。According to the method provided by the above embodiments of the present invention, when it is determined that the network address information of the terminal where the application program is located is in the preset whitelist, monitoring user operations can improve the security of application deployment environment switching. By setting two Deployment environment switching conditions further improve the security of application deployment environment switching, avoid frequent switching due to user misoperation, or malicious operations by other users, and also enable users to easily switch between different deployment environments. It is no longer necessary to provide an application package for each deployment environment. By providing an application package, development, testing, and release can be easily implemented, which simplifies user operations.
图4示出了根据本发明一个实施例的应用程序部署环境的切换装置的结构示意图。如图4所示,该装置包括:第一监测模块400、第一判断模块410、呈现模块420、第二监测模块430、切换模块440。FIG. 4 shows a schematic structural diagram of a switching apparatus of an application deployment environment according to an embodiment of the present invention. As shown in FIG. 4 , the apparatus includes: a
第一监测模块400,适于监测用户操作。The
第一判断模块410,适于根据用户操作判断是否满足应用程序的部署环境切换条件。The
呈现模块420,适于若判断出满足应用程序的部署环境切换条件,则呈现包含多个部署环境选项的显示窗口。The
第二监测模块430,适于监测用户对任一部署环境选项的选择操作。The
切换模块440,适于根据选择操作将应用程序的当前环境切换至对应的部署环境。The
可选地,第一监测模块400进一步适于:监测在应用程序页面的预设位置触发的第一用户操作;Optionally, the
第一判断模块410进一步适于:若监测到第一用户操作且确定指定路径下存在预设隐藏文件,则确定满足应用程序的部署环境切换条件。The
可选地,第一用户操作的操作次数大于或等于预设次数阈值,和/或,第一用户操作的操作时长小于或等于预设时长阈值。Optionally, the operation times of the first user operation is greater than or equal to a preset times threshold, and/or the operation duration of the first user operation is less than or equal to a preset duration threshold.
可选地,第一监测模块400进一步适于:监听因第二用户操作所触发的广播消息;Optionally, the
第一判断模块410进一步适于:若监听到广播消息且确定指定路径下存在预设隐藏文件,则确定满足应用程序的部署环境切换条件。The
可选地,第二用户操作为信息输入操作,且输入的信息符合预设格式。Optionally, the second user operation is an information input operation, and the input information conforms to a preset format.
可选地,多个部署环境包括:测试环境选项、开发环境选项、发布环境选项和/或个人环境选项。Optionally, the plurality of deployment environments include: a test environment option, a development environment option, a release environment option, and/or a personal environment option.
可选地,切换模块440进一步适于:根据用户对个人环境选项的选择操作,呈现包含IP地址输入框的显示窗口;Optionally, the
根据用户在IP地址输入框中输入的IP地址,将应用程序的当前环境切换至个人环境。Switches the current environment of the application to the personal environment according to the IP address entered by the user in the IP address input box.
可选地,装置还包括:检测模块450,适于检测应用程序所在终端的联网地址信息;Optionally, the apparatus further includes: a
第二判断模块460,适于判断联网地址信息是否在预设白名单中;The
第一监测模块400进一步适于:若联网地址信息在预设白名单中,则监测用户操作。The
根据本发明上述实施例提供的装置,监测用户操作,根据用户操作判断是否满足应用程序的部署环境切换条件;若是,则呈现包含多个部署环境选项的显示窗口;监测用户对任一部署环境选项的选择操作,根据选择操作将应用程序的当前环境切换至对应的部署环境。基于本发明提供的方案,可以很方便地在不同部署环境之间切换,无需再针对每个部署环境提供一个应用程序包,通过提供一个应用程序包就能方便地实现开发、测试、发布,简化了用户操作。According to the device provided by the above-mentioned embodiment of the present invention, the user operation is monitored, and whether the deployment environment switching condition of the application is satisfied is judged according to the user operation; if so, a display window containing multiple deployment environment options is presented; , switch the current environment of the application to the corresponding deployment environment according to the selection operation. Based on the solution provided by the present invention, it is easy to switch between different deployment environments, and it is no longer necessary to provide an application package for each deployment environment. user action.
本发明实施例还提供了一种非易失性计算机存储介质,所述计算机存储介质存储有至少一可执行指令,该计算机可执行指令可执行上述任意方法实施例中的应用程序部署环境的切换方法。Embodiments of the present invention further provide a non-volatile computer storage medium, where the computer storage medium stores at least one executable instruction, and the computer-executable instruction can perform switching of the application deployment environment in any of the foregoing method embodiments method.
图5示出了根据本发明一个实施例的计算设备的结构示意图,本发明具体实施例并不对计算设备的具体实现做限定。FIG. 5 shows a schematic structural diagram of a computing device according to an embodiment of the present invention, and the specific embodiment of the present invention does not limit the specific implementation of the computing device.
如图5所示,该计算设备可以包括:处理器(processor)502、通信接口(Communications Interface)504、存储器(memory)506、以及通信总线508。As shown in FIG. 5 , the computing device may include: a processor (processor) 502 , a communications interface (Communications Interface) 504 , a memory (memory) 506 , and a communication bus 508 .
其中:in:
处理器502、通信接口504、以及存储器506通过通信总线508完成相互间的通信。The processor 502 , the
通信接口504,用于与其它设备比如客户端或其它服务器等的网元通信。The
处理器502,用于执行程序510,具体可以执行上述应用程序部署环境的切换方法实施例中的相关步骤。The processor 502 is configured to execute the
具体地,程序510可以包括程序代码,该程序代码包括计算机操作指令。Specifically, the
处理器502可能是中央处理器CPU,或者是特定集成电路ASIC(ApplicationSpecific Integrated Circuit),或者是被配置成实施本发明实施例的一个或多个集成电路。计算设备包括的一个或多个处理器,可以是同一类型的处理器,如一个或多个CPU;也可以是不同类型的处理器,如一个或多个CPU以及一个或多个ASIC。The processor 502 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention. The one or more processors included in the computing device may be the same type of processors, such as one or more CPUs; or may be different types of processors, such as one or more CPUs and one or more ASICs.
存储器506,用于存放程序510。存储器506可能包含高速RAM存储器,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。The memory 506 is used to store the
程序510具体可以用于使得处理器502执行上述任意方法实施例中的应用程序部署环境的切换方法。程序510中各步骤的具体实现可以参见上述应用程序部署环境的切换实施例中的相应步骤和单元中对应的描述,在此不赘述。所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的设备和模块的具体工作过程,可以参考前述方法实施例中的对应过程描述,在此不再赘述。The
在此提供的算法和显示不与任何特定计算机、虚拟系统或者其它设备固有相关。各种通用系统也可以与基于在此的示教一起使用。根据上面的描述,构造这类系统所要求的结构是显而易见的。此外,本发明也不针对任何特定编程语言。应当明白,可以利用各种编程语言实现在此描述的本发明的内容,并且上面对特定语言所做的描述是为了披露本发明的最佳实施方式。The algorithms and displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used with teaching based on this. The structure required to construct such a system is apparent from the above description. Furthermore, the present invention is not directed to any particular programming language. It is to be understood that various programming languages may be used to implement the inventions described herein, and that the descriptions of specific languages above are intended to disclose the best mode for carrying out the invention.
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。In the description provided herein, numerous specific details are set forth. It will be understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
类似地,应当理解,为了精简本公开并帮助理解各个发明方面中的一个或多个,在上面对本发明的示例性实施例的描述中,本发明的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如下面的权利要求书所反映的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。Similarly, it is to be understood that in the above description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together into a single embodiment, figure, or its description. This disclosure, however, should not be construed as reflecting an intention that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the Detailed Description are hereby expressly incorporated into this Detailed Description, with each claim standing on its own as a separate embodiment of this invention.
本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。Those skilled in the art will understand that the modules in the device in the embodiment can be adaptively changed and arranged in one or more devices different from the embodiment. The modules or units or components in the embodiments may be combined into one module or unit or component, and further they may be divided into multiple sub-modules or sub-units or sub-assemblies. All features disclosed in this specification (including accompanying claims, abstract and drawings) and any method so disclosed may be employed in any combination, unless at least some of such features and/or procedures or elements are mutually exclusive. All processes or units of equipment are combined. Each feature disclosed in this specification (including accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
此外,本领域的技术人员能够理解,尽管在此所述的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本发明的范围之内并且形成不同的实施例。例如,在下面的权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。Furthermore, those skilled in the art will appreciate that although some of the embodiments described herein include certain features, but not others, included in other embodiments, that combinations of features of different embodiments are intended to be within the scope of the invention within and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的应用程序部署环境的切换设备中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。Various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art should understand that, in practice, a microprocessor or a digital signal processor (DSP) may be used to implement some or all functions of some or all components in the switching device of the application deployment environment according to the embodiment of the present invention . The present invention can also be implemented as apparatus or apparatus programs (eg, computer programs and computer program products) for performing part or all of the methods described herein. Such a program implementing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such signals may be downloaded from Internet sites, or provided on carrier signals, or in any other form.
应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。It should be noted that the above-described embodiments illustrate rather than limit the invention, and that alternative embodiments may be devised by those skilled in the art without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the words first, second, and third, etc. do not denote any order. These words can be interpreted as names.
本发明公开了:The present invention discloses:
A1.一种应用程序部署环境的切换方法,包括:A1. A method for switching application deployment environments, comprising:
监测用户操作,根据用户操作判断是否满足应用程序的部署环境切换条件;Monitor user operations, and judge whether the application deployment environment switching conditions are met according to user operations;
若是,则呈现包含多个部署环境选项的显示窗口;If so, present a display window containing multiple deployment environment options;
监测用户对任一部署环境选项的选择操作,根据所述选择操作将应用程序的当前环境切换至对应的部署环境。The user's selection operation of any deployment environment option is monitored, and the current environment of the application is switched to the corresponding deployment environment according to the selection operation.
A2.根据A1所述的方法,其中,所述监测用户操作进一步包括:监测在应用程序页面的预设位置触发的第一用户操作;A2. The method according to A1, wherein the monitoring a user operation further comprises: monitoring a first user operation triggered at a preset position of the application page;
所述根据用户操作判断是否满足应用程序的部署环境切换条件进一步包括:若监测到所述第一用户操作且确定指定路径下存在预设隐藏文件,则确定满足应用程序的部署环境切换条件。The judging whether the application deployment environment switching condition is satisfied according to the user operation further includes: if the first user operation is monitored and it is determined that a preset hidden file exists in the specified path, determining that the application deployment environment switching condition is satisfied.
A3.根据A2所述的方法,其中,所述第一用户操作的操作次数大于或等于预设次数阈值,和/或,所述第一用户操作的操作时长小于或等于预设时长阈值。A3. The method according to A2, wherein the number of operations of the first user operation is greater than or equal to a preset number of times threshold, and/or the operation duration of the first user operation is less than or equal to a preset duration threshold.
A4.根据A1所述的方法,其中,所述监测用户操作进一步包括:监听因第二用户操作所触发的广播消息;A4. The method according to A1, wherein the monitoring user operation further comprises: monitoring broadcast messages triggered by the second user operation;
所述根据用户操作判断是否满足应用程序的部署环境切换条件进一步包括:若监听到所述广播消息且确定指定路径下存在预设隐藏文件,则确定满足应用程序的部署环境切换条件。The judging whether the deployment environment switching condition of the application is satisfied according to the user operation further includes: if the broadcast message is monitored and it is determined that a preset hidden file exists in the specified path, determining that the deployment environment switching condition of the application is satisfied.
A5.根据A4所述的方法,其中,所述第二用户操作为信息输入操作,且输入的信息符合预设格式。A5. The method according to A4, wherein the second user operation is an information input operation, and the input information conforms to a preset format.
A6.根据A1-A4中任一项所述的方法,其中,所述多个部署环境包括:测试环境选项、开发环境选项、发布环境选项和/或个人环境选项。A6. The method according to any one of A1-A4, wherein the plurality of deployment environments include: a test environment option, a development environment option, a release environment option, and/or a personal environment option.
A7.根据A6所述的方法,其中,所述根据所述选择操作将应用程序的当前环境切换至对应的部署环境进一步包括:A7. The method according to A6, wherein the switching the current environment of the application to the corresponding deployment environment according to the selection operation further comprises:
根据用户对个人环境选项的选择操作,呈现包含IP地址输入框的显示窗口;According to the user's selection operation on the personal environment option, a display window including an IP address input box is presented;
根据用户在所述IP地址输入框中输入的IP地址,将应用程序的当前环境切换至个人环境。According to the IP address entered by the user in the IP address input box, the current environment of the application is switched to the personal environment.
A8.根据A1-A7中任一项所述的方法,其中,在监测用户操作之前,所述方法还包括:A8. The method according to any one of A1-A7, wherein, before monitoring the user operation, the method further comprises:
检测所述应用程序所在终端的联网地址信息;Detect the network address information of the terminal where the application program is located;
判断所述联网地址信息是否在预设白名单中;Determine whether the network address information is in the preset whitelist;
若是,则执行监测用户操作的步骤。If so, the step of monitoring user operation is performed.
B9.一种应用程序部署环境的切换装置,包括:B9. A switching device for an application deployment environment, comprising:
第一监测模块,适于监测用户操作;a first monitoring module, adapted to monitor user operations;
第一判断模块,适于根据用户操作判断是否满足应用程序的部署环境切换条件;a first judging module, adapted to judge whether the deployment environment switching conditions of the application are satisfied according to the user operation;
呈现模块,适于若判断出满足应用程序的部署环境切换条件,则呈现包含多个部署环境选项的显示窗口;a presentation module, adapted to present a display window including a plurality of deployment environment options if it is determined that the deployment environment switching condition of the application is satisfied;
第二监测模块,适于监测用户对任一部署环境选项的选择操作;The second monitoring module is suitable for monitoring the user's selection operation of any deployment environment option;
切换模块,适于根据所述选择操作将应用程序的当前环境切换至对应的部署环境。The switching module is adapted to switch the current environment of the application to the corresponding deployment environment according to the selection operation.
B10.根据B9所述的装置,其中,所述第一监测模块进一步适于:监测在应用程序页面的预设位置触发的第一用户操作;B10. The apparatus according to B9, wherein the first monitoring module is further adapted to: monitor a first user operation triggered at a preset position of an application page;
所述第一判断模块进一步适于:若监测到所述第一用户操作且确定指定路径下存在预设隐藏文件,则确定满足应用程序的部署环境切换条件。The first judging module is further adapted to: if the first user operation is monitored and it is determined that a preset hidden file exists in the specified path, then it is determined that the deployment environment switching condition of the application is satisfied.
B11.根据B10所述的装置,其中,所述第一用户操作的操作次数大于或等于预设次数阈值,和/或,所述第一用户操作的操作时长小于或等于预设时长阈值。B11. The apparatus according to B10, wherein the operation times of the first user operation is greater than or equal to a preset times threshold, and/or the operation duration of the first user operation is less than or equal to a preset duration threshold.
B12.根据B9所述的装置,其中,所述第一监测模块进一步适于:监听因第二用户操作所触发的广播消息;B12. The device according to B9, wherein the first monitoring module is further adapted to: monitor broadcast messages triggered by a second user operation;
所述第一判断模块进一步适于:若监听到所述广播消息且确定指定路径下存在预设隐藏文件,则确定满足应用程序的部署环境切换条件。The first judging module is further adapted to: if the broadcast message is monitored and it is determined that a preset hidden file exists in the specified path, it is determined that the deployment environment switching condition of the application is satisfied.
B13.根据B12所述的装置,其中,所述第二用户操作为信息输入操作,且输入的信息符合预设格式。B13. The device according to B12, wherein the second user operation is an information input operation, and the input information conforms to a preset format.
B14.根据B9-B13中任一项所述的装置,其中,所述多个部署环境包括:测试环境选项、开发环境选项、发布环境选项和/或个人环境选项。B14. The apparatus of any one of B9-B13, wherein the plurality of deployment environments include: a test environment option, a development environment option, a release environment option, and/or a personal environment option.
B15.根据B14所述的装置,其中,所述切换模块进一步适于:B15. The apparatus of B14, wherein the switching module is further adapted to:
根据用户对个人环境选项的选择操作,呈现包含IP地址输入框的显示窗口;According to the user's selection operation on the personal environment option, a display window including an IP address input box is presented;
根据用户在所述IP地址输入框中输入的IP地址,将应用程序的当前环境切换至个人环境。According to the IP address entered by the user in the IP address input box, the current environment of the application is switched to the personal environment.
B16.根据B9-B15中任一项所述的装置,其中,所述装置还包括:B16. The device according to any one of B9-B15, wherein the device further comprises:
检测模块,适于检测所述应用程序所在终端的联网地址信息;a detection module, adapted to detect the network address information of the terminal where the application program is located;
第二判断模块,适于判断所述联网地址信息是否在预设白名单中;a second judging module, adapted to judge whether the network address information is in the preset whitelist;
所述第一监测模块进一步适于:若所述联网地址信息在预设白名单中,则监测用户操作。The first monitoring module is further adapted to monitor user operations if the networking address information is in a preset whitelist.
C17.一种计算设备,包括:处理器、存储器、通信接口和通信总线,所述处理器、所述存储器和所述通信接口通过所述通信总线完成相互间的通信;C17. A computing device, comprising: a processor, a memory, a communication interface, and a communication bus, and the processor, the memory, and the communication interface communicate with each other through the communication bus;
所述存储器用于存放至少一可执行指令,所述可执行指令使所述处理器执行如A1-A8中任一项所述的应用程序部署环境的切换方法对应的操作。The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform an operation corresponding to the method for switching an application deployment environment according to any one of A1-A8.
D18.一种计算机存储介质,所述存储介质中存储有至少一可执行指令,所述可执行指令使处理器执行如A1-A8中任一项所述的应用程序部署环境的切换方法对应的操作。D18. A computer storage medium, where at least one executable instruction is stored in the storage medium, and the executable instruction enables a processor to execute a method corresponding to the switching method for an application deployment environment according to any one of A1-A8 operate.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201811644739.0A CN111381836B (en) | 2018-12-29 | 2018-12-29 | Application deployment environment switching method and device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201811644739.0A CN111381836B (en) | 2018-12-29 | 2018-12-29 | Application deployment environment switching method and device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN111381836A true CN111381836A (en) | 2020-07-07 |
| CN111381836B CN111381836B (en) | 2024-02-06 |
Family
ID=71216632
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201811644739.0A Active CN111381836B (en) | 2018-12-29 | 2018-12-29 | Application deployment environment switching method and device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN111381836B (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112948239A (en) * | 2021-02-04 | 2021-06-11 | 深圳市镜玩科技有限公司 | Application program testing method and system, terminal device and computer storage medium |
Citations (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20070101435A1 (en) * | 2005-10-14 | 2007-05-03 | Check Point Software Technologies, Inc. | System and Methodology Providing Secure Workspace Environment |
| JP2007148906A (en) * | 2005-11-29 | 2007-06-14 | Fujitsu Ltd | Operating environment switching program and information processing apparatus |
| US20080018927A1 (en) * | 2006-07-21 | 2008-01-24 | Research In Motion Limited | Method and system for providing a honeypot mode for an electronic device |
| CN103347132A (en) * | 2013-07-11 | 2013-10-09 | 北京奇虎科技有限公司 | Method and device for switching modes of mobile terminal |
| JP2015114844A (en) * | 2013-12-11 | 2015-06-22 | 日本電信電話株式会社 | Application execution environment switching method, apparatus and program |
| CN106681714A (en) * | 2016-12-07 | 2017-05-17 | 乐视控股(北京)有限公司 | Method and device for setting program environments and electronic equipment |
| CN106897085A (en) * | 2015-12-21 | 2017-06-27 | 因文西斯系统公司 | Monitor application state for deployment during runtime actions |
| CN107992360A (en) * | 2017-11-30 | 2018-05-04 | 努比亚技术有限公司 | Using switching handling method, mobile terminal and readable storage medium storing program for executing |
| CN108664270A (en) * | 2018-05-09 | 2018-10-16 | 平安普惠企业管理有限公司 | Environment dynamic switching method, device, computer equipment and storage medium |
-
2018
- 2018-12-29 CN CN201811644739.0A patent/CN111381836B/en active Active
Patent Citations (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20070101435A1 (en) * | 2005-10-14 | 2007-05-03 | Check Point Software Technologies, Inc. | System and Methodology Providing Secure Workspace Environment |
| JP2007148906A (en) * | 2005-11-29 | 2007-06-14 | Fujitsu Ltd | Operating environment switching program and information processing apparatus |
| US20080018927A1 (en) * | 2006-07-21 | 2008-01-24 | Research In Motion Limited | Method and system for providing a honeypot mode for an electronic device |
| CN103347132A (en) * | 2013-07-11 | 2013-10-09 | 北京奇虎科技有限公司 | Method and device for switching modes of mobile terminal |
| JP2015114844A (en) * | 2013-12-11 | 2015-06-22 | 日本電信電話株式会社 | Application execution environment switching method, apparatus and program |
| CN106897085A (en) * | 2015-12-21 | 2017-06-27 | 因文西斯系统公司 | Monitor application state for deployment during runtime actions |
| CN106681714A (en) * | 2016-12-07 | 2017-05-17 | 乐视控股(北京)有限公司 | Method and device for setting program environments and electronic equipment |
| CN107992360A (en) * | 2017-11-30 | 2018-05-04 | 努比亚技术有限公司 | Using switching handling method, mobile terminal and readable storage medium storing program for executing |
| CN108664270A (en) * | 2018-05-09 | 2018-10-16 | 平安普惠企业管理有限公司 | Environment dynamic switching method, device, computer equipment and storage medium |
Non-Patent Citations (3)
| Title |
|---|
| TIMOTHY GIRRY KALE 等: "Evaluating tor modified switching algorithm in the emulation environment", 《2016 22ND ASIA-PACIFIC CONFERENCE ON COMMUNICATIONS (APCC)》, pages 510 - 516 * |
| 杨柏楠: "基于Android操作系统的App环境分离实现技术", 《中国高新区》, pages 189 * |
| 路遥 等: "多系统实验环境的构建及其智能切换控制", 《实验技术与管理》, vol. 32, no. 7, pages 241 - 243 * |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112948239A (en) * | 2021-02-04 | 2021-06-11 | 深圳市镜玩科技有限公司 | Application program testing method and system, terminal device and computer storage medium |
| CN112948239B (en) * | 2021-02-04 | 2024-05-14 | 深圳市仁凯网络科技有限公司 | Application program testing method, system, terminal device and computer storage medium |
Also Published As
| Publication number | Publication date |
|---|---|
| CN111381836B (en) | 2024-02-06 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US9003235B2 (en) | Indicating coverage of web application testing | |
| CN111858296B (en) | Interface testing method, device, equipment and storage medium | |
| US9686205B2 (en) | Method for providing a connection of a client to an unmanaged service in a client-server remote access system | |
| US8677321B2 (en) | User-space probe based debugging | |
| US8291388B2 (en) | System, method and program for executing a debugger | |
| CN105678164B (en) | Detect the method and device of Malware | |
| CN105468529A (en) | Accurate traversal method and apparatus for UI controls of android application | |
| CN105159832B (en) | A kind of methods, devices and systems collected in application is tested using exception information | |
| US11138313B2 (en) | Malware detection based on user interactions | |
| CN110879781B (en) | Program debugging method, device, electronic equipment and computer readable storage medium | |
| US7827531B2 (en) | Software testing techniques for stack-based environments | |
| US11055416B2 (en) | Detecting vulnerabilities in applications during execution | |
| US20120284695A1 (en) | Error simulation | |
| CN104487935A (en) | Recording external processes | |
| CN111381836B (en) | Application deployment environment switching method and device | |
| KR101472012B1 (en) | Network simulator based on software | |
| CN117241276B (en) | Detection tool, detection method, detection system and detection equipment for mobile application | |
| CN106708705B (en) | Terminal background process monitoring method and system | |
| US20170187586A1 (en) | Determining the causation of events across multiple nodes using message properties | |
| CN116302758A (en) | Power-down test method, device, communication device and readable storage medium | |
| Schweighofer et al. | Mobile Device and Technology Characteristics' Impact on Mobile Application Testing. | |
| CN114238973A (en) | Privacy access condition detection method and device, computer equipment and medium | |
| CN112468358B (en) | Protocol detection method, system, equipment and computer readable storage medium | |
| CN114721618B (en) | Interactive control display method, device, electronic device and storage medium | |
| US12166837B1 (en) | Application programming interface proxy with behavior simulation |
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 | ||
| TA01 | Transfer of patent application right | ||
| TA01 | Transfer of patent application right |
Effective date of registration: 20240112 Address after: Room 03, 2nd Floor, Building A, No. 20 Haitai Avenue, Huayuan Industrial Zone (Huanwai), Binhai New Area, Tianjin, 300450 Applicant after: 3600 Technology Group Co.,Ltd. Address before: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park) Applicant before: BEIJING QIHOO TECHNOLOGY Co.,Ltd. |
|
| GR01 | Patent grant | ||
| GR01 | Patent grant |