CN107861863A - Running environment switching method, equipment and computer-readable recording medium - Google Patents
Running environment switching method, equipment and computer-readable recording medium Download PDFInfo
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 40
- 238000012360 testing method Methods 0.000 claims abstract description 62
- 230000007613 environmental effect Effects 0.000 claims description 32
- 238000004519 manufacturing process Methods 0.000 claims description 28
- 230000008859 change Effects 0.000 description 5
- 238000004891 communication Methods 0.000 description 5
- 238000001514 detection method Methods 0.000 description 5
- 238000011056 performance test Methods 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 238000010586 diagram Methods 0.000 description 3
- 238000011990 functional testing Methods 0.000 description 3
- 238000012856 packing Methods 0.000 description 3
- 230000006978 adaptation Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000005484 gravity Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000011076 safety test Methods 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 230000001133 acceleration Effects 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000005314 correlation function Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/3668—Testing of software
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/34—Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
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
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.
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 (17)
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 operating 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 for switching test environments on mobile phone clients |
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 |
CN112433943A (en) * | 2020-11-25 | 2021-03-02 | 平安普惠企业管理有限公司 | Method, device, equipment and medium for detecting environment variable based on abstract syntax tree |
CN112671566A (en) * | 2020-12-16 | 2021-04-16 | 平安普惠企业管理有限公司 | Data processing method and device, computer equipment and readable storage medium |
CN113110846A (en) * | 2021-04-28 | 2021-07-13 | 网易传媒科技(北京)有限公司 | Method and device for acquiring environment variable |
CN113190425A (en) * | 2021-04-28 | 2021-07-30 | 北京京东振世信息技术有限公司 | Resource switching method and device |
CN113760384A (en) * | 2021-01-04 | 2021-12-07 | 北京沃东天骏信息技术有限公司 | Application environment switching method, device, computer system and readable storage medium |
WO2024222194A1 (en) * | 2023-04-27 | 2024-10-31 | 易保网络技术(上海)有限公司 | Method for acquiring configuration information, electronic device, and medium |
Citations (6)
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 |
-
2017
- 2017-08-24 CN CN201710741726.4A patent/CN107861863A/en active Pending
Patent Citations (6)
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 (25)
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 operating 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 for switching test environments on mobile phone clients |
CN110333999B (en) * | 2019-05-06 | 2021-02-23 | 盛威时代科技集团有限公司 | A method for mobile client to switch test environment |
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 |
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 |
CN112083963B (en) * | 2020-09-04 | 2024-04-16 | 深圳市视美泰技术股份有限公司 | System function configuration method based on external storage medium and related equipment |
CN112433943A (en) * | 2020-11-25 | 2021-03-02 | 平安普惠企业管理有限公司 | Method, device, equipment and medium for detecting environment variable based on abstract syntax tree |
CN112671566B (en) * | 2020-12-16 | 2023-09-19 | 杭州云之盟科技有限公司 | Data processing method, apparatus, computer device and readable storage medium |
CN112671566A (en) * | 2020-12-16 | 2021-04-16 | 平安普惠企业管理有限公司 | Data processing method and device, computer equipment and readable storage medium |
CN113760384A (en) * | 2021-01-04 | 2021-12-07 | 北京沃东天骏信息技术有限公司 | Application environment switching method, device, computer system and readable storage medium |
CN113190425B (en) * | 2021-04-28 | 2023-09-22 | 北京京东振世信息技术有限公司 | Resource switching method and device |
CN113190425A (en) * | 2021-04-28 | 2021-07-30 | 北京京东振世信息技术有限公司 | Resource switching method and device |
CN113110846A (en) * | 2021-04-28 | 2021-07-13 | 网易传媒科技(北京)有限公司 | Method and device for acquiring environment variable |
CN113110846B (en) * | 2021-04-28 | 2025-01-10 | 网易传媒科技(北京)有限公司 | A method and device for obtaining environment variables |
WO2024222194A1 (en) * | 2023-04-27 | 2024-10-31 | 易保网络技术(上海)有限公司 | Method for acquiring configuration information, electronic device, and medium |
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 | |
CN111142930B (en) | Installation package file packaging method and device, terminal device and storage medium | |
CN106775828B (en) | Application program installation method and device and computer equipment | |
CN108549826B (en) | Application program checking method, terminal, server and readable storage medium | |
CN107423794B (en) | Code scanning method and device for graphic coding and mobile terminal | |
CN113395337B (en) | Method and device for preventing browser webpage from being hijacked, electronic equipment and storage medium | |
CN106294108B (en) | Application program testing method and device | |
CN109126124B (en) | Engine adaptation method, related device and computer readable storage medium | |
CN108668328B (en) | Network switching method and mobile terminal | |
CN113313804A (en) | Image rendering method and device, electronic equipment and storage medium | |
CN111818499B (en) | Quick pairing method, device, equipment and computer readable storage medium | |
CN111381845A (en) | Software gray scale upgrading method and device, storage medium, terminal and server | |
MX2014008884A (en) | Mobile terminal resource processing method, device and apparatus. | |
CN109218082B (en) | Network configuration parameter processing method, device and equipment | |
CN109522741B (en) | Application program permission prompting method and terminal equipment thereof | |
CN109316751B (en) | Game adaptation method, related device and computer-readable storage medium | |
CN113207115B (en) | Mobile terminal and network searching control method | |
CN110647418A (en) | Exception handling method, server and mobile terminal | |
CN107908527B (en) | Application icon display method and device | |
CN111966373B (en) | APN resetting method, terminal equipment and storage medium | |
CN106332058A (en) | Data transmission method and terminal equipment | |
CN107995669B (en) | Display method of wireless access point AP information and mobile terminal | |
CN114006844B (en) | WIFI throughput test method, WIFI throughput test device and computer readable storage medium | |
CN113168303A (en) | Audio processing method and device, computer readable storage medium and electronic equipment |
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 |