CN109684201A - It is switched fast the method, apparatus, computer equipment and storage medium of running environment - Google Patents

It is switched fast the method, apparatus, computer equipment and storage medium of running environment Download PDF

Info

Publication number
CN109684201A
CN109684201A CN201811419021.1A CN201811419021A CN109684201A CN 109684201 A CN109684201 A CN 109684201A CN 201811419021 A CN201811419021 A CN 201811419021A CN 109684201 A CN109684201 A CN 109684201A
Authority
CN
China
Prior art keywords
environment
running environment
switching command
value
specific plug
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.)
Pending
Application number
CN201811419021.1A
Other languages
Chinese (zh)
Inventor
阳昊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201811419021.1A priority Critical patent/CN109684201A/en
Publication of CN109684201A publication Critical patent/CN109684201A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3664Environments for testing or debugging software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/0482Interaction with lists of selectable items, e.g. menus

Abstract

The present invention proposes a kind of method for being switched fast running environment, which comprises receives the switching command for acting on the current operating environment of specific plug-in;In response to the switching command, the current context value of application program associated by the specific plug-in is obtained;The current context value is revised as new environment value indicated by the switching command, so that the destination application is run in the corresponding running environment of the new environment value.The specific plug-in of the present invention being switched fast in the method for running environment may be implemented a key and be switched fast the environment that current application program is run, achieve the purpose that or be better than manual modification environmental parameter, improves the working efficiency of research staff's exploitation and debugging stage.

Description

It is switched fast the method, apparatus, computer equipment and storage medium of running environment
Technical field
The present invention relates to field of computer technology more particularly to a kind of method, apparatus for being switched fast running environment, calculate Machine equipment and storage medium.
Background technique
Many application software are installed, each application software all has different functions, can be realized in mobile terminal The multi-functional demand of mobile terminal.But application software all can be tested largely before online.In real process, tested The case where journey is mostly completed in test environment, but new function is not disposed completely, it is necessary to test is completed in production.In addition, solution Problem is certainly produced on line, basic need is tested in production environment, however is solved bug and needed to complete in test environment deployment again.Cause This, in test process, needs the running environment of frequent switching mobile terminal.However, and switchover operation environment needed in program generation Environmental variance is changed in code.Running environment switching is realized by changing environmental variance in program code, is needed by code more The links such as change, compile and be packaged, process is relatively complicated, and there is also the factors of man's activity, and it is lower to develop testing efficiency.
In current field of computer technology, when user needs to switch the running environment of application program, need manually Resource manager is opened, needs to find the file modifications of configuration surroundings wherein environment configurations item manually.In existing technical solution At least have the following deficiencies:
(1) it is cumbersome that resource manager is opened manually;
(2) switchover operation environment needs change environmental variance in program code.By changing environment in program code Variable realizes running environment switching, needs by links such as coding change, compiling and packings, and process is relatively complicated, exploitation test Efficiency is lower;
(3) manual modification reliability is not high with correctness, is unfavorable for what research staff debugged and developed, especially for Newly into for personnel.
Summary of the invention
The present invention provides a kind of method for being switched fast running environment and corresponding device, and it is quick mainly to realize a key The environment that switching current application program is run, achievees the purpose that or is better than manual modification environmental parameter, improve research staff The working efficiency of exploitation and debugging stage.
The computer equipment that the present invention also provides a kind of for executing the method for being switched fast running environment of the invention and Readable storage medium storing program for executing.
To solve the above problems, the present invention uses the technical solution of following various aspects:
In a first aspect, the present invention provides a kind of method for being switched fast running environment, which comprises
Receive the switching command for acting on the current operating environment of specific plug-in;
In response to the switching command, the current context value of application program associated by the specific plug-in is obtained;
The current context value is revised as new environment value indicated by the switching command, so that the target application journey Sort run is worth in corresponding running environment in the new environment.
Specifically, the reception acts on the switching command of specific plug-in, including;
If to be switched running environment only includes production environment and test environment, the list for acting on specific plug-in is being received The switching command is triggered when hitting operation;
If to be switched running environment include it is two or more, receive act on the single-click operation of specific plug-in when building it is outstanding Floating menu, to be switched running environment is showed in the drop-down submenu of the suspension menu;
When receiving the running environment in selected one of drop-down submenu, that is, trigger the switching command.
Specifically, further include:
When to be switched running environment includes two or more, the environment value and switching command of each running environment are created Mapping relations.
Preferably, described that the current context value is revised as new environment value indicated by the switching command, it wraps before It includes:
The environment value of each running environment and the mapping relations of switching command are inquired, cutting for current operating environment is obtained Changing the corresponding environment value of instruction is the new environment value.
Specifically, further include:
Create the configuration file of the specific plug-in, the operation ring comprising specific plug-in switching in the configuration file Border and corresponding environment value.
Specifically, further include:
The newly-increased running environment is written in the configuration file and is set by the addition instruction for receiving newly-increased running environment Corresponding environment value.
Preferably, further includes:
Create the mapping relations of the newly-increased running environment and corresponding context swap.
Second aspect, the present invention provide a kind of device for being switched fast running environment, comprising:
Receiving module receives the switching command for acting on specific plug-in;
Module is obtained, for obtaining matching for application program associated by the specific plug-in in response to the switching command File is set, the current context value in the configuration file is extracted;
Switching module, for the current context value to be revised as new environment value indicated by the switching command, so that The destination application is run in the corresponding running environment of the new environment value.
The third aspect, the present invention provide a kind of computer readable storage medium, deposit on the computer readable storage medium Computer program is contained, is realized when which is executed by processor and is switched fast operation described in any one of first aspect The step of method of environment.
Fourth aspect, the present invention provide a kind of computer equipment, including memory and processor, store in the memory There is computer-readable instruction, when the computer-readable instruction is executed by the processor, so that the processor executes such as the The step of being switched fast the method for running environment described in any one of one side claim.
Compared with the existing technology, technical solution of the present invention at least has following advantage:
1, the present invention provides a kind of method for being switched fast running environment, is referred to by the switching that reception acts on specific plug-in It enables;In response to the switching command, the current context value of application program associated by the specific plug-in is obtained;It will be described current Environment value is revised as new environment value indicated by the switching command, so that the destination application runs on the new environment It is worth in corresponding running environment.The present invention switches the plug-in unit of application program running environment by installation, which can receive The current context value that current application program is run intelligently is obtained after the key clicking operation of user, and according to preset Current context value is revised as specified new environment value by logic, realizes that a key is switched fast the ring that current application program is run Border achievees the purpose that or is better than manual modification environmental parameter, improves the working efficiency of research staff's exploitation and debugging stage.
2, specific plug-in of the present invention can be in order to avoid installation, can configure, and configuration file supports modification.The present invention can be with The addition instruction for receiving newly-increased running environment, the newly-increased running environment is written in the configuration file and sets corresponding ring Border value, and the mapping relations of the newly-increased running environment and corresponding context swap are created, realize newly-increased running environment Addition.The present invention can flexibly modify configuration file by the mechanism, switch special exploitation environment, such as Lu Jin when needing to customize And bank's special project plug-in unit when, need to simply configure and can achieve the goal, it is not necessary to modify codes, convenient and efficient.
3, the method for the present invention for being switched fast running environment is applicable not only to two kinds of running environment of switching, is also applicable in Switching between two or more running environment.Specifically, if the running environment only includes production environment and test wrapper The switching command is triggered when receiving and acting on the single-click operation of specific plug-in in border;If the running environment includes two kinds More than, suspension menu is constructed when receiving and acting on the single-click operation of specific plug-in, to be switched running environment is showed in institute It states in the drop-down submenu of suspension menu;When receiving the running environment in selected one of drop-down submenu, that is, trigger institute State switching command.It can be by constructing suspension menu, in the suspension menu when for switching between two or more environment Drop-down submenu show to be switched each running environment.The present invention is applied widely, and handover mechanism can flexibly be modified.
Detailed description of the invention
Fig. 1 is the method flow diagram that running environment is switched fast in one embodiment;
Fig. 2 is the apparatus structure block diagram that running environment is switched fast in one embodiment;
Fig. 3 is the internal structure block diagram of computer equipment in one embodiment.
The object of the invention is realized, the embodiments will be further described with reference to the accompanying drawings for functional characteristics and advantage.
Specific embodiment
In order to enable those skilled in the art to better understand the solution of the present invention, below in conjunction in the embodiment of the present invention Attached drawing, technical scheme in the embodiment of the invention is clearly and completely described.
In some processes of the description in description and claims of this specification and above-mentioned attached drawing, contain according to Multiple operations that particular order occurs, but it should be clearly understood that these operations can not be what appears in this article suitable according to its Sequence is executed or is executed parallel, and the serial number of operation such as S11, S12 etc. be only used for distinguishing each different operation, serial number It itself does not represent and any executes sequence.In addition, these processes may include more or fewer operations, and these operations can To execute or execute parallel in order.It should be noted that the description such as " first " herein, " second ", is for distinguishing not Same message, equipment, module etc., does not represent sequencing, does not also limit " first " and " second " and be different type.
It will appreciated by the skilled person that unless expressly stated, singular " one " used herein, " one It is a ", " described " and "the" may also comprise plural form.It is to be further understood that being arranged used in specification of the invention Diction " comprising " refer to that there are the feature, integer, step, operation, element and/or component, but it is not excluded that in the presence of or addition Other one or more features, integer, step, operation, element, component and/or their group.It should be understood that when we claim member Part is " connected " or when " coupled " to another element, it can be directly connected or coupled to other elements, or there may also be Intermediary element.In addition, " connection " used herein or " coupling " may include being wirelessly connected or wirelessly coupling.It is used herein to arrange Diction "and/or" includes one or more associated wholes for listing item or any cell and all combinations.
It will appreciated by the skilled person that unless otherwise defined, all terms used herein (including technology art Language and scientific term), there is meaning identical with the general understanding of those of ordinary skill in fields of the present invention.Should also Understand, those terms such as defined in the general dictionary, it should be understood that have in the context of the prior art The consistent meaning of meaning, and unless idealization or meaning too formal otherwise will not be used by specific definitions as here To explain.
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description in which the same or similar labels are throughly indicated same or similar element or has same or like function Element.Obviously, described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.Based on this Embodiment in invention, those skilled in the art's every other implementation obtained without creative efforts Example, shall fall within the protection scope of the present invention.
Referring to Fig. 1, the embodiment of the present invention provides a kind of method for being switched fast running environment, as shown in Figure 1, the side Method the following steps are included:
S11, reception act on the switching command of specific plug-in.
In the embodiment of the present invention, the specific plug-in is the plug-in unit for one key switching application program running environment.Specifically , the specific plug-in is mainly made of plug-in unit dll and AddIn file.Wherein, dll mainly realizes handoff environment Core function, including informing function, the execution order core function etc. for receiving external program.It can be attached in vs as normal It advises plug-in unit to use, completes the work of one key switching application program running environment.The AddIn file registers letter mainly as to vs The object of breath, predominantly handoff environment dll provide Add-In information, can be used as pair for being attached to vs toolbar or menu As completing the work of switching application program running environment jointly with dll.Meeting its add-on file of default search folder when vs starts, will Relevant plug-in unit is attached to menu or toolbar.
User only needs to copy both of these documents to specified directory when practical operation, and is attached in vs and can be used, nothing Need to install, the specified directory be Vs default plug-in unit catalogue, such as vs2010, it by be created to I document visual studio 2010 under Addins.In the embodiment of the present invention, the specific plug-in is easy to operate, once being attached in vs, all vs examples will The function of the specific plug-in is shared, one key egress of the specific plug-in energy changes application program running environment, without opening manually Resource manager and find the file modifications of configuration surroundings wherein environment configurations item manually, improve the reliability of data modification with And accuracy, considerable ease is brought for developer.
Further, the specific plug-in is easy to be attached in vs in any toolbar, can due to being customized plug-in unit With the specific plug-in is mobile or be dragged to oneself convenient tool bar, there is no pressure sequence, with developer it is convenient based on. In a kind of possible design, the icon that the present invention clicks the specific plug-in by receiving one key of user triggers the switching and refers to It enables, or sets a virtual key in the icon attachment of the specific plug-in, user clicks the virtual key by a key and touches Send out switching command.
It should be noted that in the embodiment of the present invention, it is specific to wrap when the reception acts on the switching command of specific plug-in Include following two situation:
If one, the running environment only include production environment and test environment, specific plug-in is acted on receiving The switching command is triggered when single-click operation.For example, the environment for participating in switching only includes production environment and test environment.Institute Stating switching command is to click the specific plug-in by one key of user to trigger, and when current operating environment is production environment, is then defaulted Current environment is switched into test environment;When current environment is test environment, then current environment is switched to production ring by default One key switching environment is realized in border.
If secondly, the running environment is when including two or more, the switching command include first step switching command and Second step switching command.The first step switching command is triggered when receiving and acting on the single-click operation of specific plug-in, in response to The first step switching command constructs suspension menu, and to be switched running environment is showed in the lower rock dish of the suspension menu Dan Zhong;The second step switching command is triggered when receiving the running environment in selected one of drop-down submenu, in response to The second step switching command executes the modification of running environment value.
Specifically, the environment for participating in switching include it is a variety of, for example, production environment, test environment and other nonproductive rings Border and non-testing environments.The switching command clicks the specific plug-in triggering by user and shows a suspension menu, described outstanding Floating menu includes multiple drop-down submenus, for example, submenu 1 is to switch to A environment, menu 2 is to switch to B environment, by connecing The selected instruction for receiving user, determines to be switched new environment.The suspension menu is hidden after user has selected a submenu, Alternatively, being rung when detecting the pressing for acting on the suspension menu and being slid into the gesture at the terminal screen edge Gesture described in Ying Yu closes the suspension menu.
S12, in response to the switching command, obtain the current context value of application program associated by the specific plug-in.
In the embodiment of the present invention, when receiving the switching command, the specific plug-in can detect institute in current context In Application Instance.For example, obtaining the environment value of c catalogue if current application program example operates in c catalogue, going forward side by side The environment value of the c catalogue of one step modification, does not interfere other catalogues, if being currently operating at d catalogue, obtains d catalogue Environment value, and the environment value for the d catalogue further modified do not interfere other catalogues.
The operation for needing to switch when application program operation is included at least in the embodiment of the present invention, in the configuration file Environment and corresponding environment value.
S13, the current context value is revised as new environment value indicated by the switching command, so that the target is answered It is run in the corresponding running environment of the new environment value with program.
In the embodiment of the present invention, the configuration file of the specific plug-in is pre-created, is included at least in the configuration file To be switched running environment and corresponding environment value.
When running environment to be switched in the configuration file only includes two kinds, then current environment value is obtained, it is described Current context value is revised as the environment value of another environment by switching command default instruction.This kind of implementation is simple, fast, can be with The running environment of one key switching application program avoids the tedious steps of manual operation.
When running environment to be switched in the configuration file includes two or more, then need to create each running environment The mapping relations of environment value and switching command specifically create the environment value and the second step switching command of the running environment Mapping relations.Wherein, the environment value of each running environment and the mapping relations of switching command can be stored in the configuration text In part or write-in code.
Switch specifically, user triggers different second steps by the different drop-down submenus selected in the suspension menu Instruction, different second step switching command correspondences are switched to different running environment.For example, user selectes first lower rock dish Dan Shi, triggering A instruction, A are instructed for current context value to be revised as a;When user selectes second drop-down submenu, B is triggered Instruction, B are instructed for current context value to be revised as b.When receiving selected one of drop-down submenu of user, triggering the Two step switching commands, inquire the environment value of each running environment and the mapping relations of second step switching command, described in acquisition New environment value indicated by second step switching command.
In a kind of embodiment, the present invention can also receive the addition instruction of newly-increased running environment, by the newly-increased operation ring Border is written in the configuration file and sets corresponding environment value, and further creates the newly-increased running environment and corresponding ring The mapping relations of border switching command.
In the embodiment of the present invention, the plug-in unit for formulating the special exploitation environment of switching can according to need.Existing technical solution In, switch it is other it is nonproductive, test environment when, need to modify its plug-in card program, trivial operations.The present invention can pass through by Nonproductive, test environment is configured in same file, so that it is associated, is eliminated many and diverse operation of modification plug-in card program, Simplify step.
For example, institute then is added in Lu Jinsuo and bank when needing to formulate special exploitation environment such as Lu Jin institute and bank It states in configuration file and sets corresponding environment value and complete the configuration of newly-increased running environment, and create special project exploitation environment and ring The mapping relations of border switching command.Included at least in configuration file described in the embodiment of the present invention to be switched running environment and Corresponding environment value.In a kind of simplest design scheme, in the configuration file, environment=2 table can be set Show production, environment=3 indicates test, then the specific plug-in will detect that current context value, according to current context value It can determine environment, and prepare for handoff environment.
In the embodiment of the present invention, after the configuration file for creating newly-increased running environment, it is corresponding by the switching command with cut Code is written in mapping relations between the running environment shifted to.In a kind of possible application scenarios, for example, user is by clicking institute Specific plug-in is stated, flex suspension menu, user is by selecting the E menu triggering command 1 in the suspension menu, described instruction 1 It is corresponding that current operating environment is switched into bank;User is described by selecting the F menu triggering command 2 in the suspension menu Instruction 2 is corresponding to switch to Lu Jinsuo for current operating environment;User is by selecting the G menu triggering command in the suspension menu 3, described instruction 3 is corresponding to switch to build environment etc. for current operating environment.The present invention is by writing to be switched running environment Enter the configuration file, the mapping relations of the switching command and environment value is written to the code of the specific plug-in, by described Specific plug-in intelligently completes switching.
In the embodiment of the present invention, when to be switched running environment only includes two kinds, then when receiving context swap, Default switches to another running environment in addition to current operating environment;When the running environment of switching includes two or more, It need to be pre-created the mapping relations between switching command and the environment value being switched to, when receipt of subsequent switching command, inquire this and reflect The corresponding environment value of the Relation acquisition switching command is penetrated, and current operating environment value is modified into ring corresponding to the switching command Border value realizes switching, i.e. user switches to different operation rings by clicking the drop-down submenu triggering of different suspension menus Border.
In a kind of possible design, the present invention can also receive the modification instruction of specified configuration file, according to the modification Instruction is corresponding to modify the configuration file.For example, including running ring in A1, A2 and A3 in the configuration file of the specific plug-in Border and corresponding environment value, it is corresponding to delete the specified running environment when receiving the deletion instruction of specified running environment value Value.Plug-in unit provided by the present invention is configurable, and configuration file can be modified, and scalability is very strong.
It, can be with the icon and title of the customized specific plug-in in the embodiment of the present invention.In the embodiment of the present invention, A series of icon of specific plug-ins is provided and selects setting plug-in unit icon for user, wherein the icon includes but unlimited In text, picture, animation, expression etc..Plugin name can be set according to the title of the destination application to be terminated, It can specifically set, be not specifically limited herein according to the demand of user.
Referring to FIG. 2, in another embodiment, the present invention provides a kind of device for being switched fast running environment, packets It includes:
Receiving module 11, for receiving the switching command for acting on specific plug-in.
In the embodiment of the present invention, the specific plug-in is the plug-in unit for one key switching application program running environment.Specifically , the specific plug-in is mainly made of plug-in unit dll and AddIn file.Wherein, dll mainly realizes handoff environment Core function, including informing function, the execution order core function etc. for receiving external program.It can be attached in vs as normal It advises plug-in unit to use, completes the work of one key switching application program running environment.The AddIn file registers letter mainly as to vs The object of breath, predominantly handoff environment dll provide Add-In information, can be used as pair for being attached to vs toolbar or menu As completing the work of switching application program running environment jointly with dll.Meeting its add-on file of default search folder when vs starts, will Relevant plug-in unit is attached to menu or toolbar.
User only needs to copy both of these documents to specified directory when practical operation, and is attached in vs and can be used, nothing Need to install, the specified directory be Vs default plug-in unit catalogue, such as vs2010, it by be created to I document visual studio 2010 under Addins.In the embodiment of the present invention, the specific plug-in is easy to operate, once being attached in vs, all vs examples will The function of the specific plug-in is shared, one key egress of the specific plug-in energy changes application program running environment, without opening manually Resource manager and find the file modifications of configuration surroundings wherein environment configurations item manually, improve the reliability of data modification with And accuracy, considerable ease is brought for developer.
Further, the specific plug-in is easy to be attached in vs in any toolbar, can due to being customized plug-in unit With the specific plug-in is mobile or be dragged to oneself convenient tool bar, there is no pressure sequence, with developer it is convenient based on. In a kind of possible design, the icon that the present invention clicks the specific plug-in by receiving one key of user triggers the switching and refers to It enables, or sets a virtual key in the icon attachment of the specific plug-in, user clicks the virtual key by a key and touches Send out switching command.
It should be noted that in the embodiment of the present invention, it is specific to wrap when the reception acts on the switching command of specific plug-in Include following two situation:
If one, the running environment only include production environment and test environment, specific plug-in is acted on receiving The switching command is triggered when single-click operation.For example, the environment for participating in switching only includes production environment and test environment.Institute Stating switching command is to click the specific plug-in by one key of user to trigger, and when current operating environment is production environment, is then defaulted Current environment is switched into test environment;When current environment is test environment, then current environment is switched to production ring by default One key switching environment is realized in border.
If secondly, the running environment is when including two or more, the switching command include first step switching command and Second step switching command.The first step switching command is triggered when receiving and acting on the single-click operation of specific plug-in, in response to The first step switching command constructs suspension menu, and to be switched running environment is showed in the lower rock dish of the suspension menu Dan Zhong;The second step switching command is triggered when receiving the running environment in selected one of drop-down submenu, in response to The second step switching command executes the modification of running environment value.
Specifically, the environment for participating in switching include it is a variety of, for example, production environment, test environment and other nonproductive rings Border and non-testing environments.The switching command clicks the specific plug-in triggering by user and shows a suspension menu, described outstanding Floating menu includes multiple drop-down submenus, for example, submenu 1 is to switch to A environment, menu 2 is to switch to B environment, by connecing The selected instruction for receiving user, determines to be switched new environment.The suspension menu is hidden after user has selected a submenu, Alternatively, being rung when detecting the pressing for acting on the suspension menu and being slid into the gesture at the terminal screen edge Gesture described in Ying Yu closes the suspension menu.
Module 12 is obtained, for obtaining application program associated by the specific plug-in in response to the switching command Current context value.
In the embodiment of the present invention, when receiving the switching command, the specific plug-in can detect institute in current context In Application Instance.For example, obtaining the environment value of c catalogue if current application program example operates in c catalogue, going forward side by side The environment value of the c catalogue of one step modification, does not interfere other catalogues, if being currently operating at d catalogue, obtains d catalogue Environment value, and the environment value for the d catalogue further modified do not interfere other catalogues.
The operation for needing to switch when application program operation is included at least in the embodiment of the present invention, in the configuration file Environment and corresponding environment value.
Switching module 13, for the current context value to be revised as new environment value indicated by the switching command, with Run on the destination application in the corresponding running environment of the new environment value.
In the embodiment of the present invention, the configuration file of the specific plug-in is pre-created, is included at least in the configuration file To be switched running environment and corresponding environment value.
When running environment to be switched in the configuration file only includes two kinds, then current environment value is obtained, it is described Current context value is revised as the environment value of another environment by switching command default instruction.This kind of implementation is simple, fast, can be with The running environment of one key switching application program avoids the tedious steps of manual operation.
When running environment to be switched in the configuration file includes two or more, then need to create each running environment The mapping relations of environment value and switching command specifically create the environment value and the second step switching command of the running environment Mapping relations.Wherein, the environment value of each running environment and the mapping relations of switching command can be stored in the configuration text In part or write-in code.
Switch specifically, user triggers different second steps by the different drop-down submenus selected in the suspension menu Instruction, different second step switching command correspondences are switched to different running environment.For example, user selectes first lower rock dish Dan Shi, triggering A instruction, A are instructed for current context value to be revised as a;When user selectes second drop-down submenu, B is triggered Instruction, B are instructed for current context value to be revised as b.When receiving selected one of drop-down submenu of user, triggering the Two step switching commands, inquire the environment value of each running environment and the mapping relations of second step switching command, described in acquisition New environment value indicated by second step switching command.
In a kind of embodiment, the present invention can also receive the addition instruction of newly-increased running environment, by the newly-increased operation ring Border is written in the configuration file and sets corresponding environment value, and further creates the newly-increased running environment and corresponding ring The mapping relations of border switching command.
In the embodiment of the present invention, the plug-in unit for formulating the special exploitation environment of switching can according to need.Existing technical solution In, switch it is other it is nonproductive, test environment when, need to modify its plug-in card program, trivial operations.The present invention can pass through by Nonproductive, test environment is configured in same file, so that it is associated, is eliminated many and diverse operation of modification plug-in card program, Simplify step.
For example, institute then is added in Lu Jinsuo and bank when needing to formulate special exploitation environment such as Lu Jin institute and bank It states in configuration file and sets corresponding environment value and complete the configuration of newly-increased running environment, and create special project exploitation environment and ring The mapping relations of border switching command.Included at least in configuration file described in the embodiment of the present invention to be switched running environment and Corresponding environment value.In a kind of simplest design scheme, in the configuration file, environment=2 table can be set Show production, environment=3 indicates test, then the specific plug-in will detect that current context value, according to current context value It can determine environment, and prepare for handoff environment.
In the embodiment of the present invention, after the configuration file for creating newly-increased running environment, it is corresponding by the switching command with cut Code is written in mapping relations between the running environment shifted to.In a kind of possible application scenarios, for example, user is by clicking institute Specific plug-in is stated, flex suspension menu, user is by selecting the E menu triggering command 1 in the suspension menu, described instruction 1 It is corresponding that current operating environment is switched into bank;User is described by selecting the F menu triggering command 2 in the suspension menu Instruction 2 is corresponding to switch to Lu Jinsuo for current operating environment;User is by selecting the G menu triggering command in the suspension menu 3, described instruction 3 is corresponding to switch to build environment etc. for current operating environment.The present invention is by writing to be switched running environment Enter the configuration file, the mapping relations of the switching command and environment value is written to the code of the specific plug-in, by described Specific plug-in intelligently completes switching.
In the embodiment of the present invention, when to be switched running environment only includes two kinds, then when receiving context swap, Default switches to another running environment in addition to current operating environment;When the running environment of switching includes two or more, It need to be pre-created the mapping relations between switching command and the environment value being switched to, when receipt of subsequent switching command, inquire this and reflect The corresponding environment value of the Relation acquisition switching command is penetrated, and current operating environment value is modified into ring corresponding to the switching command Border value realizes switching, i.e. user switches to different operation rings by clicking the drop-down submenu triggering of different suspension menus Border.
In a kind of possible design, the present invention can also receive the modification instruction of specified configuration file, according to the modification Instruction is corresponding to modify the configuration file.For example, including running ring in A1, A2 and A3 in the configuration file of the specific plug-in Border and corresponding environment value, it is corresponding to delete the specified running environment when receiving the deletion instruction of specified running environment value Value.Plug-in unit provided by the present invention is configurable, and configuration file can be modified, and scalability is very strong.
It, can be with the icon and title of the customized specific plug-in in the embodiment of the present invention.In the embodiment of the present invention, A series of icon of specific plug-ins is provided and selects setting plug-in unit icon for user, wherein the icon includes but unlimited In text, picture, animation, expression etc..Plugin name can be set according to the title of the destination application to be terminated, It can specifically set, be not specifically limited herein according to the demand of user.
In another embodiment, the embodiment of the present invention provides a kind of computer readable storage medium, and the computer can It reads to be stored with computer program on storage medium, be realized when which is executed by processor quick described in any one technical solution The method of switchover operation environment.Wherein, the computer readable storage medium includes but is not limited to that any kind of disk is (including soft Disk, hard disk, CD, CD-ROM and magneto-optic disk), ROM (Read-Only Memory, read-only memory), RAM (Random AcceSS Memory, immediately memory), EPROM (EraSable Programmable Read-Only Memory, it is erasable Programmable read only memory), EEPROM (Electrically EraSable Programmable Read-Only Memory, Electrically Erasable Programmable Read-Only Memory), flash memory, magnetic card or light card.It is, storage equipment includes by equipment (example Such as, computer, mobile phone) with any medium for the form storage or transmission information that can be read, can be read-only memory, disk or CD etc..
1, a kind of computer readable storage medium provided in an embodiment of the present invention acts on specific plug-in, it can be achieved that receiving The switching command of current operating environment;In response to the switching command, application program associated by the specific plug-in is obtained Current context value;The current context value is revised as new environment value indicated by the switching command, so that the target is answered It is run in the corresponding running environment of the new environment value with program.The present invention passes through installation switching application program running environment Plug-in unit, what which can intelligently obtain that current application program run after the key clicking operation for receiving user works as front ring Border value, and current context value is revised as according to preset logic by specified new environment value, it realizes that a key is switched fast and works as The environment that preceding application program is run achievees the purpose that or is better than manual modification environmental parameter, improve research staff exploitation and The working efficiency in debugging stage.
In addition, the present invention provides a kind of computer equipments, as shown in figure 3, the computer in another embodiment Equipment includes the devices such as processor 303, memory 305, input unit 307 and display unit 309.Those skilled in the art can To understand, the structure devices shown in Fig. 3 do not constitute the restriction to all computer equipments, may include more or more than illustrating Few component, or the certain components of combination.Memory 305 can be used for storing application program 301 and each functional module, processor 303 operations are stored in the application program 301 of memory 305, thereby executing the various function application and data processing of equipment.It deposits Reservoir 305 can be built-in storage or external memory, or including both built-in storage and external memory.Built-in storage can wrap Include read-only memory (ROM), programming ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), flash memory or random access memory.External memory may include hard disk, floppy disk, ZIP disk, USB flash disk, tape Deng.Memory disclosed in this invention includes but is not limited to the memory of these types.Memory 305 disclosed in this invention As an example rather than as restriction.
Input unit 307 is used to receive the input of signal, and receives the keyword of user's input.Input unit 307 can Including touch panel and other input equipments.Touch panel collects the touch operation of user on it or nearby and (for example uses Family uses the operations of any suitable object or attachment on touch panel or near touch panel such as finger, stylus), and root According to the corresponding attachment device of preset driven by program;Other input equipments can include but is not limited to physical keyboard, function One of key (such as broadcasting control button, switch key etc.), trace ball, mouse, operating stick etc. are a variety of.Display unit 309 can be used for showing the information of user's input or be supplied to the information of user and the various menus of computer equipment.Display is single The forms such as liquid crystal display, Organic Light Emitting Diode can be used in member 309.Processor 303 is the control centre of computer equipment, benefit With the various pieces of various interfaces and the entire computer of connection, by running or executing the software being stored in memory 303 Program and/or module, and the data being stored in memory are called, perform various functions and handle data.Shown in Fig. 3 One or more processors 303 are able to carry out, realize receiving module 11, acquisition module 12 and switching module shown in Fig. 2 13 function.
In one embodiment, the computer equipment includes memory 305 and processor 303, the memory 305 In be stored with computer-readable instruction, when the computer-readable instruction is executed by the processor, so that the processor 303 The step of executing a kind of method for being switched fast running environment described in above embodiments.
A kind of computer equipment provided in an embodiment of the present invention can receive the current operating environment for acting on specific plug-in in fact Switching command;In response to the switching command, the current context value of application program associated by the specific plug-in is obtained;It will The current context value is revised as new environment value indicated by the switching command, so that the destination application runs on institute It states in the corresponding running environment of new environment value.The method of the present invention for being switched fast running environment by switching application program fortune The plug-in unit of row environment executes, which can intelligently obtain current application program institute after the key clicking operation for receiving user The current context value of operation, and the current context value is revised as by specified new environment value according to preset logic and is realized Environment changing achievees the purpose that or is better than manual modification environmental parameter, improves the work of research staff's exploitation and debugging stage Efficiency.
The above-mentioned side for being switched fast running environment may be implemented in computer readable storage medium provided in an embodiment of the present invention The embodiment of method, concrete function realize the explanation referred in embodiment of the method, and details are not described herein.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, which can be stored in a computer-readable storage and be situated between In matter, the program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, storage medium above-mentioned can be The non-volatile memory mediums such as magnetic disk, CD, read-only memory (Read-Only Memory, ROM) or random storage note Recall body (Random Access Memory, RAM) etc..
Each technical characteristic of embodiment described above can be combined arbitrarily, for simplicity of description, not to above-mentioned reality It applies all possible combination of each technical characteristic in example to be all described, as long as however, the combination of these technical characteristics is not deposited In contradiction, all should be considered as described in this specification.
The embodiments described above only express several embodiments of the present invention, and the description thereof is more specific and detailed, but simultaneously Limitations on the scope of the patent of the present invention therefore cannot be interpreted as.It should be pointed out that for those of ordinary skill in the art For, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to guarantor of the invention Protect range.Therefore, the scope of protection of the patent of the invention shall be subject to the appended claims.

Claims (10)

1. a kind of method for being switched fast running environment, which is characterized in that the described method includes:
Receive the switching command for acting on the current operating environment of specific plug-in;
In response to the switching command, the current context value of application program associated by the specific plug-in is obtained;
The current context value is revised as new environment value indicated by the switching command, so that the destination application is transported Row is worth in corresponding running environment in the new environment.
2. the method according to claim 1 for being switched fast running environment, which is characterized in that the reception acts on specified The switching command of plug-in unit, including;
If to be switched running environment only includes production environment and test environment, receive act on specific plug-in click behaviour The switching command is triggered when making;
If to be switched running environment includes two or more, the building suspension dish when reception acts on the single-click operation of specific plug-in It is single, to be switched running environment is showed in the drop-down submenu of the suspension menu;
When receiving the running environment in selected one of drop-down submenu, that is, trigger the switching command.
3. the method according to claim 2 for being switched fast running environment, which is characterized in that further include:
When to be switched running environment includes two or more, the mapping of the environment value and switching command of each running environment is created Relationship.
4. the method according to claim 3 for being switched fast running environment, which is characterized in that described by the current environment Value is revised as new environment value indicated by the switching command, includes: before
The environment value of each running environment and the mapping relations of switching command are inquired, the switching for obtaining current operating environment refers to Enabling corresponding environment value is the new environment value.
5. the method according to claim 1 for being switched fast running environment, which is characterized in that further include:
Create the configuration file of the specific plug-in, the running environment comprising specific plug-in switching in the configuration file with And corresponding environment value.
6. the method according to claim 5 for being switched fast running environment, which is characterized in that further include:
The addition instruction for receiving newly-increased running environment, the newly-increased running environment is written in the configuration file and sets correspondence Environment value.
7. the method according to claim 6 for being switched fast running environment, which is characterized in that further include:
Create the mapping relations of the newly-increased running environment and corresponding context swap.
8. a kind of device for being switched fast running environment characterized by comprising
Receiving module receives the switching command for acting on specific plug-in;
Module is obtained, for obtaining the configuration text of application program associated by the specific plug-in in response to the switching command Part extracts the current context value in the configuration file;
Switching module, for the current context value to be revised as new environment value indicated by the switching command, so that described Destination application is run in the corresponding running environment of the new environment value.
9. a kind of computer readable storage medium, which is characterized in that be stored with computer on the computer readable storage medium Program, which realizes when being executed by processor is switched fast running environment described in any one of claims 1 to 7 The step of method.
10. a kind of computer equipment, which is characterized in that including memory and processor, be stored with computer in the memory Readable instruction, when the computer-readable instruction is executed by the processor so that the processor execute as claim 1 to The step of method of running environment is switched fast described in any one of 7 claims.
CN201811419021.1A 2018-11-26 2018-11-26 It is switched fast the method, apparatus, computer equipment and storage medium of running environment Pending CN109684201A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811419021.1A CN109684201A (en) 2018-11-26 2018-11-26 It is switched fast the method, apparatus, computer equipment and storage medium of running environment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811419021.1A CN109684201A (en) 2018-11-26 2018-11-26 It is switched fast the method, apparatus, computer equipment and storage medium of running environment

Publications (1)

Publication Number Publication Date
CN109684201A true CN109684201A (en) 2019-04-26

Family

ID=66185844

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811419021.1A Pending CN109684201A (en) 2018-11-26 2018-11-26 It is switched fast the method, apparatus, computer equipment and storage medium of running environment

Country Status (1)

Country Link
CN (1) CN109684201A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110333999A (en) * 2019-05-06 2019-10-15 北京盛威时代科技有限公司 A method of test environment changing is carried out for cell phone client
CN111400196A (en) * 2020-04-28 2020-07-10 上海众言网络科技有限公司 Method and device for switching project information based on test environment
CN112416776A (en) * 2020-11-24 2021-02-26 天津五八到家货运服务有限公司 Selection method and device of operating environment, test equipment and storage medium
CN112486389A (en) * 2020-11-30 2021-03-12 维沃移动通信有限公司 Configuration file uploading method and device
CN113138806A (en) * 2021-03-25 2021-07-20 车智互联(北京)科技有限公司 Method and device for processing mobile application running environment
CN113867598A (en) * 2021-09-30 2021-12-31 挂号网(杭州)科技有限公司 Opening method, device, equipment and storage medium of in-application debugging tool
CN114968439A (en) * 2021-02-24 2022-08-30 Oppo广东移动通信有限公司 Desktop plug-in control method and device, storage medium and electronic equipment
CN116225576A (en) * 2023-05-08 2023-06-06 成都赛力斯科技有限公司 Application program data environment switching method and device, electronic equipment and medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104391716A (en) * 2014-11-14 2015-03-04 百度在线网络技术(北京)有限公司 Plug-in-based application program implementing method and device
CN104539458A (en) * 2014-12-30 2015-04-22 深圳市兰丁科技有限公司 Operating environment self-adapting method and device
CN106020877A (en) * 2016-05-16 2016-10-12 乐视控股(北京)有限公司 Automatic update method and apparatus for system environment configuration
CN106980428A (en) * 2016-01-16 2017-07-25 平安科技(深圳)有限公司 Application programe switch-over method and device
CN107168726A (en) * 2017-03-30 2017-09-15 武汉斗鱼网络科技有限公司 A kind of method and apparatus of dynamic configuration application program
CN107861863A (en) * 2017-08-24 2018-03-30 平安普惠企业管理有限公司 Running environment switching method, equipment and computer-readable recording medium
CN108600494A (en) * 2017-12-28 2018-09-28 北京奇虎科技有限公司 The method, apparatus and mobile terminal of mobile terminal optimization application running environment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104391716A (en) * 2014-11-14 2015-03-04 百度在线网络技术(北京)有限公司 Plug-in-based application program implementing method and device
CN104539458A (en) * 2014-12-30 2015-04-22 深圳市兰丁科技有限公司 Operating environment self-adapting method and device
CN106980428A (en) * 2016-01-16 2017-07-25 平安科技(深圳)有限公司 Application programe switch-over method and device
CN106020877A (en) * 2016-05-16 2016-10-12 乐视控股(北京)有限公司 Automatic update method and apparatus for system environment configuration
CN107168726A (en) * 2017-03-30 2017-09-15 武汉斗鱼网络科技有限公司 A kind of method and apparatus of dynamic configuration application program
CN107861863A (en) * 2017-08-24 2018-03-30 平安普惠企业管理有限公司 Running environment switching method, equipment and computer-readable recording medium
CN108600494A (en) * 2017-12-28 2018-09-28 北京奇虎科技有限公司 The method, apparatus and mobile terminal of mobile terminal optimization application running environment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
CODE小生_: "一键切换应用环境工具(EnvironmentSwitcher)了解一下?", pages 1 - 4, Retrieved from the Internet <URL:《CSDN:https://blog.csdn.net/H176Nhx7/article/details/82879626》> *

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110333999A (en) * 2019-05-06 2019-10-15 北京盛威时代科技有限公司 A method of test environment changing is carried out for cell phone client
CN110333999B (en) * 2019-05-06 2021-02-23 盛威时代科技集团有限公司 Method for switching test environments of mobile phone client
CN112711542A (en) * 2019-05-06 2021-04-27 盛威时代科技集团有限公司 Method for switching test environments of mobile phone client
CN112711542B (en) * 2019-05-06 2023-12-01 盛威时代科技集团有限公司 Method for switching testing environment of mobile phone client
CN111400196A (en) * 2020-04-28 2020-07-10 上海众言网络科技有限公司 Method and device for switching project information based on test environment
CN112416776A (en) * 2020-11-24 2021-02-26 天津五八到家货运服务有限公司 Selection method and device of operating environment, test equipment and storage medium
CN112416776B (en) * 2020-11-24 2022-12-13 天津五八到家货运服务有限公司 Selection method and device of operating environment, test equipment and storage medium
CN112486389A (en) * 2020-11-30 2021-03-12 维沃移动通信有限公司 Configuration file uploading method and device
WO2022179248A1 (en) * 2021-02-24 2022-09-01 Oppo广东移动通信有限公司 Desktop plug-in control method and apparatus, storage medium and electronic device
CN114968439A (en) * 2021-02-24 2022-08-30 Oppo广东移动通信有限公司 Desktop plug-in control method and device, storage medium and electronic equipment
CN113138806B (en) * 2021-03-25 2023-11-07 车智互联(北京)科技有限公司 Processing method and device for mobile application running environment
CN113138806A (en) * 2021-03-25 2021-07-20 车智互联(北京)科技有限公司 Method and device for processing mobile application running environment
CN113867598A (en) * 2021-09-30 2021-12-31 挂号网(杭州)科技有限公司 Opening method, device, equipment and storage medium of in-application debugging tool
CN116225576A (en) * 2023-05-08 2023-06-06 成都赛力斯科技有限公司 Application program data environment switching method and device, electronic equipment and medium
CN116225576B (en) * 2023-05-08 2023-07-28 成都赛力斯科技有限公司 Application program data environment switching method and device, electronic equipment and medium

Similar Documents

Publication Publication Date Title
CN109684201A (en) It is switched fast the method, apparatus, computer equipment and storage medium of running environment
US10248294B2 (en) Modal-less interface enhancements
US9606702B2 (en) Menus with translucency and live preview
US9851955B2 (en) GUI-driven symbol management and code generator
CN102236524B (en) Method for guiding operation of application program and mobile electronic device
US9857945B2 (en) Segment ring menu
US20060218528A1 (en) Software explorer
US7761859B2 (en) Application development environment with features for aiding a user in writing function calls
US20150301806A1 (en) Tentative program code in an editor
US9582400B1 (en) Determining when to evaluate program code and provide results in a live evaluation programming environment
US7376913B1 (en) Navigation and selection control for a hand-held portable computer
US8042095B2 (en) Application development environment with features for increasing the ease and efficiency of viewing function help text
CN110046094A (en) The switching method of running environment and the switching device of running environment
CN113126838A (en) Application icon sorting method and device and electronic equipment
CN104267867A (en) Content input method and device
CN105975154A (en) Application icon search method and mobile terminal
CN106570061A (en) Webpage tag management method and mobile terminal
CN109271161A (en) Template code generating method, device and storage equipment and computer equipment
CN109739567A (en) Method, apparatus, computer equipment and the storage medium of Quick stop application program
CN105278810A (en) Collection method and electronic device
CN103019552B (en) A kind of data handling system
CN116069424A (en) Page display method and device, electronic equipment and storage medium
CN110058779A (en) Information processing method, system, terminal device and computer readable storage medium
Bennett et al. Learning Objective-C and Xcode
Murphy et al. More Development Tools

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