CN107861863A - Running environment switching method, equipment and computer-readable recording medium - Google Patents

Running environment switching method, equipment and computer-readable recording medium Download PDF

Info

Publication number
CN107861863A
CN107861863A CN201710741726.4A CN201710741726A CN107861863A CN 107861863 A CN107861863 A CN 107861863A CN 201710741726 A CN201710741726 A CN 201710741726A CN 107861863 A CN107861863 A CN 107861863A
Authority
CN
China
Prior art keywords
variable
environment
configuration
configuration surroundings
home environment
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
CN201710741726.4A
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 Puhui Enterprise Management Co Ltd
Original Assignee
Ping An Puhui Enterprise Management 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 Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN201710741726.4A priority Critical patent/CN107861863A/en
Publication of CN107861863A publication Critical patent/CN107861863A/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/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 

Abstract

The invention discloses a kind of running environment switching method, equipment and computer-readable recording medium, the running environment switching method comprises the following steps:Asked with interval preset time to server send configuration file download, and receive the configuration file that the server is fed back based on the configuration file download request;Configuration surroundings variable is obtained from the configuration file, and the configuration surroundings variable is compared with home environment variable;In the configuration surroundings variable and home environment variable difference, current operating environment is switched into running environment corresponding to the configuration surroundings variable.The present invention in background server by setting configuration file, the configuration file is read in terminal polling, whether the configuration surroundings variable checking running environment in configuration file needs to switch, so as to realize that the dynamic security of running environment switches, program code need not be changed, it is effective to reduce flow, improve exploitation testing efficiency.

Description

Running environment switching method, equipment and computer-readable recording medium
Technical field
The present invention relates to the communications field, more particularly to a kind of running environment switching method, equipment and computer-readable storage Medium.
Background technology
Many application software are installed, each application software all possesses different functions, can realize in mobile terminal The multi-functional demand of mobile terminal.But application software all can be tested largely before reaching the standard grade, including non-functional test, work( Can test, client performance test, adaptation compatibility test, vulnerable network test, power consumption test, protocol test, safety test and Server performance test etc..
, it is necessary to the running environment of frequent switching mobile terminal in test process, and switchover operation environment is needed in program Environmental variance is changed in code.Realize running environment switching, it is necessary to by code by changing environmental variance in program code The links such as change, compiling and packing, flow is relatively complicated, and there is also the factor of man's activity, exploitation testing efficiency are relatively low.
The above is only used for auxiliary and understands technical scheme, does not represent and recognizes that the above is existing skill Art.
The content of the invention
It is a primary object of the present invention to provide a kind of running environment switching method, equipment and computer-readable storage medium Matter, it is intended to solve currently running environment changing mode, it is necessary to by links such as coding change, compiling and packings, flow is more It is cumbersome, the relatively low technical problem of exploitation testing efficiency.
To achieve the above object, the present invention provides a kind of running environment switching method, the running environment switching method bag Include following steps:
Asked with interval preset time to server send configuration file download, and receive the server and be based on described match somebody with somebody Put the configuration file of file download request feedback;
Configuration surroundings variable is obtained from the configuration file, and the configuration surroundings variable is entered with home environment variable Row compares, wherein, the configuration surroundings variable is test environment variable or production environment variable, and the home environment variable is survey Try environmental variance or production environment variable;
In the configuration surroundings variable and home environment variable difference, current operating environment is switched into the configuration ring Running environment corresponding to the variable of border.
Alternatively, the described the step of configuration surroundings variable is compared with home environment variable, includes:
Judge whether the identification information in the configuration surroundings variable is identical with the identification information in home environment variable;
If the identification information in the configuration surroundings variable is identical with the identification information in home environment variable, institute is judged It is identical with home environment variable to state configuration surroundings variable;
If the identification information in the configuration surroundings variable is different from the identification information in home environment variable, institute is judged It is different from home environment variable to state configuration surroundings variable.
Further, the identification information judged in the configuration surroundings variable whether with the mark in home environment variable After knowing the identical step of information, the described the step of configuration surroundings variable is compared with home environment variable, also wraps Include:
If the identification information in the configuration surroundings variable is identical with the identification information in home environment variable, institute is judged Whether the parameter values stated in configuration surroundings variable are identical with the parameter values in home environment variable;
If the parameter values in the configuration surroundings variable are identical with the parameter values in home environment variable, institute is performed State the step for judging that the configuration surroundings variable is identical with home environment variable;
If the parameter values in the configuration surroundings variable are different from the parameter values in home environment variable, institute is performed State the step for judging that the configuration surroundings variable is different from home environment variable.
Further, described the step of running environment is switched into running environment corresponding to the configuration surroundings variable it Afterwards, the running environment switching method also includes:
Judge whether current operating environment is test environment, and when current operating environment is test environment, described in detection Whether tested entries are carried in configuration file;
When carrying tested entries in detecting the configuration file, tested according to the tested entries.
Further, the running environment switching method also includes:
Whether different from default environmental variance detect home environment variable;
When detecting home environment variable with default environmental variance difference, current operating environment is switched into default operation Environment.
In addition, to achieve the above object, the present invention also provides a kind of running environment switching equipment, the running environment switching Equipment includes:Memory, processor and it is stored in the running environment that can be run on the memory and on the processor and cuts Program is changed, following steps are realized when the running environment changeover program is by the computing device:
Asked with interval preset time to server send configuration file download, and receive the server and be based on described match somebody with somebody Put the configuration file of file download request feedback;
Configuration surroundings variable is obtained from the configuration file, and the configuration surroundings variable is entered with home environment variable Row compares, wherein, the configuration surroundings variable is test environment variable or production environment variable, and the home environment variable is survey Try environmental variance or production environment variable;
In the configuration surroundings variable and home environment variable difference, current operating environment is switched into the configuration ring Running environment corresponding to the variable of border.
Further, the described the step of configuration surroundings variable is compared with home environment variable, includes:
Judge whether the identification information in the configuration surroundings variable is identical with the identification information in home environment variable;
If the identification information in the configuration surroundings variable is identical with the identification information in home environment variable, institute is judged It is identical with home environment variable to state configuration surroundings variable;
If the identification information in the configuration surroundings variable is different from the identification information in home environment variable, institute is judged It is different from home environment variable to state configuration surroundings variable.
Further, the described the step of configuration surroundings variable is compared with home environment variable, also includes:
If the identification information in the configuration surroundings variable is identical with the identification information in home environment variable, institute is judged Whether the parameter values stated in configuration surroundings variable are identical with the parameter values in home environment variable;
If the parameter values in the configuration surroundings variable are identical with the parameter values in home environment variable, institute is performed State the step for judging that the configuration surroundings variable is identical with home environment variable;
If the parameter values in the configuration surroundings variable are different from the parameter values in home environment variable, institute is performed State the step for judging that the configuration surroundings variable is different from home environment variable.
Further, further, when the running environment changeover program is by the computing device, following walk also is realized Suddenly:
Judge whether current operating environment is test environment, and when current operating environment is test environment, described in detection Whether tested entries are carried in configuration file;
When carrying tested entries in detecting the configuration file, tested according to the tested entries.
The present invention also provides a kind of computer-readable recording medium, and operation is stored with the computer-readable recording medium Environment changing program, the running environment changeover program realize following steps when being executed by processor:
Asked with interval preset time to server send configuration file download, and receive the server and be based on described match somebody with somebody Put the configuration file of file download request feedback;
Configuration surroundings variable is obtained from the configuration file, and the configuration surroundings variable is entered with home environment variable Row compares, wherein, the configuration surroundings variable is test environment variable or production environment variable, and the home environment variable is survey Try environmental variance or production environment variable;
In the configuration surroundings variable and home environment variable difference, current operating environment is switched into the configuration ring Running environment corresponding to the variable of border.
The present invention is asked with interval preset time to server send configuration file download, and is received the server and be based on being somebody's turn to do The configuration file of configuration file download request feedback, then obtains configuration surroundings variable, and this is configured from the configuration file Environmental variance is compared with home environment variable, ought finally in the configuration surroundings variable and home environment variable difference Preceding running environment switches to running environment corresponding to the configuration surroundings variable, and this programme is configured by being set in background server The configuration file is read in file, terminal polling, configuration surroundings variable in configuration file checking running environment whether needs Switching, so as to realize that the dynamic security of running environment switches, without changing program code, flow is effectively reduced, improves exploitation Testing efficiency.
Brief description of the drawings
Fig. 1 is the device structure schematic diagram for the hardware running environment that scheme of the embodiment of the present invention is related to;
Fig. 2 is the schematic flow sheet of running environment switching method first embodiment of the present invention;
Fig. 3 is the refinement stream that the configuration surroundings variable is compared to step described in Fig. 2 with home environment variable Journey schematic diagram;
Fig. 4 is the another refinement that the configuration surroundings variable is compared to step described in Fig. 2 with home environment variable Schematic flow sheet;
Fig. 5 is the schematic flow sheet of running environment switching method second embodiment of the present invention;
Fig. 6 is the schematic flow sheet of running environment switching method 3rd embodiment of the present invention.
The realization, functional characteristics and advantage of the object of the invention will be described further referring to the drawings in conjunction with the embodiments.
Embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
The primary solutions of the embodiment of the present invention are:Please to server send configuration file download with interval preset time Ask, and receive the configuration file that the server is fed back based on the configuration file download request, then obtained from the configuration file Configuration surroundings variable, and the configuration surroundings variable is compared with home environment variable, finally the configuration surroundings variable with During home environment variable difference, current operating environment is switched into running environment corresponding to the configuration surroundings variable.
In program code change environmental variance realize running environment switch, due to need by coding change, compiling and The links such as packing, therefore, flow is relatively complicated, and there is also the factor of man's activity, exploitation testing efficiency are relatively low.
The present invention provides a solution, and this programme in background server by setting configuration file, terminal polling The configuration file is read, whether the configuration surroundings variable checking running environment in configuration file needs to switch, so as to realize The dynamic security switching of running environment, without changing program code, effectively reduces flow, improves exploitation testing efficiency.
As shown in figure 1, Fig. 1 is the device structure schematic diagram for the hardware running environment that scheme of the embodiment of the present invention is related to.
Equipment of the embodiment of the present invention can be PC or smart mobile phone, tablet personal computer, pocket computer etc. with aobvious Show the packaged type terminal device of function.
As shown in figure 1, the equipment can include:Processor 1001, such as CPU, communication bus 1002, user interface 1003, network interface 1004, memory 1005.Wherein, communication bus 1002 is used to realize the connection communication between these components. User interface 1003 can include display screen (Display), input block such as keyboard (Keyboard), optional user interface 1003 can also include wireline interface, the wave point of standard.Network interface 1004 can optionally connect including the wired of standard Mouth, wave point (such as WI-FI interfaces).Memory 1005 can be high-speed RAM memory or stable memory (non-volatile memory), such as magnetic disk storage.Memory 1005 optionally can also be independently of aforementioned processor 1001 storage device.
Alternatively, the equipment can also include camera, RF (Radio Frequency, radio frequency) circuit, sensor, sound Frequency circuit, WiFi module etc..Wherein, sensor ratio such as optical sensor, motion sensor and other sensors.Specifically, Optical sensor may include ambient light sensor and proximity transducer, wherein, ambient light sensor can be according to the light and shade of ambient light To adjust the brightness of display screen, proximity transducer can close display screen and/or backlight when mobile terminal is moved in one's ear.Make For one kind of motion sensor, gravity accelerometer can detect in all directions the size of (generally three axles) acceleration, Size and the direction of gravity are can detect that when static, application (such as horizontal/vertical screen switching, related trip available for identification equipment posture Play, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, tap) etc.;Certainly, the equipment can also configure top The other sensors such as spiral shell instrument, barometer, hygrometer, thermometer, infrared ray sensor, will not be repeated here.
It will be understood by those skilled in the art that the device structure shown in Fig. 1 does not form the restriction to equipment, can wrap Include than illustrating more or less parts, either combine some parts or different parts arrangement.
As shown in figure 1, it can lead to as in a kind of memory 1005 of computer-readable storage medium including operating system, network Believe module, Subscriber Interface Module SIM and running environment changeover program.
In the equipment shown in Fig. 1, network interface 1004 is mainly used in connecting background server, is carried out with background server Data communicate;User interface 1003 is mainly used in connecting client (user terminal), enters row data communication with client;And processor 1001 can be used for calling the running environment changeover program stored in memory 1005, and perform following steps:
Asked with interval preset time to server send configuration file download, and receive the server and be based on described match somebody with somebody Put the configuration file of file download request feedback;
Configuration surroundings variable is obtained from the configuration file, and the configuration surroundings variable is entered with home environment variable Row compares, wherein, the configuration surroundings variable is test environment variable or production environment variable, and the home environment variable is survey Try environmental variance or production environment variable;
In the configuration surroundings variable and home environment variable difference, current operating environment is switched into the configuration ring Running environment corresponding to the variable of border.
Further, the described the step of configuration surroundings variable is compared with home environment variable, includes:
Judge whether the identification information in the configuration surroundings variable is identical with the identification information in home environment variable;
If the identification information in the configuration surroundings variable is identical with the identification information in home environment variable, institute is judged It is identical with home environment variable to state configuration surroundings variable;
If the identification information in the configuration surroundings variable is different from the identification information in home environment variable, institute is judged It is different from home environment variable to state configuration surroundings variable.
Further, the described the step of configuration surroundings variable is compared with home environment variable, also includes:
If the identification information in the configuration surroundings variable is identical with the identification information in home environment variable, institute is judged Whether the parameter values stated in configuration surroundings variable are identical with the parameter values in home environment variable;
If the parameter values in the configuration surroundings variable are identical with the parameter values in home environment variable, institute is performed State the step for judging that the configuration surroundings variable is identical with home environment variable;
If the parameter values in the configuration surroundings variable are different from the parameter values in home environment variable, institute is performed State the step for judging that the configuration surroundings variable is different from home environment variable.
Further, processor 1001 can call the running environment changeover program stored in memory 1005, also perform Following steps:
Judge whether current operating environment is test environment, and when current operating environment is test environment, described in detection Whether tested entries are carried in configuration file;
When carrying tested entries in detecting the configuration file, tested according to the tested entries.
Further, processor 1001 can call the running environment changeover program stored in memory 1005, also perform Following steps:
Whether different from default environmental variance detect home environment variable;
When detecting home environment variable with default environmental variance difference, current operating environment is switched into default operation Environment.
Each specific implementation of the specific embodiment and following running environment switching methods of running environment switching equipment of the present invention Example is essentially identical, and therefore not to repeat here.
The present invention provides a kind of running environment switching method.
Reference picture 2, Fig. 2 are the flow chart of running environment switching method first embodiment of the present invention.
In the present embodiment, the running environment switching method also includes:
Step S101, asked with interval preset time to server send configuration file download, and receive the server Configuration file based on configuration file download request feedback;
The running environment switching method is applied to mobile terminal, and the mobile terminal includes smart mobile phone and tablet personal computer etc.. The mobile terminal carries out data interaction by wireless network and server, and configuration file is stored with the server, configuration text Part includes configuration surroundings variable, renewal patch and tested entries etc..The running environment includes production environment and test environment, should Production environment is the scene that analog subscriber uses application software, and the test environment is what tester was tested application software Scene, under different running environment, the environmental variance in program code is different.
Mobile terminal is asked with interval preset time to server send configuration file download, the configuration file download request For obtaining configuration file to server, the configuration file download request includes the equipment identification information and network rings of mobile terminal Environment information etc., then server receives the configuration file download request that mobile terminal is sent, and responds configuration file download and ask Ask, give the mobile terminal feedback configuration file, mobile terminal download configuration file from server., should in specific implementation Server obtains the device identification in the configuration file download request when receiving the configuration file download request of mobile terminal Information, and judge whether the equipment identification information is in default equipment identification information group, if the equipment identification information is in Default equipment identification information group, then it can be determined that the mobile terminal possesses the download permission of configuration file, now to mobile whole Feedback configuration file is held, if the equipment identification information is not in default equipment identification information group, is fed back to mobile terminal Poll halt instruction so that mobile terminal stops the request of send configuration file download.
Step S102, configuration surroundings variable is obtained from the configuration file, and by the configuration surroundings variable and local Environmental variance is compared, wherein, the configuration surroundings variable is test environment variable or production environment variable, the local ring Border variable is test environment variable or production environment variable;
The mobile terminal obtains configuration surroundings change after the configuration file of service feedback is received from the configuration file Amount, and home environment variable is obtained in the default storage region of mobile terminal, then by the configuration surroundings variable and the local Environmental variance is compared, and the configuration surroundings variable is test environment variable or production environment variable, and the home environment variable is Test environment variable or production environment variable.
Specifically, reference picture 3, the refinement schematic flow sheet that Fig. 3 is step S102 described in Fig. 2, step S102 bags Include:
Step S1021, judge identification information in the configuration surroundings variable whether with the mark in home environment variable Information is identical;
Step S1022, if the identification information in the configuration surroundings variable and the identification information phase in home environment variable Together, then judge that the configuration surroundings variable is identical with home environment variable;
Step S1023, if identification information in the configuration surroundings variable with the identification information in home environment variable not Together, then judge that the configuration surroundings variable is different from home environment variable.
The mobile terminal judges whether the configuration surroundings variable is identical with home environment variable, when in configuration surroundings variable When identification information is identical with the identification information in home environment variable, the configuration surroundings variable and home environment variable phase are judged Together, and when the identification information difference in the identification information in configuration surroundings variable and home environment variable, the configuration ring is judged Border variable is different from home environment variable.
Specifically, it may further reference Fig. 4, Fig. 4 is the another refinement schematic flow sheet of step S102 described in Fig. 2, the step After S1021, step S102 also includes:
Step S1024, if the identification information in the configuration surroundings variable and the identification information phase in home environment variable Together, then judge whether the parameter values in the configuration surroundings variable are identical with the parameter values in home environment variable;
If the parameter values in the configuration surroundings variable are identical with the parameter values in home environment variable, step is performed Rapid S1022, that is, judge that the configuration surroundings variable is identical with home environment variable;
If the parameter values in the configuration surroundings variable are different from the parameter values in home environment variable, step is performed Rapid S1023, that is, judge that the configuration surroundings variable is different from home environment variable.
The mobile terminal is by judging to obtain the identification information in configuration surroundings variable and the mark in home environment variable When information is identical, determine whether parameter values in the configuration surroundings variable whether with the parameter values in home environment variable It is identical, if the parameter values of the configuration surroundings variable are different from the parameter values of home environment variable, it can be determined that this should Configuration surroundings variable is different from home environment variable, if the parameter values of configuration surroundings variable and the parameter of home environment variable Numerical value is identical, then can be determined that the configuration surroundings variable is identical with home environment variable.
Step S103, in the configuration surroundings variable and home environment variable difference, current operating environment is switched to Running environment corresponding to the configuration surroundings variable.
To obtain the configuration surroundings variable different from home environment variable by comparing for the mobile terminal, then will currently run ring Border switches to running environment corresponding to the configuration surroundings variable.Specifically, the switching of running environment includes two kinds of situations, Yi Zhongwei The different running environment switching of identification information, i.e., current operating environment is test environment, then test environment is switched into production ring Border, and current operating environment is production environment, then production environment is switched into test environment, another kind is identification information phase Together, but the different running environment switching of parameter values, i.e. test environment and another test environment, or production environment and another production Switching between environment.In specific implementation, home environment variable update is the configuration surroundings variable by mobile terminal, and is stored The configuration surroundings variable, then exports Restart Signal, and exports prompting message, finally should according to corresponding to restarting the Restart Signal With software, the switching of running environment is realized.
In the present embodiment, the present invention is asked with interval preset time to server send configuration file download, and is received The configuration file that the server is fed back based on the configuration file download request, configuration surroundings are then obtained from the configuration file and are become Amount, and the configuration surroundings variable is compared with home environment variable, finally become in the configuration surroundings variable and home environment When measuring different, current operating environment is switched into running environment corresponding to the configuration surroundings variable, this programme on backstage by taking Configuration file is set in business device, the configuration file is read in terminal polling, the configuration surroundings variable checking fortune in configuration file Whether row environment, which needs, switches, effective to reduce without changing program code so as to realize that the dynamic security of running environment switches Flow, improve exploitation testing efficiency.
Further, reference picture 5, propose that running environment switching method second of the present invention is implemented based on above-mentioned first embodiment Example, the difference with previous embodiment is, after step S103, the running environment switching method also includes:
Step S104, judge whether current operating environment is test environment, and when current operating environment is test environment, Detect in the configuration file and whether carry tested entries;
Step S105, when carrying tested entries in detecting the configuration file, carried out according to the tested entries Test.
After current operating environment is switched to running environment corresponding to the configuration surroundings variable by mobile terminal, after judging switching Running environment whether be test environment, that is, judge the identification information in the configuration surroundings variable whether be test identification information, If the identification information in the configuration surroundings variable is test identification information, it can be determined that the running environment after switching for test Environment, then detect tested entries whether are carried in the configuration file, and test-strips are carried in the configuration file is detected During mesh, tested according to the tested entries, the tested entries can include non-functional test, functional test, client performance Test, adaptation compatibility test, vulnerable network test, power consumption test, protocol test, safety test and server performance test etc.. In specific implementation, if the running environment after switching is production environment, detects and renewal whether is carried in the configuration file Patch, and when carrying renewal patch in detecting the configuration file, application software is updated according to the renewal patch.
In the present embodiment, after the running environment of the present invention after handover is test environment, obtain in the configuration file Tested entries, and tested according to the tested entries, the remote testing of test development personnel is realized, improves testing efficiency.
Further, reference picture 6, running environment switching method of the present invention the is proposed based on above-mentioned first or second embodiments Three embodiments, the difference with previous embodiment are that the running environment switching method also includes:
Whether step S106, detection home environment variable are different from default environmental variance;
Step S107, when detecting home environment variable with default environmental variance difference, current operating environment is switched To preset running environment.
The mobile terminal detects to home environment variable, judge the home environment variable whether with default environmental variance Difference, when detecting the home environment variable with default environmental variance difference, judge home environment variable exception, will be current Running environment switches to default running environment.
In the present embodiment, running environment is switched to default fortune by the present invention when detecting home environment variable exception Row environment, can effective prevent because the problem of home environment variable causes extremely occurs.
In addition, the embodiment of the present invention also proposes a kind of computer-readable recording medium, the computer-readable recording medium On be stored with running environment changeover program, the running environment changeover program realizes following steps when being executed by processor:
Asked with interval preset time to server send configuration file download, and receive the server and be based on described match somebody with somebody Put the configuration file of file download request feedback;
Configuration surroundings variable is obtained from the configuration file, and the configuration surroundings variable is entered with home environment variable Row compares, wherein, the configuration surroundings variable is test environment variable or production environment variable, and the home environment variable is survey Try environmental variance or production environment variable;
In the configuration surroundings variable and home environment variable difference, current operating environment is switched into the configuration ring Running environment corresponding to the variable of border.
Further, the described the step of configuration surroundings variable is compared with home environment variable, includes:
Judge whether the identification information in the configuration surroundings variable is identical with the identification information in home environment variable;
If the identification information in the configuration surroundings variable is identical with the identification information in home environment variable, institute is judged It is identical with home environment variable to state configuration surroundings variable;
If the identification information in the configuration surroundings variable is different from the identification information in home environment variable, institute is judged It is different from home environment variable to state configuration surroundings variable.
Further, the described the step of configuration surroundings variable is compared with home environment variable, also includes:
If the identification information in the configuration surroundings variable is identical with the identification information in home environment variable, institute is judged Whether the parameter values stated in configuration surroundings variable are identical with the parameter values in home environment variable;
If the parameter values in the configuration surroundings variable are identical with the parameter values in home environment variable, institute is performed State the step for judging that the configuration surroundings variable is identical with home environment variable;
If the parameter values in the configuration surroundings variable are different from the parameter values in home environment variable, institute is performed State the step for judging that the configuration surroundings variable is different from home environment variable.
Further, when the running environment changeover program is by the computing device, following steps are also realized:
Judge whether current operating environment is test environment, and when current operating environment is test environment, described in detection Whether tested entries are carried in configuration file;
When carrying tested entries in detecting the configuration file, tested according to the tested entries.
Further, when the running environment changeover program is by the computing device, following steps are also realized:
Whether abnormal detect home environment variable;
When detecting home environment variable exception, current operating environment is switched into default running environment.
The specific embodiment of computer-readable recording medium of the present invention is each specific real with above-mentioned running environment switching method It is essentially identical to apply example, therefore not to repeat here.
It should be noted that herein, term " comprising ", "comprising" or its any other variant are intended to non-row His property includes, so that process, method, article or system including a series of elements not only include those key elements, and And also include the other element being not expressly set out, or also include for this process, method, article or system institute inherently Key element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that including this Other identical element also be present in the process of key element, method, article or system.
The embodiments of the present invention are for illustration only, do not represent the quality of embodiment.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can add the mode of required general hardware platform to realize by software, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on such understanding, technical scheme is substantially done to prior art in other words Going out the part of contribution can be embodied in the form of software product, and the computer software product is stored in one as described above In storage medium (such as ROM/RAM, magnetic disc, CD), including some instructions to cause a station terminal equipment (can be mobile phone, Computer, server, air conditioner, or network equipment etc.) perform method described in each embodiment of the present invention.
The preferred embodiments of the present invention are these are only, are not intended to limit the scope of the invention, it is every to utilize this hair The equivalent structure or equivalent flow conversion that bright specification and accompanying drawing content are made, or directly or indirectly it is used in other related skills Art field, is included within the scope of the present invention.

Claims (10)

1. a kind of running environment switching method, it is characterised in that the running environment switching method comprises the following steps:
Asked with interval preset time to server send configuration file download, and receive the server and be based on the configuration text The configuration file of part download request feedback;
Configuration surroundings variable is obtained from the configuration file, and the configuration surroundings variable is compared with home environment variable It is right, wherein, the configuration surroundings variable is test environment variable or production environment variable, and the home environment variable is test wrapper Border variable or production environment variable;
In the configuration surroundings variable and home environment variable difference, the configuration surroundings are switched to become current operating environment Running environment corresponding to amount.
2. running environment switching method as claimed in claim 1, it is characterised in that described by the configuration surroundings variable and this The step of ground environmental variance is compared includes:
Judge whether the identification information in the configuration surroundings variable is identical with the identification information in home environment variable;
If the identification information in the configuration surroundings variable is identical with the identification information in home environment variable, match somebody with somebody described in judgement It is identical with home environment variable to put environmental variance;
If the identification information in the configuration surroundings variable is different from the identification information in home environment variable, match somebody with somebody described in judgement It is different from home environment variable to put environmental variance.
3. running environment switching method as claimed in claim 2, it is characterised in that described to judge in the configuration surroundings variable Identification information whether after the step identical with the identification information in home environment variable, it is described by the configuration surroundings variable The step of being compared with home environment variable also includes:
If the identification information in the configuration surroundings variable is identical with the identification information in home environment variable, match somebody with somebody described in judgement Whether the parameter values put in environmental variance are identical with the parameter values in home environment variable;
If the parameter values in the configuration surroundings variable are identical with the parameter values in home environment variable, sentence described in execution The fixed configuration surroundings variable step identical with home environment variable;
If the parameter values in the configuration surroundings variable are different from the parameter values in home environment variable, sentence described in execution The fixed configuration surroundings variable step different from home environment variable.
4. running environment switching method as claimed in claim 1, it is characterised in that described that running environment is switched into described match somebody with somebody After the step of putting running environment corresponding to environmental variance, the running environment switching method also includes:
Judge whether current operating environment is test environment, and when current operating environment is test environment, detect the configuration Whether tested entries are carried in file;
When carrying tested entries in detecting the configuration file, tested according to the tested entries.
5. the running environment switching method as any one of claim 1-4, it is characterised in that the running environment switching Method also includes:
Whether different from default environmental variance detect home environment variable;
When detecting home environment variable with default environmental variance difference, current operating environment is switched into default operation ring Border.
6. a kind of running environment switches equipment, it is characterised in that the running environment switching equipment includes:Memory, processor And the running environment changeover program that can be run on the memory and on the processor is stored in, the running environment switching Following steps are realized when program is by the computing device:
Asked with interval preset time to server send configuration file download, and receive the server and be based on the configuration text The configuration file of part download request feedback;
Configuration surroundings variable is obtained from the configuration file, and the configuration surroundings variable is compared with home environment variable It is right, wherein, the configuration surroundings variable is test environment variable or production environment variable, and the home environment variable is test wrapper Border variable or production environment variable;
In the configuration surroundings variable and home environment variable difference, the configuration surroundings are switched to become current operating environment Running environment corresponding to amount.
7. running environment as claimed in claim 6 switches equipment, it is characterised in that described by the configuration surroundings variable and this The step of ground environmental variance is compared includes:
Judge whether the identification information in the configuration surroundings variable is identical with the identification information in home environment variable;
If the identification information in the configuration surroundings variable is identical with the identification information in home environment variable, match somebody with somebody described in judgement It is identical with home environment variable to put environmental variance;
If the identification information in the configuration surroundings variable is different from the identification information in home environment variable, match somebody with somebody described in judgement It is different from home environment variable to put environmental variance.
8. running environment as claimed in claim 7 switches equipment, it is characterised in that described by the configuration surroundings variable and this The step of ground environmental variance is compared also includes:
If the identification information in the configuration surroundings variable is identical with the identification information in home environment variable, match somebody with somebody described in judgement Whether the parameter values put in environmental variance are identical with the parameter values in home environment variable;
If the parameter values in the configuration surroundings variable are identical with the parameter values in home environment variable, sentence described in execution The fixed configuration surroundings variable step identical with home environment variable;
If the parameter values in the configuration surroundings variable are different from the parameter values in home environment variable, sentence described in execution The fixed configuration surroundings variable step different from home environment variable.
9. running environment as claimed in claim 6 switches equipment, it is characterised in that the running environment changeover program is described During computing device, following steps are also realized:
Judge whether current operating environment is test environment, and when current operating environment is test environment, detect the configuration Whether tested entries are carried in file;
When carrying tested entries in detecting the configuration file, tested according to the tested entries.
10. a kind of computer-readable recording medium, it is characterised in that operation ring is stored with the computer-readable recording medium Border changeover program, the running environment changeover program realize following steps when being executed by processor:
Asked with interval preset time to server send configuration file download, and receive the server and be based on the configuration text The configuration file of part download request feedback;
Configuration surroundings variable is obtained from the configuration file, and the configuration surroundings variable is compared with home environment variable It is right, wherein, the configuration surroundings variable is test environment variable or production environment variable, and the home environment variable is test wrapper Border variable or production environment variable;
In the configuration surroundings variable and home environment variable difference, the configuration surroundings are switched to become current operating environment Running environment corresponding to amount.
CN201710741726.4A 2017-08-24 2017-08-24 Running environment switching method, equipment and computer-readable recording medium Pending CN107861863A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710741726.4A CN107861863A (en) 2017-08-24 2017-08-24 Running environment switching method, equipment and computer-readable recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710741726.4A CN107861863A (en) 2017-08-24 2017-08-24 Running environment switching method, equipment and computer-readable recording medium

Publications (1)

Publication Number Publication Date
CN107861863A true CN107861863A (en) 2018-03-30

Family

ID=61699349

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710741726.4A Pending CN107861863A (en) 2017-08-24 2017-08-24 Running environment switching method, equipment and computer-readable recording medium

Country Status (1)

Country Link
CN (1) CN107861863A (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109240755A (en) * 2018-06-28 2019-01-18 平安科技(深圳)有限公司 A kind of configuration file comparison method and configuration file Compare System
CN109325363A (en) * 2018-09-26 2019-02-12 平安普惠企业管理有限公司 Management method, device, computer equipment and the storage medium of authority information
CN109324970A (en) * 2018-09-28 2019-02-12 平安普惠企业管理有限公司 SDK running environment detection method, device, computer equipment and storage medium
CN109684201A (en) * 2018-11-26 2019-04-26 平安科技(深圳)有限公司 It is switched fast the method, apparatus, computer equipment and storage medium of running environment
CN109828779A (en) * 2018-12-26 2019-05-31 中国平安人寿保险股份有限公司 Environment changing method, apparatus, terminal installation and storage medium
CN110147241A (en) * 2019-04-16 2019-08-20 平安普惠企业管理有限公司 Program configures update method, electronic device, computer equipment and storage medium
CN110333999A (en) * 2019-05-06 2019-10-15 北京盛威时代科技有限公司 A method of test environment changing is carried out for cell phone client
CN110351134A (en) * 2019-06-28 2019-10-18 北京你财富计算机科技有限公司 A kind of server environment switching method, device and electronic equipment
CN111538542A (en) * 2020-03-24 2020-08-14 中国平安人寿保险股份有限公司 System configuration method and related device
CN111694612A (en) * 2020-05-28 2020-09-22 平安普惠企业管理有限公司 Configuration checking method, device, computer system and storage medium
CN112083963A (en) * 2020-09-04 2020-12-15 深圳市视美泰技术股份有限公司 System function configuration method based on external storage medium and related equipment
CN112671566A (en) * 2020-12-16 2021-04-16 平安普惠企业管理有限公司 Data processing method and device, computer equipment and readable storage medium
CN113190425A (en) * 2021-04-28 2021-07-30 北京京东振世信息技术有限公司 Resource switching method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101042645A (en) * 2007-01-17 2007-09-26 北京立通无限科技有限公司 Method, equipment and system for unionize software development environment
CN101179573A (en) * 2007-10-24 2008-05-14 中兴通讯股份有限公司 Method of implementing online dynamic updating server software configuration information
US20120203742A1 (en) * 2011-02-08 2012-08-09 International Business Machines Corporation Remote data protection in a networked storage computing environment
CN104539458A (en) * 2014-12-30 2015-04-22 深圳市兰丁科技有限公司 Operating environment self-adapting method and device
CN104714847A (en) * 2013-12-13 2015-06-17 国际商业机器公司 Dynamically Change Cloud Environment Configurations Based on Moving Workloads
CN106155905A (en) * 2016-06-28 2016-11-23 广州华多网络科技有限公司 Applied environment changing method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101042645A (en) * 2007-01-17 2007-09-26 北京立通无限科技有限公司 Method, equipment and system for unionize software development environment
CN101179573A (en) * 2007-10-24 2008-05-14 中兴通讯股份有限公司 Method of implementing online dynamic updating server software configuration information
US20120203742A1 (en) * 2011-02-08 2012-08-09 International Business Machines Corporation Remote data protection in a networked storage computing environment
CN104714847A (en) * 2013-12-13 2015-06-17 国际商业机器公司 Dynamically Change Cloud Environment Configurations Based on Moving Workloads
CN104539458A (en) * 2014-12-30 2015-04-22 深圳市兰丁科技有限公司 Operating environment self-adapting method and device
CN106155905A (en) * 2016-06-28 2016-11-23 广州华多网络科技有限公司 Applied environment changing method and device

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109240755A (en) * 2018-06-28 2019-01-18 平安科技(深圳)有限公司 A kind of configuration file comparison method and configuration file Compare System
CN109325363A (en) * 2018-09-26 2019-02-12 平安普惠企业管理有限公司 Management method, device, computer equipment and the storage medium of authority information
CN109324970A (en) * 2018-09-28 2019-02-12 平安普惠企业管理有限公司 SDK running environment detection method, device, computer equipment and storage medium
CN109684201A (en) * 2018-11-26 2019-04-26 平安科技(深圳)有限公司 It is switched fast the method, apparatus, computer equipment and storage medium of running environment
CN109828779A (en) * 2018-12-26 2019-05-31 中国平安人寿保险股份有限公司 Environment changing method, apparatus, terminal installation and storage medium
CN110147241A (en) * 2019-04-16 2019-08-20 平安普惠企业管理有限公司 Program configures update method, electronic device, computer equipment and storage medium
CN110333999B (en) * 2019-05-06 2021-02-23 盛威时代科技集团有限公司 Method for switching test environments of mobile phone client
CN110333999A (en) * 2019-05-06 2019-10-15 北京盛威时代科技有限公司 A method of test environment changing is carried out for cell phone client
CN112711542B (en) * 2019-05-06 2023-12-01 盛威时代科技集团有限公司 Method for switching testing environment of mobile phone client
CN112711542A (en) * 2019-05-06 2021-04-27 盛威时代科技集团有限公司 Method for switching test environments of mobile phone client
CN110351134A (en) * 2019-06-28 2019-10-18 北京你财富计算机科技有限公司 A kind of server environment switching method, device and electronic equipment
CN111538542A (en) * 2020-03-24 2020-08-14 中国平安人寿保险股份有限公司 System configuration method and related device
CN111538542B (en) * 2020-03-24 2023-10-24 中国平安人寿保险股份有限公司 System configuration method and related device
CN111694612A (en) * 2020-05-28 2020-09-22 平安普惠企业管理有限公司 Configuration checking method, device, computer system and storage medium
CN112083963A (en) * 2020-09-04 2020-12-15 深圳市视美泰技术股份有限公司 System function configuration method based on external storage medium and related equipment
CN112671566A (en) * 2020-12-16 2021-04-16 平安普惠企业管理有限公司 Data processing method and device, computer equipment and readable storage medium
CN112671566B (en) * 2020-12-16 2023-09-19 杭州云之盟科技有限公司 Data processing method, apparatus, computer device and readable storage medium
CN113190425A (en) * 2021-04-28 2021-07-30 北京京东振世信息技术有限公司 Resource switching method and device
CN113190425B (en) * 2021-04-28 2023-09-22 北京京东振世信息技术有限公司 Resource switching method and device

Similar Documents

Publication Publication Date Title
CN107861863A (en) Running environment switching method, equipment and computer-readable recording medium
EP3367722B1 (en) Electronic device and method for determining suitable location of access point device thereof
CN107423794B (en) Code scanning method and device for graphic coding and mobile terminal
CN111142930B (en) Installation package file packaging method and device, terminal device and storage medium
CN106294108B (en) Application program testing method and device
CN108549826B (en) Application program checking method, terminal, server and readable storage medium
CN110035181B (en) Method and terminal for setting theme of quick application card
CN108668328B (en) Network switching method and mobile terminal
CN113395337B (en) Method and device for preventing browser webpage from being hijacked, electronic equipment and storage medium
CN107864066A (en) Offline H5 pages monitoring method, device, equipment and readable storage medium storing program for executing
CN106598582A (en) Mobile terminal and desk application display method and apparatus therefor
CN113313804A (en) Image rendering method and device, electronic equipment and storage medium
MX2014008884A (en) Mobile terminal resource processing method, device and apparatus.
CN115174418A (en) Communication environment safety early warning method and device, electronic equipment and storage medium
CN109218082B (en) Network configuration parameter processing method, device and equipment
CN109522741B (en) Application program permission prompting method and terminal equipment thereof
CN109126124B (en) Engine adaptation method, related device and computer readable storage medium
CN113207115B (en) Mobile terminal and network searching control method
CN111966373B (en) APN resetting method, terminal equipment and storage medium
CN109316751B (en) Game adaptation method, related device and computer-readable storage medium
CN107995669B (en) Display method of wireless access point AP information and mobile terminal
CN111381845A (en) Software gray scale upgrading method and device, storage medium, terminal and server
CN111356096B (en) Information sending method and electronic equipment
CN112987597A (en) FSU control method, device, equipment and computer readable storage medium
CN112997507B (en) Audio system control method, device, terminal and computer readable storage medium

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180330