CN106681714A - Method and device for setting program environments and electronic equipment - Google Patents

Method and device for setting program environments and electronic equipment Download PDF

Info

Publication number
CN106681714A
CN106681714A CN201611118728.XA CN201611118728A CN106681714A CN 106681714 A CN106681714 A CN 106681714A CN 201611118728 A CN201611118728 A CN 201611118728A CN 106681714 A CN106681714 A CN 106681714A
Authority
CN
China
Prior art keywords
program
flag bit
interface
environment
environmental
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
CN201611118728.XA
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.)
LeTV Holding Beijing Co Ltd
LeTV Sports Culture Develop Beijing Co Ltd
Original Assignee
LeTV Holding Beijing Co Ltd
LeTV Sports Culture Develop Beijing 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 LeTV Holding Beijing Co Ltd, LeTV Sports Culture Develop Beijing Co Ltd filed Critical LeTV Holding Beijing Co Ltd
Priority to CN201611118728.XA priority Critical patent/CN106681714A/en
Publication of CN106681714A publication Critical patent/CN106681714A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The invention relates to a method and device for setting program environments and electronic equipment. The method for setting the program environment comprises the steps that a testing environment interface and an application environment interface are set for a program; a zone bit is established in the program, wherein the zone bit is used for indicating the environment type of the program, and the environment type of the program comprises a testing environment and an application environment; when it is detected that the zone bit is modified, the environment interface corresponding to the environment type indicated by the modified zone bit is used for receiving and sending data. According to the method and device for setting the program environments and the electronic equipment, a formal environment interface and the testing environment interface corresponding to a program data request interface only need to be set once, it is only needed to switch access data environments according to debugging or online demands in the program version updating process, therefore, user operation can be simplified, time can be saved, and the development efficiency can be improved.

Description

Program environment method to set up, device and electronic equipment
Technical field
The present invention relates to software environment arranges technical field, more particularly to a kind of program environment method to set up, device and electricity Sub- equipment.
Background technology
As the application of the electronic equipment of the development of science and technology, various intelligent terminal etc. incorporates more and more the work of people And life.Various application programs are installed on intelligent terminal can enrich its function, application.With developing rapidly for network technology, The more needs of various application programs in intelligent terminal are interacted with network.Therefore, in the development process of application program not It is evitable the network resource accession function of application program to be tested.
Inventor has found problems with during the present invention is realized:In application program debugging process, in order to realize The network resource accession test of application program, needs the data request interface for the application program to arrange corresponding testing service Device, for example, can be the network address of the application program installation kit setting testing service device for needing debugging, so as to application program energy Enough access the resource in testing service device.And when application program is reached the standard grade, then need the data request interface for the application program Corresponding formal server is set, for example, the data request interface of application program is corresponded to the network address of formal server so that Application program can access the resource of formal server.Also, produce sometimes in the exploitation of application program and test process New demand (being such as sub- application), and the development progress of these new demands possibility is different, and (such as, an a little application is gone up Line, another a little application is also in test phase), this is resulted in needs to be that the different each son of progress (is created using continually build Build) server corresponding to data request interface, cause test development inefficiency.At present, general solution is difference It is the application program packing casual network interface that can be reached the standard grade to need the application program packing debugging network interface of debugging.I.e. Pack respectively debugging network interface and casual network interface.But so it is accomplished by continually connecing for application program packet network Mouthful, more repetitive operation is produced, cause the serious waste of time.
The content of the invention
The purpose of embodiment of the present invention is to provide a kind of method to set up of program environment, device and electronic equipment, is made The corresponding formal environments interface of calling program data request interface and test environment interface only need to arrange once, and in program version more During new, according to debugging or demand of reaching the standard grade is switched over to the data environment for accessing, so as to be conducive to simplifying user Operation, time-consuming, raising development efficiency.
In a first aspect, The embodiment provides a kind of program environment method to set up, including:Arrange for program and test Environmental interface and applied environment interface;Flag bit is created in a program;Wherein, the flag bit is used to indicate the ring of described program Border type, the environmental form of described program includes test environment and applied environment;When detecting the flag bit and being changed, with The corresponding environmental interface transceiving data of environmental form indicated by amended flag bit.
Second aspect, The embodiment provides a kind of program environment arranges device, including:First setup module, For arranging test environment interface and applied environment interface for program;Flag bit creation module, for creating mark in a program Position;Wherein, the flag bit is used to indicating the environmental form of described program, the environmental form of described program include test environment and Applied environment;Detection module, for detecting whether the flag bit is changed;Transceiver module, in detection module inspection When measuring the flag bit and being changed, number is received and dispatched with the corresponding environmental interface of environmental form indicated by amended flag bit According to.
The third aspect, The embodiment provides a kind of electronic equipment, including:At least one processor;And, with The memorizer of at least one processor communication connection;Wherein, the memory storage has can be processed by described at least one The instruction that device is performed, the instruction is by least one computing device, so that at least one processor can:For journey Sequence arranges test environment interface and applied environment interface;Flag bit is created in a program;Wherein, the flag bit is used to indicate institute The environmental form of program is stated, the environmental form of described program includes test environment and applied environment;When detecting the flag bit When being changed, with the corresponding environmental interface transceiving data of environmental form indicated by amended flag bit.
Fourth aspect, The embodiment provides a kind of computer program, including being stored in non-transient calculating Computer program on machine readable storage medium storing program for executing, computer program includes programmed instruction, when programmed instruction is computer-executed, Computer is set to perform any of the above-described program environment method to set up of the embodiment of the present invention.
5th aspect, The embodiment provides a kind of nonvolatile computer storage media, be stored with computer Executable instruction, computer executable instructions are used to perform embodiment of the present invention any of the above-described program environment method to set up.
It is that program arranges test environment interface and applied environment connects in the program environment method to set up of the embodiment of the present invention Mouthful, and flag bit is created in a program, wherein flag bit is used for the environmental form of instruction program, and the environmental form of program includes surveying Test ring border and applied environment, when detecting flag bit and being changed, with the environmental form correspondence indicated by amended flag bit Environmental interface transceiving data, i.e., the environment (test environment or applied environment) for accessing can be needed automatically by journey according to program The data transmit-receive of sequence switches to corresponding environmental interface.Therefore, no matter program occurs how many times version updating (produces how many times Debugging efforts), user (developer) only need for program arrange an environmental interface (test environment interface and applied environment connect Mouthful), and when needing to use certain environment, dirty bit can be automatically obtained environment changing, so as to be conducive to simplifying environment Operation, time-consuming, raising development efficiency are set.
In addition, described program includes N number of sub- application;Wherein, the N is the natural number more than 1;It is described to create in a program Flag bit, specifically includes:Each son application for described program is respectively created flag bit;It is described with indicated by amended flag bit The corresponding environmental interface transceiving data of environmental form, specifically include:Respectively amended flag bit institute is applied with each son The corresponding environmental interface transceiving data of environmental form of instruction.Flag bit is respectively provided with by each son application for program so that The data request interface of each sub- application respectively to having test environment interface and applied environment interface, and in the mark of each sub- application When will position is changed, the data request interface corresponding to its amended flag bit can automatically switch, so that program is more Individual data request interface can automatically switch needs the environment of access.
In addition, described create after flag bit in a program, also include:The switching entrance of the flag bit is set;If institute State switching entrance and detect predetermined registration operation, then the setting interface for arranging the flag bit is provided.Consequently facilitating user's modification Flag bit.
In addition, the predetermined registration operation includes one below:The trigger action of preset times;Default gesture.
In addition, the switching entrance is hidden in the interface of described program.So as to prevent non-developer from using program Debugging function.
In addition, described provided for after the setting interface for arranging the flag bit, also including:By the flag bit for receiving Value preserve into local flag bit storage file.Because the value of flag bit can indicate that different environmental interface (test environments Interface or applied environment interface), and the data volume of the value of flag bit is less than the data volume of environmental interface, it is possible to save this Ground memory space, and network traffic data can be reduced.
Description of the drawings
Fig. 1 is the flow chart according to first embodiment of the invention program environment method to set up;
Fig. 2 is the flow chart according to second embodiment of the invention program environment method to set up;
Fig. 3 is the structural representation that device is arranged according to third embodiment of the invention program environment;
Fig. 4 is the structural representation that device is arranged according to four embodiment of the invention program environment;
Fig. 5 is the structural representation according to fifth embodiment of the invention electronic equipment.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with each reality of the accompanying drawing to the present invention The mode of applying is explained in detail.However, it will be understood by those skilled in the art that in each embodiment of the invention, In order that reader more fully understands the application and proposes many ins and outs.But, even if without these ins and outs and base Many variations and modification in following embodiment, it is also possible to realize the application technical scheme required for protection.
The first embodiment of the present invention is related to a kind of program environment method to set up.It can apply to it is various need access The program of network, these programs are included but is not limited to:Application program, system program etc..Its idiographic flow is as shown in Figure 1.The journey Sequence ambient As method is comprised the following steps:
Step 101:For program, test environment interface and applied environment interface are set.
Step 102:Flag bit is created in a program.
Step 103:Judge whether that detecting flag bit is changed.When detecting flag bit and being changed, execution step 104, when being not detected by flag bit and being changed, continue executing with step 103.
Step 104:With the corresponding environmental interface transceiving data of environmental form indicated by amended flag bit.
Wherein, in step 101, a program is generally interacted with specific server, with from the particular server Resource is obtained, the network address of the particular server can be the network address for for example starting with " www ".One program is upper The resource environment accessed after line is formal server environment, and the corresponding network address of formal server environment is applied environment Interface, correspondingly, a program still in exploitation debugging process, the network environment accessed based on the purpose of debugging is referred to as surveyed Test ring border, the address of test environment is test environment interface.Therefore, test environment interface and applied environment interface refer both to the journey The data request interface of sequence needs the address of the server for accessing.In general, test environment interface is with applied environment interface not Together.
It is that program arranges test environment interface and applied environment interface for example can be by the peace in program in step 101 Arrange test environment interface and applied environment interface in dress bag simultaneously to realize.When the test environment interface and applied environment of program After interface is decided, you can to add test environment interface and applied environment interface in the installation kit of program.
In step 102, flag bit is created in a program, wherein, flag bit is used for the environmental form of instruction program, program Environmental form is two kinds of environmental forms of test environment and applied environment.
In prior art, when the installation kit debugging of program completes to reach the standard grade, need to be individually for program setting data Request interface, will the data request interface of program be set to applied environment interface.When being updated to program, need to more When new program is debugged, in addition it is also necessary to which the program for being individually for updating arranges data request interface, and now, being will be to be debugged The data request interface of program is set to test environment interface.As can be seen here, it is existing whenever an installation kit is produced, either may be used With the installation kit reached the standard grade, it is desired nonetheless to the installation kit of debugging, it is required for user (developer) to be manually individually its setting data Request interface, it is cumbersome.And in the present embodiment, when in a program while being provided with test environment interface, applied environment After interface and flag, in step 103, when user needs the test environment interface or applied environment of access program to connect During mouth, it is only necessary to the value of dirty bit, when the value for detecting flag bit is changed, at step 104, you can by the number of program The corresponding environmental interface of amended flag is switched to according to request interface.For example, when the data request interface of program When the value of flag bit is " isDebug ", the data request interface of program is switched to into test environment interface, when the data of program please Ask interface flag bit value be " True " when, by the data request interface of program switch to applied environment interface, i.e. program with The corresponding environmental interface transceiving data of environmental form indicated by amended flag bit, so as to from different server (i.e. ring Border) interaction.
To sum up, using the program environment method to set up of the present embodiment, when the version of program is constantly updated, user is without the need for pin To the version of reaching the standard grade of program, either this difference of debugging version is manually its setting test environment interface or applied environment interface, and only The switching of the data request interface of program is automatically performed by the value for needing the flag bit in modification program, such that it is able to simplify use Family operation, time-consuming, raising program development efficiency.
Second embodiment of the present invention is related to a kind of program environment method to set up.Second embodiment is in the first embodiment party Improvement is made on the basis of formula, is mainly theed improvement is that:In this second embodiment, for the modification of flag bit increased guarantor Shield measure, it is to avoid disabled user uses the debugging function of program.
Specifically, as shown in Fig. 2 the program environment method to set up of second embodiment is comprised the following steps:
Step 201:For program, test environment interface and applied environment interface are set.
Step 202:Flag bit is created in a program.Wherein, flag bit is used for the environmental form of instruction program, the ring of program Border type includes test environment and applied environment.
Step 203:The switching entrance of flag bit is set in a program.
Step 204:Judge whether detect predetermined registration operation in switching entrance.If detecting predetermined registration operation, execution step 205, if being not detected by predetermined registration operation, execution step 204.
Step 205:Setting interface for arranging flag bit is provided.
Step 206:Judge whether that detecting flag bit is changed.If detecting flag bit to be changed, execution step 207, if be not detected by flag bit being changed, execution step 206.
Step 207:Received using the corresponding environmental interface of environmental form indicated by amended flag bit with each son respectively Send out data.
Step 208:The value of the flag bit for receiving is preserved into local flag bit storage file.
Wherein, in step 203, the switching entrance to prevent flag bit is found by domestic consumer, can be hidden in journey In the interface of sequence.Specifically, switching entrance can be set in the blank position of the access times of the program less page.For example, Switching entrance can be set on the page (access times of the generally page are less) of " with regard to us " of program.In order to avoid Flag bit being directly entered in switching entrance and interface being set, dirty bit can be with one stealth of setting of switching porch Button, and in step 204, judge that predetermined registration operation can be preset times when whether switching entrance detects predetermined registration operation The trigger action (for example, operation of adopting consecutive click chemical reaction hidden button) of (such as 6 times), or predetermined registration operation can also be default Gesture etc..Present embodiment is not restricted to predetermined registration operation and its detection mode.When detecting predetermined registration operation in step 204 When, into step 205.
In step 205, there is provided for arranging the setting interface of flag bit.It should be noted that providing in step 205 Setting interface modification flag bit for arranging flag bit when, can also arrange cryptoguard, i.e. user needs input correct Password could realize that flag bit is changed.In present embodiment, when program is applied including multiple sons, wherein, per height application tool There is respective data request interface, each son application can be respectively flag bit is set.Therefore, in step 202., when in a program When creating flag bit, flag bit can be individually created for each son application.And provide in step 205 for arranging flag bit Arrange on interface, can simultaneously provide for the setting interface that each son application arranges flag bit.
In step 206, when the flag bit for detecting sub- application is changed, in step 207, respectively with each sub- application The corresponding environmental interface transceiving data of environmental form indicated by amended flag bit
In a step 208, the value of the flag bit for receiving is preserved into local flag bit storage file.For example, journey is worked as When sequence only includes a data request interface, the value of the flag bit stored in the flag bit storage file is, for example, " isDebug " Or " True ", when program includes multiple flag bits (when program includes multiple data request interfaces), the flag bit storage The value of multiple flag bits is stored in file.
It is noted that when multiple flag bits are provided with program, can also in a program arrange a flag bit Control knob, the value of all flag bits that the flag bit control knob is used in modification program simultaneously, for example, when flag bit control When the value of button is set to " True ", the value of all flag bits is disposed as " True " in program, when flag bit control knob When value is set to " isDebug ", the value of all flag bits is respectively provided with " isDebug " in program, so, when all sons of program should With when debugging is completed, disposably applied environment can be switched to connect the environmental interface of program by flag bit control knob Mouthful, when program development completes to need debugging, disposably all data request interfaces of program can be switched to into test environment Interface, it is easy to operate.
Using the program environment method to set up of the present embodiment, by arranging switching entrance in program interface, facilitate user (developer) changes the data request interface of program, also, by detecting that predetermined registration operation and setting password can be further Ensure that flag bit is not illegally modified, it is to avoid domestic consumer uses the debugging function of program.
Above the step of various methods divide, be intended merely to description it is clear, can merge into when realizing a step or Some steps are split, multiple steps are decomposed into, as long as comprising identical logical relation, all in the protection domain of this patent It is interior;To either adding inessential modification in algorithm in flow process or introducing inessential design, but its algorithm is not changed With the core design of flow process all in the protection domain of the patent.
Third embodiment of the invention is related to a kind of program environment and arranges device, and it can apply to various need to access net The program of network, these programs are included but is not limited to:Application program, system program etc..As shown in figure 3, the program environment arranges dress Putting 30 includes:
First setup module 301, for arranging test environment interface and applied environment interface for program.
Flag bit creation module 302, for creating flag bit in a program.Wherein, flag bit is used for the ring of instruction program Border type, the environmental form of program includes test environment and applied environment.
Detection module 303, for detecting whether flag bit is changed.
Transceiver module 304, for when detection module 303 detects flag bit and changed, with amended flag bit institute The corresponding environmental interface transceiving data of environmental form of instruction.
In present embodiment, a program is generally interacted with specific server, to obtain from the particular server Resource is taken, the network address of the particular server can be the network address for for example starting with " www ".One program is being reached the standard grade The resource environment for being accessed later is formal server environment, and the corresponding network address of formal server environment connects for applied environment Mouthful, correspondingly, a program still in exploitation debugging process, the network environment accessed based on the purpose of debugging is referred to as tested Environment, the address of test environment is test environment interface.Therefore, test environment interface and applied environment interface refer both to the program Data request interface need access server address.In general, test environment interface is different from applied environment interface.
In present embodiment, the first setup module 301 for example can be by arranging test simultaneously in the installation kit of program Environmental interface and applied environment interface arrange test environment interface and applied environment interface being embodied as program.Specifically, journey is worked as After the test environment interface and applied environment interface of sequence are decided, the first setup module 301 i.e. can be in the installation of program Add test environment interface and applied environment interface in bag.
Flag bit creation module 302, specifically for creating flag bit in a program, wherein, flag bit is used for instruction program Environmental form, the environmental form of program is two kinds of environmental forms of test environment and applied environment.
In present embodiment, when user needs the test environment interface or applied environment interface of access program, it is only necessary to The value of dirty bit.Now, detection module 303 be used for detect whether flag bit is changed, when the value quilt for detecting flag bit During modification, transceiver module 304 is used for the corresponding environmental interface transceiving data of environmental form indicated by amended flag bit. For example, when the value of the flag bit of the data request interface of a program is " isDebug ", transceiver module 304 is used to test Environmental interface transceiving data, i.e. program are interacted with testing service device, when the value of the flag bit of the data request interface of program is When " True ", transceiver module 304 is used for applied environment interface transceiving data, i.e. program and the server interaction formally reached the standard grade.
The program environment of the present embodiment arranges device, and when the version of program is constantly updated, user need not be directed to program Reaching the standard grade, either this difference of debugging version is manually its setting test environment interface or applied environment interface to version, and only needs modification The value of the flag bit in program can be automatically performed program data request interface switching, such that it is able to simplify user operation, Time-consuming, raising program development efficiency.
It is seen that, present embodiment is the system embodiment corresponding with first embodiment, and present embodiment can be with First embodiment is worked in coordination enforcement.The relevant technical details mentioned in first embodiment still have in the present embodiment Effect, in order to reduce repetition, repeats no more here.Correspondingly, the relevant technical details mentioned in present embodiment are also applicable in In first embodiment.
It is noted that each module involved in present embodiment is logic module, in actual applications, one Individual logical block can be a part for a physical location, or a physical location, can be with multiple physics lists The combination of unit is realized.Additionally, the innovative part in order to project the present invention, will not be with solution institute of the present invention in present embodiment The unit that the technical problem relation of proposition is less close is introduced, but this is not intended that in present embodiment there are no other lists Unit.
Four embodiment of the invention is related to a kind of program environment and arranges device.4th embodiment is in the 3rd embodiment On the basis of make improvement, mainly the improvement is that:In the 4th embodiment, for the modification of flag bit increased protection Measure, it is to avoid disabled user uses the debugging function of program.
Specifically, as shown in figure 4, the program environment setting device 30 of present embodiment includes:
First setup module 301, for arranging test environment interface and applied environment interface for program.
Flag bit creation module 302, for creating flag bit in a program.Wherein, flag bit is used for the ring of instruction program Border type, the environmental form of program includes test environment and applied environment.
Detection module 303, for detecting whether flag bit is changed.
Transceiver module 304, for when detection module 303 detects flag bit and changed, with amended flag bit institute The corresponding environmental interface transceiving data of environmental form of instruction.
Wherein, the first setup module 301 is additionally operable to arrange the switching entrance of flag bit.
Detection module 303 is additionally operable in switching entrance detection predetermined registration operation.First setup module 301 is additionally operable in detection mould When block detects predetermined registration operation, there is provided for arranging the setting interface of flag bit.
Program environment arranges device 30 also includes preserving module 305, and preserving module 305 is used for the mark place value that will be received Preserve into local flag bit storage file.
Specifically, the switching entrance to prevent flag bit is found that the first setup module 301 will can cut by domestic consumer Change to mouth to hide in the interface of the program of being arranged at.For example, can install in the space bit of the less page of the access times of program Put switching entrance.Such as, can arrange on the page (access times of the generally page are less) of " with regard to us " of program Switching entrance.In order to avoid being directly entered flag bit in switching entrance, interface, dirty bit, the first setup module 301 are set Can be so that in the button of switching porch one stealth of setting, detection module 303 can also judge whether detect in switching entrance During to predetermined registration operation, predetermined registration operation can be trigger action (for example, adopting consecutive click chemical reaction hidden button of preset times (such as 6 times) Operation), or predetermined registration operation can also be for default gesture etc..Present embodiment to predetermined registration operation and its detection mode not It is restricted.When detection module 303 detects predetermined registration operation, the first setup module 302 is triggered.
First setup module 301 is additionally operable to when detection module 303 detects predetermined registration operation, there is provided for arranging flag bit Setting interface.In present embodiment, when program is applied including multiple sons, wherein, there are respective data per height application Request interface, flag bit creation module 303 can be respectively each son application and arrange flag bit.Now, in the first setup module 301 The setting interface for arranging flag bit for providing, can simultaneously be provided as each son application and arrange flag bit.
Detection module 303 is additionally operable to when the flag bit for detecting sub- application is changed, and triggers transceiver module 304, transmitting-receiving Module 304 is used for each son using the corresponding environmental interface transceiving data of environmental form indicated by amended flag bit.
In present embodiment, preserving module 305 is specifically for the value of the flag bit for receiving is preserved to local flag bit In storage file.For example, when program only includes a data request interface, the flag bit stored in the flag bit storage file Value be, for example, " isDebug " or " True ", when program include multiple flag bits when (program connects including multiple request of data During mouth), the value of multiple flag bits is stored in the flag bit storage file.
Device is arranged using the program environment of the present embodiment, by arranging switching entrance in program interface, facilitates user (developer) changes the data request interface of program, also, by detecting that predetermined registration operation and setting password can be further Ensure that flag bit is not illegally modified, it is to avoid domestic consumer uses the debugging function of program.
Because second embodiment is mutually corresponding with present embodiment, therefore present embodiment can be mutual with second embodiment It is engaged enforcement.The relevant technical details mentioned in second embodiment still effectively, are implemented in the present embodiment second The technique effect to be reached in mode is in the present embodiment similarly it is achieved that in order to reduce repetition, no longer go to live in the household of one's in-laws on getting married here State.Correspondingly, the relevant technical details mentioned in present embodiment are also applicable in second embodiment.
Fifth embodiment of the invention is related to a kind of electronic equipment, as shown in figure 5, the electronic equipment includes:Communicator 501st, one or more processors 502, input/output unit 503 and memorizer 504, be with a processor 502 in Fig. 5 Example.
Communicator 501, processor 502, input/output unit 503 and memorizer 504 can by bus or its He connects mode, in Fig. 5 as a example by being connected by bus.
Memorizer 504 can be used to store non-volatile software journey as a kind of non-volatile computer readable storage medium storing program for executing Sequence, non-volatile computer executable program and module, the program environment method to set up such as in the embodiment of the present invention.Processor 502 are stored in the non-volatile software program in memorizer 504, instruction and module by operation, so as to perform various functions Using and data processing, that is, realize the program environment method to set up in said method embodiment.
Memorizer 504 can include storing program area and storage data field, wherein, storing program area can store operation system Program required for system, at least one function;Storage data field can store the data created for program environment method to set up Deng.Additionally, memorizer 504 can include high-speed random access memory, nonvolatile memory can also be included, for example, at least One disk memory, flush memory device or other non-volatile solid state memory parts.In certain embodiments, memorizer 504 It is optional including relative to the remotely located memorizer of processor 502, these remote memories can be by network connection to being used for The processor 502 of program environment method to set up.The example of above-mentioned network includes but is not limited to the Internet, intranet, local Net, mobile radio communication and combinations thereof.
Input/output unit 503 can receives input numeral or character information, and produce for program environment setting side The key signals input that the user of method is arranged and function control is relevant.Input/output unit 503 may include that display screen etc. shows and set It is standby.
One or more of module stores in the memorizer 504, when by one or more of processors During 502 execution, the program environment method to set up in above-mentioned any means embodiment is performed.
The method that the executable embodiment of the present invention of the said goods is provided, possesses the corresponding functional module of execution method and has Beneficial effect.Ins and outs of detailed description in the present embodiment, not can be found in the method that the embodiment of the present invention is provided.
The electronic equipment of the embodiment of the present invention is present in a variety of forms, including but not limited to:
(1) mobile communication equipment:The characteristics of this kind equipment is that possess mobile communication function, and to provide speech, data Communicate as main target.This Terminal Type includes:Smart mobile phone (such as iPhone), multimedia handset, feature mobile phone, and it is low End mobile phone etc..
(2) super mobile personal computer equipment:This kind equipment belongs to the category of personal computer, has calculating and processes work( Can, typically also possess mobile Internet access characteristic.This Terminal Type includes:PDA, MID and UMPC equipment etc., such as iPad.
(3) portable entertainment device:This kind equipment can show and play content of multimedia.The kind equipment includes:Audio frequency, Video player (such as iPod), handheld device, e-book, and intelligent toy and portable car-mounted navigator.
(4) server:The equipment for providing the service of calculating, the composition of server includes that processor, hard disk, internal memory, system are total Line etc., server is similar with general computer architecture, but due to needing to provide highly reliable service, therefore processing energy The aspects such as power, stability, reliability, safety, extensibility, manageability require higher.
(5) other have the electronic installation of data interaction function.
Compared with prior art, using the program environment method to set up of the present embodiment, when the version of program is constantly updated, User need not either debugging version be originally manually respectively its setting test environment interface or applies ring for the version of reaching the standard grade of program Border interface, and the switching of the data request interface of program is automatically performed by only needing the value of the flag bit in modification program, from And user operation, time-consuming, raising program development efficiency can be simplified.
Sixth embodiment of the invention is related to a kind of nonvolatile computer storage media, and the computer-readable storage medium is deposited Computer executable instructions are contained, the program environment that the computer executable instructions can perform in above-mentioned any means embodiment sets Put method.
Prior art is compared, and using the program environment method to set up of the present embodiment, when the version of program is constantly updated, is used Family need not either this difference of debugging version be manually its setting test environment interface or applied environment for the version of reaching the standard grade of program Interface, and the switching of the data request interface of program is automatically performed by only needing the value of the flag bit in modification program, so as to User operation, time-consuming, raising program development efficiency can be simplified.
Seventh embodiment of the invention is related to a kind of computer program, the journey being able to carry out in above-mentioned any means embodiment Sequence ambient As method.
Prior art is compared, and using the program environment method to set up of the present embodiment, when the version of program is constantly updated, is used Family need not either this difference of debugging version be manually its setting test environment interface or applied environment for the version of reaching the standard grade of program Interface, and the switching of the data request interface of program is automatically performed by only needing the value of the flag bit in modification program, so as to User operation, time-consuming, raising program development efficiency can be simplified.
It will be appreciated by those skilled in the art that realizing that all or part of step in above-described embodiment method can be by Program is completed to instruct the hardware of correlation, and the program storage is in a storage medium, including some instructions are used so that one Individual equipment (can be single-chip microcomputer, chip etc.) or processor (processor) perform the application each embodiment methods described All or part of step.And aforesaid storage medium includes:USB flash disk, portable hard drive, read only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disc or CD etc. are various can store journey The medium of sequence code.
It will be understood by those skilled in the art that the respective embodiments described above are to realize the specific embodiment of the present invention, And in actual applications, can in the form and details to it, various changes can be made, without departing from the spirit and scope of the present invention.

Claims (10)

1. a kind of program environment method to set up, it is characterised in that include:
For program, test environment interface and applied environment interface are set;
Flag bit is created in a program;Wherein, the flag bit is used to indicate the environmental form of described program, the ring of described program Border type includes test environment and applied environment;
When detecting the flag bit and being changed, with the corresponding environmental interface of environmental form indicated by amended flag bit Transceiving data.
2. program environment method to set up according to claim 1, it is characterised in that described program includes N number of sub- application;Its In, the N is the natural number more than 1;
It is described to create flag bit in a program, specifically include:
Each son application for described program is respectively created flag bit;
The corresponding environmental interface transceiving data of environmental form with indicated by amended flag bit, specifically includes:
Respectively with each son using the corresponding environmental interface transceiving data of environmental form indicated by amended flag bit.
3. program environment method to set up according to claim 1, it is characterised in that described to create flag bit in a program Afterwards, also include:
The switching entrance of the flag bit is set;
If detecting predetermined registration operation in the switching entrance, the setting interface for arranging the flag bit is provided.
4. program environment method to set up according to claim 3, it is characterised in that the predetermined registration operation is included with purgation One:
The trigger action of preset times;
Default gesture.
5. the program environment method to set up according to claim 3 or 4, it is characterised in that the switching entrance is hidden in institute In stating the interface of program.
6. program environment method to set up according to claim 3, it is characterised in that the offer is used to arrange the mark After the setting interface of position, also include:
The mark place value for receiving is preserved into local flag bit storage file.
7. a kind of program environment arranges device, it is characterised in that include:
First setup module, for arranging test environment interface and applied environment interface for program;
Flag bit creation module, for creating flag bit in a program;Wherein, the flag bit is used to indicate the ring of described program Border type, the environmental form of described program includes test environment and applied environment;
Detection module, for detecting whether the flag bit is changed;
Transceiver module, for when the detection module detects the flag bit and changed, with amended flag bit indication The corresponding environmental interface transceiving data of environmental form for showing.
8. program environment according to claim 7 arranges device, it is characterised in that
First setup module is additionally operable to arrange the switching entrance of the flag bit;
The detection module is additionally operable in the switching entrance detection predetermined registration operation;
First setup module is additionally operable to when the detection module detects predetermined registration operation, there is provided for arranging the mark The setting interface of position.
9. program environment according to claim 8 arranges device, it is characterised in that described program ambient As device is also wrapped Include preserving module;
The preserving module is used to the mark place value for receiving is preserved into local flag bit storage file.
10. a kind of electronic equipment, it is characterised in that include:At least one processor;And,
The memorizer being connected with least one processor communication;Wherein,
The memory storage has can be by the instruction of at least one computing device, and the instruction is by described at least one Reason device is performed, so that at least one processor can:
For program, test environment interface and applied environment interface are set;
Flag bit is created in a program;Wherein, the flag bit is used to indicate the environmental form of described program, the ring of described program Border type includes test environment and applied environment;
When detecting the flag bit and being changed, with the corresponding environmental interface of environmental form indicated by amended flag bit Transceiving data.
CN201611118728.XA 2016-12-07 2016-12-07 Method and device for setting program environments and electronic equipment Pending CN106681714A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611118728.XA CN106681714A (en) 2016-12-07 2016-12-07 Method and device for setting program environments and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611118728.XA CN106681714A (en) 2016-12-07 2016-12-07 Method and device for setting program environments and electronic equipment

Publications (1)

Publication Number Publication Date
CN106681714A true CN106681714A (en) 2017-05-17

Family

ID=58867936

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611118728.XA Pending CN106681714A (en) 2016-12-07 2016-12-07 Method and device for setting program environments and electronic equipment

Country Status (1)

Country Link
CN (1) CN106681714A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107995059A (en) * 2017-11-27 2018-05-04 北京酷我科技有限公司 A kind of iOS network tests strategy
CN109388553A (en) * 2017-08-09 2019-02-26 车伯乐(北京)信息科技有限公司 A kind of multi-environment test method, device, equipment and the readable medium of application program
CN110471847A (en) * 2019-08-02 2019-11-19 广东小天才科技有限公司 Network environment switching method, device, equipment and storage medium
CN111381836A (en) * 2018-12-29 2020-07-07 北京奇虎科技有限公司 Switching method and device of application program deployment environment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101233485A (en) * 2005-06-02 2008-07-30 数学工程公司 Calling of late bound functions from an external program environment
CN101299862A (en) * 2008-06-11 2008-11-05 中国电信股份有限公司 Telecommunication service generation environmental system
CN104268075A (en) * 2014-09-22 2015-01-07 广东欧珀移动通信有限公司 Test mode entry method and device and mobile terminal
CN104539483A (en) * 2014-12-31 2015-04-22 中国电子科技集团公司第五十研究所 Network testing system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101233485A (en) * 2005-06-02 2008-07-30 数学工程公司 Calling of late bound functions from an external program environment
CN101299862A (en) * 2008-06-11 2008-11-05 中国电信股份有限公司 Telecommunication service generation environmental system
CN104268075A (en) * 2014-09-22 2015-01-07 广东欧珀移动通信有限公司 Test mode entry method and device and mobile terminal
CN104539483A (en) * 2014-12-31 2015-04-22 中国电子科技集团公司第五十研究所 Network testing system

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109388553A (en) * 2017-08-09 2019-02-26 车伯乐(北京)信息科技有限公司 A kind of multi-environment test method, device, equipment and the readable medium of application program
CN107995059A (en) * 2017-11-27 2018-05-04 北京酷我科技有限公司 A kind of iOS network tests strategy
CN107995059B (en) * 2017-11-27 2020-11-03 北京酷我科技有限公司 iOS network test strategy
CN111381836A (en) * 2018-12-29 2020-07-07 北京奇虎科技有限公司 Switching method and device of application program deployment environment
CN111381836B (en) * 2018-12-29 2024-02-06 三六零科技集团有限公司 Application deployment environment switching method and device
CN110471847A (en) * 2019-08-02 2019-11-19 广东小天才科技有限公司 Network environment switching method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN108415739B (en) Hook method and device for dynamic link library function and storage medium
CN106681714A (en) Method and device for setting program environments and electronic equipment
CN102662665B (en) Input subsystem enabling Android to support various sensors
CN102419729B (en) Parallel test execution
CN107908952B (en) Method and device for identifying real machine and simulator and terminal
CN106557424A (en) Internal storage testing method, measured terminal, test client and system
CN107315827A (en) The method and its device of a kind of correlation recommendation in electronic reading
CN102736954B (en) System degradation is solved by forbidding application
CN107958365B (en) Material information changing method and device, storage medium and electronic equipment
CN104317648B (en) A kind of method and apparatus of monitoring advertisement
CN106775272A (en) System of selection, device and electronic equipment
CN106484262A (en) A kind of generation method of application of attending to anything else, device and terminal
CN103279269A (en) Method, device and terminal equipment for data interaction among application programs
CN103902519A (en) Information processing method and electronic device
CN103324478A (en) Mobile terminal and application program management method thereof
CN110287093A (en) Mobile terminal, data-interface test method and storage medium
CN108920353A (en) A kind of test method, device and electronic equipment
CN106815143A (en) Test information processing method, device and electronic equipment
CN106815042A (en) The dynamic loading method of refresh page, device and electronic equipment
CN103049374A (en) Automatic testing method and device
CN105468440A (en) Information display method and device and electronic equipment
CN106406654A (en) Application icon automatic sorting method and system, and mobile device comprising system
CN105027089B (en) Core functions detector
CN103955379B (en) A kind of method and system for registering software
CN105373715A (en) Wearable device based data access method and apparatus

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
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20170517