CN106713471A - Method and device for acquiring configuration file - Google Patents
Method and device for acquiring configuration file Download PDFInfo
- Publication number
- CN106713471A CN106713471A CN201611248568.0A CN201611248568A CN106713471A CN 106713471 A CN106713471 A CN 106713471A CN 201611248568 A CN201611248568 A CN 201611248568A CN 106713471 A CN106713471 A CN 106713471A
- Authority
- CN
- China
- Prior art keywords
- terminal
- request
- service end
- configuration file
- obtaining
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- 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/2866—Architectures; Arrangements
- H04L67/30—Profiles
Abstract
The embodiment of the invention provides a method and a device for acquiring a configuration file. The method is applied to a terminal and comprises the steps of sending a first acquisition request used for acquiring a configuration file list of a target application program in the terminal to a first API (Application Programming Interface) of a server, wherein the first API is an interface used for receiving a network access request; receiving the configuration file list fed back by the server according to the first acquisition request, and determining a target configuration file according to the configuration file list; sending a second acquisition request used for acquiring the target configuration file to a second API of the server, wherein the second API is an interface used for receiving a network access request; and receiving the target configuration file fed back by the server according to the second acquisition request. The terminal can be enabled to acquire the configuration file more conveniently by applying the scheme provided by the embodiment of the invention.
Description
Technical field
The present invention relates to technical field of the computer network, more particularly to a kind of profile acquisition method and device.
Background technology
In the prior art, application program is typically necessary the configuration file for reading the application program, root when starting
Start application program according to the configuration information in configuration file.Generally, the configuration file of application program can be by application program institute
Generated and sent in the corresponding service end of terminal and give the terminal, wherein, configuration file is should answer local preservation by service end
It is written to generated in default configuration template corresponding with the application program with the configuration information of program.
In practical application, due to the application program in same terminal is more and service end corresponding to terminal quantity
Also more, it is therefore desirable to the configuration file of the application program in terminal is managed collectively in service end, also referred to as configuration is managed
Reason.
For example, certain game development companies develops an online game, the deployment of game is larger, it is necessary to the fortune of specialty
Dimension team and software do deployment and daily management is safeguarded.If there are multiple application programs at the game server end of the online game
Need deployment, such as various back-end services programs (logical process main program, gateway program, log recording program etc.), Duo Zhongzhong
Between part service routine (caching program, message system program, scheduler program etc.), Back end data library, etc..These apply journey
Sequence may a point species be deployed on many game servers, and with game running scale expansion, game server
Deployment quantity also can further increase.Almost each application program is required for according to corresponding configuration file correctly with postponing,
Offer service can normally be started, then the configuration file management to magnanimity game server and application program therein just turns into
One important work.Here game server can be considered as terminal, management magnanimity game server and therein
The server of the configuration file of application program is service end.
Existing configuring management method is that the automation operation and maintenance tools by increasing income are realized, such as Puppet, Ansible.
But, due to the automation operation and maintenance tools increased income when being managed for configuration, it is necessary to install dedicated program in terminal, terminal passes through
The dedicated program asks configuration file to service end, and if terminal does not install the dedicated program, it is impossible to obtained from service end
Configuration file.Therefore, existing configuring management method limits the mode that terminal obtains configuration file from service end, is not easy to end
End obtains configuration file.
The content of the invention
The purpose of the embodiment of the present invention is to provide a kind of profile acquisition method and device, so that terminal more facilitates
Acquisition configuration file.Concrete technical scheme is as follows:
To reach above-mentioned purpose, the embodiment of the invention discloses a kind of profile acquisition method, terminal is applied to, it is described
Method includes:
The profile list for obtaining destination application in the terminal is sent to the first api interface of service end
First acquisition request, wherein, first api interface is:Interface for receiving network access request;
Receive the service end and obtain described the profile list of request feedback according to described first, and matched somebody with somebody according to described
Put listed files and determine target configuration file;
The second acquisition request for obtaining the target configuration file is sent to the second api interface of the service end,
Wherein, second api interface is:Interface for receiving network access request;
The service end is received according to the described second target configuration file for obtaining request feedback.
Optionally, it is described sent for obtaining the terminal to the first api interface of service end in destination application
The profile list first acquisition request before, also include:
Judge whether the terminal is provided with dedicated program corresponding with the service end;
If it is, by the dedicated program, sending described first to the service end and obtaining request;
Receive the service end and obtain described the profile list of request feedback according to described first, and matched somebody with somebody according to described
Put listed files and determine target configuration file;
By the dedicated program, send described second to the service end and obtain request;
The service end is received according to the described second target configuration file for obtaining request feedback;
If not, perform described being sent for obtaining intended application journey in the terminal to the first api interface of service end
The step of first acquisition request of the profile list of sequence.
Optionally, before sending the first acquisition request to the service end, gone back by the dedicated program described
Including:
By the dedicated program, of the master configuration file for obtaining the dedicated program is sent to the service end
Three obtain request;
Receive master configuration file of the service end according to the described 3rd dedicated program for obtaining request feedback.
Optionally, the corresponding token of the terminal is carried in the first acquisition request, wherein, the token is advance
Obtained from the service end.
Optionally, methods described also includes:
When the COS of the terminal service provided is changed, COS is changed the is sent to the service end
One message, so that the authority of the terminal to be adjusted to the service end the corresponding authority of COS after change.
Optionally, methods described also includes:
Receive the second message of the corresponding authority adjustment of the terminal that the service end sends;
According to second message, the COS of the terminal service provided is changed to the authority correspondence after adjustment
COS.
To reach above-mentioned purpose, the embodiment of the invention also discloses a kind of profile acquisition method, service end is applied to,
Methods described includes:
By the first api interface, the of the profile list for obtaining destination application that receiving terminal sends
One obtains request, wherein, first api interface is:Interface for receiving network access request;
Request is obtained according to described first, described the profile list is determined, and to the terminal feedback configuration text
Part list;
By the second api interface, receive the terminal and matched somebody with somebody for obtaining target according to what described the profile list sent
The second acquisition request of file is put, wherein, second api interface is:Interface for receiving network access request;
Request is obtained according to described second, the target configuration file is determined, and match somebody with somebody to the terminal feedback target
Put file.
Optionally, the corresponding token of the terminal is carried in the first acquisition request, wherein, the token is advance
Obtained from the service end;
The first acquisition request of the profile list for obtaining destination application sent in the receiving terminal
Afterwards, methods described also includes:
First obtains the legitimacy of request according to the token authentication, if legal, performs described according to described the
One obtains request, the step of determining described the profile list, and feed back described the profile list to the terminal.
Optionally, methods described also includes:
Receive the first message of the COS change of the terminal service provided that the terminal sends;
According to the first message, the authority of the terminal is adjusted to the corresponding authority of COS after change.
Optionally, methods described also includes:
Adjust the corresponding authority of the terminal;
The second message adjusted for authority is sent to the terminal, so that the terminal is by the service class of service provided
Type is changed to the corresponding COS of authority after adjustment.
Optionally, it is described to obtain request according to described second, determine the target configuration file, including:
According to the described second type of service for obtaining the destination application carried in request, the target configuration text is determined
The corresponding target configuration template of part and target configuration information;
According to the target configuration template and the target configuration information, the target configuration file is generated.
To reach above-mentioned purpose, the embodiment of the invention also discloses a kind of configuration file acquisition device, terminal is applied to, institute
Stating device includes:
First sending module, for being sent for obtaining intended application in the terminal to the first api interface of service end
The first acquisition request of the profile list of program, wherein, first api interface is:For receiving network access request
Interface;
First receiver module, for receiving the service end according to the described first configuration file for obtaining request feedback
List, and target configuration file is determined according to described the profile list;
Second sending module, for being sent for obtaining the target configuration text to the second api interface of the service end
Second acquisition request of part, wherein, second api interface is:Interface for receiving network access request;
Second receiver module, for receiving the service end according to the described second target configuration for obtaining request feedback
File.
Optionally, described device also includes:
Judge module, for sending described for obtaining to the first api interface of service end in first sending module
In terminal before the first acquisition request of the profile list of destination application, judge whether the terminal is provided with and institute
State the corresponding dedicated program of service end;If it is, the 3rd sending module of triggering, if not, triggering first sending module;
3rd sending module, for by the dedicated program, sending described first to the service end and obtaining request;
3rd receiver module, for receiving the service end according to the described first configuration file for obtaining request feedback
List, and target configuration file is determined according to described the profile list;
4th sending module, for by the dedicated program, sending described second to the service end and obtaining request;
4th receiver module, for receiving the service end according to the described second target configuration for obtaining request feedback
File.
Optionally, described device also includes:
5th sending module, by the dedicated program, sends in the 3rd sending module to the service end
Before described first obtains request, by the dedicated program, sent for obtaining the dedicated program to the service end
3rd acquisition request of master configuration file;
5th receiver module, for receiving the service end according to the described 3rd dedicated program for obtaining request feedback
Master configuration file.
Optionally, the corresponding token of the terminal is carried in the first acquisition request, wherein, the token is advance
Obtained from the service end.
Optionally, described device also includes:
6th sending module, for when the COS of the terminal service provided is changed, being sent out to the service end
The first message of service type change is taken, so that the authority of the terminal to be adjusted to the service end COS after change
Corresponding authority.
Optionally, described device also includes:
6th receiver module, for receiving the corresponding authority adjustment of the terminal that the service end sends second disappears
Breath;
Change module, for according to second message, the COS of the terminal service provided being changed to adjust
The corresponding COS of authority after whole.
To reach above-mentioned purpose, the embodiment of the invention also discloses a kind of configuration file acquisition device, service end is applied to,
Described device includes:
First receiver module, for by the first api interface, receiving terminal send for obtaining destination application
The first acquisition request of the profile list, wherein, first api interface is:Interface for receiving network access request;
First feedback module, for obtaining request according to described first, determines described the profile list, and to the end
End described the profile list of feedback;
Second receiver module, sends for by the second api interface, receiving the terminal according to described the profile list
For obtain target configuration file second acquisition request, wherein, second api interface is:For receiving network access
The interface of request;
Second feedback module, for obtaining request according to described second, determines the target configuration file, and to the end
The end feedback target configuration file.
Optionally, the corresponding token of the terminal is carried in the first acquisition request, wherein, the token is advance
Obtained from the service end;
Described device also includes:
Authentication module, for being sent in the first receiver module receiving terminal for obtaining matching somebody with somebody for destination application
Put after the first acquisition request of listed files, first obtains the legitimacy of request according to the token authentication, if closed
Method, triggers first feedback module.
Optionally, described device also includes:
3rd receiver module, what the COS for receiving the terminal service provided that the terminal sends was changed
First message;
First adjusting module, for according to the first message, the authority of the terminal being adjusted into the service after change
The corresponding authority of type.
Optionally, described device also includes:
Second adjusting module, for adjusting the corresponding authority of the terminal;
Sending module, for sending the second message adjusted for authority to the terminal, so that the terminal will be carried
COS for servicing is changed to the corresponding COS of authority after adjustment.
Optionally, second feedback module, including:
Determination sub-module, according to the described second type of service for obtaining the destination application carried in request, determines institute
State the corresponding target configuration template of target configuration file and target configuration information;
Generation submodule, according to the target configuration template and the target configuration information, generates the target configuration text
Part.
Profile acquisition method provided in an embodiment of the present invention and device, service end are provided with for receiving network access
First api interface and the second api interface of request, terminal are sent for obtaining intended application to the first api interface of service end
The first acquisition request of the profile list of program, receives the profile list of service end feedback, and according to configuration file
List determines target configuration file, and the second acquisition for obtaining target configuration file is sent to the second api interface of service end
Request, receives the target configuration file of service end feedback.
It can be seen that, scheme provided in an embodiment of the present invention, service end each provides acquisition the profile list and configuration text
The api interface of part so that terminal is can be by way of accessing api interface from service end in the case of not installing dedicated program
Obtain configuration file, terminal in the case where dedicated program is mounted with both can by dedicated program, can also be by accessing API
The mode of interface obtains configuration file, therefore, scheme provided in an embodiment of the present invention extends the side that terminal obtains configuration file
Formula so that terminal can more easily obtain configuration file.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
The accompanying drawing to be used needed for having technology description is briefly described, it should be apparent that, drawings in the following description are only this
Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can be with
Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is the first schematic flow sheet of profile acquisition method provided in an embodiment of the present invention;
Fig. 2 is second schematic flow sheet of profile acquisition method provided in an embodiment of the present invention;
Fig. 3 is the first schematic flow sheet of configuration file acquisition device provided in an embodiment of the present invention;
Fig. 4 is second schematic flow sheet of configuration file acquisition device provided in an embodiment of the present invention.
Specific embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than whole embodiments.It is based on
Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under the premise of creative work is not made
Embodiment, belongs to the scope of protection of the invention.
To solve problem of the prior art, a kind of profile acquisition method and device are the embodiment of the invention provides.Under
A kind of profile acquisition method that kept man of a noblewoman is first provided the embodiment of the present invention is described in detail.
It should be noted that the embodiment of the present invention can apply to the configuration file pipe of the application program in game server
Reason, it is also possible to which the management of the configuration file of the application program being applied in other scenes, the embodiment of the present invention is not limited this.
Fig. 1 is the first schematic flow sheet of profile acquisition method provided in an embodiment of the present invention, the method application
In terminal, including:
S101, the configuration file sent for obtaining destination application in terminal to the first api interface of service end is arranged
First acquisition request of table.
Wherein, an API (Application Program Interface, application programming interfaces) interface is:For connecing
Receive the interface of network access request.The network access request can (HyperText Transfer Protocol surpass for HTTP
Text transfer protocol) type access request, or RPC (Remote Procedure Call Protocol, long-range mistake
Journey invocation protocol) type access request, etc., the present embodiment is not limited the type of network access request.
Can be with the essential information of carried terminal such as IP (Internet Protocol) address etc., end in first acquisition request
The hardware information at end such as CPU (Central Processing Unit, central processing unit) number, memory size etc., terminal are carried
For the COS for servicing, the letters such as type of service belonging to the mark of destination application, destination application can also be carried
Breath, etc., is all rational, and the present embodiment obtains the information carried in request to first and do not limit.
S102, receives service end according to first the profile list for obtaining request feedback, and according to the profile list
Determine target configuration file.
It should be understood that the configuration file in the terminal corresponding to all application programs can be included in the profile list
Identification information, terminal can determine from the profile list the configuration file corresponding to destination application mark letter
Breath, and then to the corresponding configuration file of service end acquisition request.
S103, the second acquisition request for obtaining target configuration file is sent to the second api interface of service end.
Wherein, the second api interface is:Interface for receiving network access request.The network access request can be
The access request of http protocol (HyperText Transfer Protocol, HTTP) type, or
RPC agreements (Remote Procedure Call Protocol, access request of remote procedure call protocol type, etc., this
Embodiment is not limited the type of network access request.
Can be individual with the hardware information such as CPU of the essential information of carried terminal such as IP address etc., terminal in second acquisition request
The COS of number, memory size etc., terminal service provided, can also carry mark, the intended application of destination application
Information such as type of service, the mark of configuration file of institute's acquisition request belonging to program, etc., are all rational, the present embodiment
The information carried in request is obtained to second not limit.
Specifically, service end obtains request according to second determines that the process of target configuration file may refer to shown in Fig. 2 in fact
The associated description of example is applied, wouldn't be described in detail here.
In practical application, above-mentioned first api interface can be same api interface with above-mentioned second api interface, it is also possible to
It is different api interfaces, the present embodiment is not limited this.
S104, receives service end according to the second target configuration file for obtaining request feedback.
Terminal after target configuration file is received, due in target configuration file comprising start destination application needed for
The configuration information wanted, therefore destination application can be started according to target configuration file, after destination application startup,
Terminal can also will start result and return to service end.Specifically, the method for starting application program according to configuration file belongs to
Prior art, will not be described here.
It should be noted that terminal obtain the profile list after, if terminal have multiple application programs need start,
The identification information of the configuration file corresponding to each application program can then be determined, and successively to the second api interface of service end
Send the acquisition request for obtaining the corresponding configuration file of each application program.So, the acquisition speed of configuration file can be improved.
In actual applications, because terminal can also install dedicated program corresponding with service end, such as Agent (agency),
Agent refers to the program for residing in managed device and being reported to management station specifying variable value.Therefore, terminal can also be by special
Configuration file is obtained with the mode of program.
Specifically, in step S101 is sent for obtaining terminal to the first api interface of service end destination application
The profile list first acquisition request before, the profile acquisition method can also include:
Judge whether terminal is provided with dedicated program corresponding with service end;
If it is, by dedicated program, the first acquisition request is sent to service end;
The profile list of service end according to the first acquisition request feedback is received, and is determined according to the profile list
Target configuration file;
By dedicated program, send second to service end and obtain request;
Service end is received according to the second target configuration file for obtaining request feedback;
If not, perform S101 being sent for obtaining destination application in terminal to the first api interface of service end
The step of first acquisition request of the profile list.
It should be noted that when dedicated program start be connected successfully and with service end heartbeat it is normal in the case of, terminal can
To obtain configuration file by way of dedicated program.Specifically, due to obtaining configuration file by way of dedicated program
Process is similar with the process that configuration file is obtained above by the mode of api interface, will not be described here.
Certainly, even if terminal is mounted with dedicated program corresponding with service end, it is also possible to using by way of api interface
To obtain configuration file, the present invention is not limited this.
In actual applications, dedicated program is only configured with the IP address information of service end, and dedicated program is opened for the first time after installing
The IP address information according to service end is needed when dynamic, heartbeat is set up with service end and is connected, and obtain the main configuration text of dedicated program
Part.
Therefore, by dedicated program, before sending the first acquisition request to service end, can also include:
By dedicated program, the 3rd acquisition request of the master configuration file for obtaining dedicated program is sent to service end;
Receive master configuration file of the service end according to the 3rd dedicated program for obtaining request feedback.
Wherein, can be obtained in verification the 3rd with the identification information of carried terminal such as IP address, service end in the 3rd acquisition request
Take request in IP address it is legal after, can to the terminal feed back dedicated program master configuration file, and with dedicated program set up
Heartbeat is connected.
Can be comprising the token (token) that service end is the specific generation of the dedicated program, similar to close in master configuration file
Key, the double authentication of IP address and token is carried out in order to service end to subsequent terminal by the request that the dedicated program sends;
In master configuration file can also include dedicated program itself need configuration information for example time-out time, active service end IP address,
Heartbeat connection interval time, the maximum reattempt times of heartbeat Joint failure etc., the present embodiment is included to master configuration file
Information is not limited.
For the sake of security, the first acquisition request and/or second that terminal sends can carry terminal in obtaining request
Corresponding token, wherein, token is obtained from service end in advance, service end receive terminal transmission acquisition ask when,
Token according to carrying in request is obtained obtains the legitimacy of request to verify.
It should be understood that token can be obtained from the master configuration file of dedicated program, it is also possible to led to by service end
Cross other ad hoc fashions and be sent to terminal, the present embodiment is not limited this.
In practical application, because terminal can provide different types of service, such as database service, Web service, in order to pacify
Can be that the terminal for providing different types of service sets different authorities, for example for service end for the sake of complete, there is provided
The terminal of database service possesses the authority of the configuration file for obtaining application program A, and the terminal for providing Web service does not possess and obtains
Take the authority of the configuration file of application program A.Therefore, the profile acquisition method can also include:
When the COS of terminal service provided is changed, the first message that COS is changed is sent to service end,
So that the authority of terminal to be adjusted to service end the corresponding authority of COS after change.
In practical application, when there is more terminal to need to change COS simultaneously, can also unify to adjust in service end
The authority of whole these terminals, then changes COS by terminal.Specifically, terminal can also be changed according in the following manner servicing
Type:
Receive the second message of the corresponding authority adjustment of terminal that service end sends;
According to the second message, the COS of terminal service provided is changed to the corresponding service class of authority after adjustment
Type.
It should be noted that using above two mode, can flexible switching terminal COS, and in service end pair
The authority of terminal is adjusted.When the COS of terminal service provided is changed, the terminal needs to start the clothes after change
The corresponding application program of service type, at this moment, terminal can be to the corresponding application of COS after the change of service end acquisition request
The configuration file of program, and service end verifies the acquisition request that terminal sends according to the corresponding authority of the COS after change
Legitimacy.So, unified control and rights management can just be carried out to configuration file by service end.
As seen from the above description, the profile acquisition method that the present embodiment is provided, service end is provided with for receiving net
First api interface and the second api interface of network access request, terminal are sent for obtaining mesh to the first api interface of service end
The first acquisition request of the profile list of application program is marked, the profile list of service end feedback is received, and according to matching somebody with somebody
Put listed files and determine target configuration file, to the second api interface of service end send for obtain target configuration file
Two obtain request, receive the target configuration file of service end feedback.
It can be seen that, the scheme that the present embodiment is provided, service end is each provided and obtains the profile list and configuration file
Api interface so that terminal can obtained by way of accessing api interface in the case of not installing dedicated program from service end
Configuration file, terminal in the case where dedicated program is mounted with both can by dedicated program, can also be by accessing api interface
Mode obtain configuration file, therefore, the present embodiment provide scheme extend terminal obtain configuration file mode so that eventually
End can more easily obtain configuration file.
Fig. 2 is second schematic flow sheet of profile acquisition method provided in an embodiment of the present invention, the method application
In service end, including:
S201, by the first api interface, the profile list for obtaining destination application that receiving terminal sends
First acquisition request.
Wherein, the first api interface is:Interface for receiving network access request.
In practical application, the corresponding token of terminal can be carried in the first acquisition request, wherein, token is in advance from clothes
Business end obtains;
After the first acquisition request of the profile list for obtaining destination application that receiving terminal sends,
The method can also include:
The legitimacy of request is obtained according to token authentication first, if legal, S202 performed and is obtained request according to first, really
Determine the profile list, and the step of to terminal feedback configuration listed files.
If the first acquisition request is illegal, service end can also send the first acquisition and ask illegal disappearing to terminal
Breath, so that terminal resends the first legal acquisition request, it is ensured that the normal operation of terminal traffic.
For the sake of security, the identification information of terminal, such as IP address can also be included in the first acquisition request, service end can
Double authentication is carried out to the first acquisition request with according to token and IP address information.Certainly, service end can also according to token and
Other information is verified that the present embodiment is not limited this.
S202, request is obtained according to first, determines the profile list, and to terminal feedback configuration listed files.
Seen from the above description, can be with the essential information of carried terminal such as IP address etc., terminal in the first acquisition request
Hardware information such as CPU numbers, memory size etc., the COS of terminal service provided, can also carry destination application
The information such as mark, type of service belonging to destination application.Therefore, service end is carried in being obtained according to first and being asked
Terminal information and the information of destination application, it is determined that configuration destination application the profile list.
S203, by the second api interface, receiving terminal configures text according to what the profile list sent for obtaining target
Second acquisition request of part.
Wherein, the second api interface is:Interface for receiving network access request.
Seen from the above description, can be with the essential information of carried terminal such as IP address etc., terminal in the second acquisition request
Hardware information such as CPU numbers, memory size etc., the COS of terminal service provided, can also carry destination application
The information such as mark, type of service, the mark of configuration file of institute's acquisition request belonging to destination application.
It should be understood that being obtained with first, request is similar, the second acquisition can also the corresponding token of carried terminal in asking;
The for obtaining target configuration file the second acquisition request sent according to the profile list in receiving terminal
Afterwards, the legitimacy of request is obtained according to token authentication second, if legal, S204 performed and is obtained request according to second, determine mesh
Mark configuration file, and the step of to terminal feedback target configuration file.
If the second acquisition request is illegal, service end can also send the second acquisition and ask illegal disappearing to terminal
Breath, so that terminal resends the second legal acquisition request, it is ensured that the normal operation of terminal traffic.
For the sake of security, the identification information of terminal, such as IP address can also be included in the second acquisition request, service end can
Double authentication is carried out to the second acquisition request with according to token and IP address information.Certainly, service end can also according to token and
Other information is verified that the present embodiment is not limited this.
Simultaneously as service end have recorded the authority corresponding to the COS of terminal service provided, therefore, service end
Can also judge whether the terminal possesses the power for obtaining target configuration file according to the COS of the currently provided service of terminal
Limit, if possessed, service end just can obtain request according to second, determine target configuration file, and configure to terminal feedback target
File.
S204, request is obtained according to second, determines target configuration file, and to terminal feedback target configuration file.
Specifically, can determine that target is matched somebody with somebody according to the second type of service for obtaining the destination application carried in request
Put the corresponding target configuration template of file and target configuration information;According to target configuration template and target configuration information, mesh is generated
Mark configuration file.
In practical application, service end can pre-build database, with store terminal each application program with confidence
Breath and the incidence relation with corresponding configuration template.In the second acquisition request is received, searched targets should from database
With the corresponding configuration information of program and configuration template, configuration information is written in configuration template, generates destination application pair
The configuration file answered.
It should be understood that in actual applications, in order to the more flexible api interface provided using service end, clothes
Strict limitation is not done at business end to the terminal of request interface, i.e., in order to obtain the configuration file of some application programs terminal A on, ask
Ask and do not limit and must be initiated from terminal A, so set the reason for be that there may be terminal B or a collection of terminal to need by terminal
A carries out long-range centralized Control.
The legitimacy verifies of the request for being received by api interface, can by request carry IP address and
The form of the double authentication of token is completed.For needing the api interface to service end to send the terminal of request, there is provided terminal
The relevant information such as IP address, corresponding project or business, service end for the proprietary token of its generation and is sent to the end in advance
End;Terminal is required for carrying the token in the request for subsequently being sent to api interface, obtains the profile list or configuration text
Also need to carry other necessary informations, such as IP address of terminal, the hardware information of terminal, item related information, service end during part
After the legitimacy of verification request passes through, the profile list or configuration that can be asked according to the feedback of the information carried in request are literary
Part.
Exemplary, when configuration files of the terminal A to the application program X on service end acquisition request terminal B, terminal A
Be sent to service end acquisition request in carry be terminal A IP address and token and the currently provided clothes of terminal B
The COS of business, if the IP address and token of service end checking terminal A be legal and terminal B currently has and applied
During the authority of program X configuration files, service end will be to the configuration file of the application program X of terminal A feedback terminals B.
Due to terminal, each application program has its independent configuration template eventually, and the configuration template between different business has been
Do not have entirely it is related, configuration file acquisition request carry be different application traffic type information, different applications
Do not influenceed mutually between program.Therefore, the scheme that the present embodiment is provided can isolate different service lines, to different business line
Configuration file carry out unified management, improve operating efficiency and reduce the probability of happening of mistake.
From the description of above-mentioned embodiment illustrated in fig. 1, when the COS of the service that terminal is provided is changed, terminal
The first message that COS is changed, the terminal service provided that service end can be sent with receiving terminal can be sent to service end
COS change first message, and according to first message, the authority of terminal is adjusted to the COS pair after change
The authority answered.
For example, the COS of terminal from web services be changed to database service when, can be by dedicated program to service
End reports the message that COS is changed, service end that the authority of the terminal is adjusted into the corresponding authority of database service, then
Terminal obtains the corresponding configuration file of database service by dedicated program from service end, can thus realize the service of terminal
The flexible switching of type.Authority adjustment and requests verification are carried out to terminal in service end, can isolate different service line and
Different COSs on identical services line, reach the purpose of the configuration file of management terminal.
In another implementation, service end can first adjust the corresponding authority of terminal, then sent to terminal and be directed to
Second message of authority adjustment, so that the COS of service provided to be changed to terminal the corresponding service of authority after adjustment
Type.So, in the case where needing to change COS simultaneously compared with multiple terminals, these terminals are first adjusted by service end unification
Authority, is then changed the COS of itself by terminal, it is possible to achieve service end is uniformly controlled and authority pipe to each terminal
Reason.
As seen from the above description, the profile acquisition method that the present embodiment is provided, service end is provided with for receiving net
First api interface and the second api interface of network access request, by the transmission of the first api interface receiving terminal for obtaining mesh
Mark the first acquisition request of the profile list of application program, it is determined that and feed back the profile list to terminal, by the
The for obtaining target configuration file second acquisition request that two api interface receiving terminals send, it is determined that and feeding back mesh to terminal
Mark configuration file.
It can be seen that, the scheme that the present embodiment is provided, service end is each provided and obtains the profile list and configuration file
Api interface so that terminal can obtained by way of accessing api interface in the case of not installing dedicated program from service end
Configuration file, terminal in the case where dedicated program is mounted with both can by dedicated program, can also be by accessing api interface
Mode obtain configuration file, therefore, the present embodiment provide scheme extend terminal obtain configuration file mode so that eventually
End can more easily obtain configuration file.
Corresponding with above-mentioned profile acquisition method, the embodiment of the present invention additionally provides a kind of configuration file and obtains dress
Put.
Corresponding with the embodiment of the method shown in Fig. 1, Fig. 3 is configuration file acquisition device provided in an embodiment of the present invention
The first structural representation, the device is applied to terminal, can include:
First sending module 301, should for obtaining target in the terminal for being sent to the first api interface of service end
Asked with first acquisition of the profile list of program, wherein, first api interface is:Please for receiving network access
The interface asked;
First receiver module 302, for receiving the service end according to the described first configuration for obtaining request feedback
Listed files, and target configuration file is determined according to described the profile list;
Second sending module 303, configures for being sent to the second api interface of the service end for obtaining the target
Second acquisition request of file, wherein, second api interface is:Interface for receiving network access request;
Second receiver module 304, for receiving the service end according to the described second target for obtaining request feedback
Configuration file.
Specifically, described device can also include:
Judge module, for being sent for obtaining to the first api interface of service end in first sending module 301
State destination application in terminal the profile list first acquisition request before, judge the terminal whether be provided with
The corresponding dedicated program of the service end;If it is, the 3rd sending module (not shown) of triggering, if not, triggering is described
First sending module 301;
3rd sending module, for by the dedicated program, sending described first to the service end and obtaining request;
3rd receiver module (not shown), request feedback is obtained for receiving the service end according to described first
Described the profile list, and target configuration file is determined according to described the profile list;
4th sending module (not shown), for by the dedicated program, described the is sent to the service end
Two obtain request;
4th receiver module (not shown), request feedback is obtained for receiving the service end according to described second
The target configuration file.
Specifically, described device can also include:
5th sending module (not shown), for passing through the dedicated program in the 3rd sending module, to institute
Before stating service end transmission the first acquisition request, by the dedicated program, sent for obtaining to the service end
State the 3rd acquisition request of the master configuration file of dedicated program;
5th receiver module (not shown), request feedback is obtained for receiving the service end according to the described 3rd
The master configuration file of the dedicated program.
Specifically, the corresponding token of the terminal can be carried in the first acquisition request, wherein, the token is
Obtained from the service end in advance.
Specifically, described device can also include:
6th sending module (not shown), for when the terminal service provided COS change when, to
The service end sends the first message of COS change, so that the authority of the terminal is adjusted to change by the service end
The corresponding authority of COS afterwards.
Specifically, described device can also include:
6th receiver module (not shown), adjusts for receiving the corresponding authority of the terminal that the service end sends
The second whole message;
Change module (not shown), for according to second message, by the service of the terminal service provided
Type is changed to the corresponding COS of authority after adjustment.
As seen from the above description, the configuration file acquisition device that the present embodiment is provided, service end is provided with for receiving net
First api interface and the second api interface of network access request, terminal are sent for obtaining mesh to the first api interface of service end
The first acquisition request of the profile list of application program is marked, the profile list of service end feedback is received, and according to matching somebody with somebody
Put listed files and determine target configuration file, to the second api interface of service end send for obtain target configuration file
Two obtain request, receive the target configuration file of service end feedback.
It can be seen that, the scheme that the present embodiment is provided, service end is each provided and obtains the profile list and configuration file
Api interface so that terminal can obtained by way of accessing api interface in the case of not installing dedicated program from service end
Configuration file, terminal in the case where dedicated program is mounted with both can by dedicated program, can also be by accessing api interface
Mode obtain configuration file, therefore, the present embodiment provide scheme extend terminal obtain configuration file mode so that eventually
End can more easily obtain configuration file.
Corresponding with the embodiment of the method shown in Fig. 2, Fig. 4 is configuration file acquisition device provided in an embodiment of the present invention
Second structural representation, the device is applied to service end, can include:
First receiver module 401, for by the first api interface, receiving terminal send for obtaining intended application journey
The first acquisition request of the profile list of sequence, wherein, first api interface is:For receiving network access request
Interface;
First feedback module 402, for obtaining request according to described first, determines described the profile list, and to institute
State terminal and feed back described the profile list;
Second receiver module 403, for by the second api interface, receiving the terminal according to described the profile list
The for obtaining target configuration file the second acquisition request for sending, wherein, second api interface is:For receiving network
The interface of access request;
Second feedback module 404, for obtaining request according to described second, determines the target configuration file, and to institute
State terminal and feed back the target configuration file.
Specifically, the corresponding token of the terminal can be carried in the first acquisition request, wherein, the token is
Obtained from the service end in advance;
Described device can also include:
Authentication module (not shown), for being sent in the first receiver module receiving terminal for obtaining target
After the first acquisition request of the profile list of application program, first obtains the conjunction of request according to the token authentication
Method, if legal, triggers first feedback module 402.
Specifically, described device can also include:
3rd receiver module (not shown), the clothes for receiving the terminal service provided that the terminal sends
The first message of service type change;
First adjusting module (not shown), for according to the first message, the authority of the terminal being adjusted to
The corresponding authority of COS after change.
Specifically, described device can also include:
Second adjusting module (not shown), for adjusting the corresponding authority of the terminal;
Sending module (not shown), for sending the second message adjusted for authority to the terminal, so that institute
State terminal and the COS of service provided is changed to the corresponding COS of authority after adjustment.
Specifically, second feedback module 404, can include:
Determination sub-module (not shown), according to the described second business for obtaining the destination application carried in request
Type, determines the corresponding target configuration template of the target configuration file and target configuration information;
Generation submodule (not shown), according to the target configuration template and the target configuration information, generates institute
State target configuration file.
As seen from the above description, the configuration file acquisition device that the present embodiment is provided, service end is provided with for receiving net
First api interface and the second api interface of network access request, by the transmission of the first api interface receiving terminal for obtaining mesh
Mark the first acquisition request of the profile list of application program, it is determined that and feed back the profile list to terminal, by the
The for obtaining target configuration file second acquisition request that two api interface receiving terminals send, it is determined that and feeding back mesh to terminal
Mark configuration file.
It can be seen that, the scheme that the present embodiment is provided, service end is each provided and obtains the profile list and configuration file
Api interface so that terminal can obtained by way of accessing api interface in the case of not installing dedicated program from service end
Configuration file, terminal in the case where dedicated program is mounted with both can by dedicated program, can also be by accessing api interface
Mode obtain configuration file, therefore, the present embodiment provide scheme extend terminal obtain configuration file mode so that eventually
End can more easily obtain configuration file.
It should be noted that herein, such as first and second or the like relational terms are used merely to a reality
Body or operation make a distinction with another entity or operation, and not necessarily require or imply these entities or deposited between operating
In any this actual relation or order.And, term " including ", "comprising" or its any other variant be intended to
Nonexcludability is included, so that process, method, article or equipment including a series of key elements not only will including those
Element, but also other key elements including being not expressly set out, or also include being this process, method, article or equipment
Intrinsic key element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that
Also there is other identical element in process, method, article or equipment including the key element.
Each embodiment in this specification is described by the way of correlation, identical similar portion between each embodiment
Divide mutually referring to what each embodiment was stressed is the difference with other embodiment.Especially for device reality
Apply for example, because it is substantially similar to embodiment of the method, so description is fairly simple, related part is referring to embodiment of the method
Part explanation.
Presently preferred embodiments of the present invention is the foregoing is only, is not intended to limit the scope of the present invention.It is all
Any modification, equivalent substitution and improvements made within the spirit and principles in the present invention etc., are all contained in protection scope of the present invention
It is interior.
Claims (13)
1. a kind of profile acquisition method, it is characterised in that be applied to terminal, methods described includes:
Of the profile list for obtaining destination application in the terminal is sent to the first api interface of service end
One obtains request, wherein, first api interface is:Interface for receiving network access request;
The service end is received according to described first described the profile list for obtaining request feedback, and according to the configuration text
Part list determines target configuration file;
The second acquisition request for obtaining the target configuration file is sent to the second api interface of the service end, wherein,
Second api interface is:Interface for receiving network access request;
The service end is received according to the described second target configuration file for obtaining request feedback.
2. method according to claim 1, it is characterised in that be used in described transmission to the first api interface of service end
Before the first acquisition request of the profile list for obtaining destination application in the terminal, also include:
Judge whether the terminal is provided with dedicated program corresponding with the service end;
If it is, by the dedicated program, sending described first to the service end and obtaining request;
The service end is received according to described first described the profile list for obtaining request feedback, and according to the configuration text
Part list determines target configuration file;
By the dedicated program, send described second to the service end and obtain request;
The service end is received according to the described second target configuration file for obtaining request feedback;
If not, perform described being sent for obtaining destination application in the terminal to the first api interface of service end
The step of first acquisition request of the profile list.
3. method according to claim 2, it is characterised in that described by the dedicated program, to the service end
Before sending the first acquisition request, also include:
By the dedicated program, the 3rd that the master configuration file for obtaining the dedicated program is sent to the service end obtains
Take request;
Receive master configuration file of the service end according to the described 3rd dedicated program for obtaining request feedback.
4. the method according to claim any one of 1-3, it is characterised in that described first obtains and carry in request described
The corresponding token of terminal, wherein, the token is obtained from the service end in advance.
5. method according to claim 1, it is characterised in that methods described also includes:
When the COS of the terminal service provided is changed, send COS change to the service end first disappears
Breath, so that the authority of the terminal to be adjusted to the service end the corresponding authority of COS after change.
6. method according to claim 1, it is characterised in that methods described also includes:
Receive the second message of the corresponding authority adjustment of the terminal that the service end sends;
According to second message, the COS of the terminal service provided is changed to the corresponding clothes of authority after adjustment
Service type.
7. a kind of profile acquisition method, it is characterised in that be applied to service end, methods described includes:
By the first api interface, the first of the profile list for obtaining destination application that receiving terminal sends obtains
Request is taken, wherein, first api interface is:Interface for receiving network access request;
Request is obtained according to described first, described the profile list is determined, and the configuration file row are fed back to the terminal
Table;
By the second api interface, the terminal is received according to what described the profile list sent and configures text for obtaining target
Second acquisition request of part, wherein, second api interface is:Interface for receiving network access request;
Request is obtained according to described second, the target configuration file is determined, and the target configuration text is fed back to the terminal
Part.
8. method according to claim 7, it is characterised in that described first obtain carry the terminal-pair in request should
Token, wherein, the token is obtained from the service end in advance;
After the first acquisition request of the profile list for obtaining destination application that the receiving terminal sends,
Methods described also includes:
First obtains the legitimacy of request according to the token authentication, if legal, execution is described to be obtained according to described first
The step of taking request, determine described the profile list, and described the profile list is fed back to the terminal.
9. method according to claim 7, it is characterised in that methods described also includes:
Receive the first message of the COS change of the terminal service provided that the terminal sends;
According to the first message, the authority of the terminal is adjusted to the corresponding authority of COS after change.
10. method according to claim 7, it is characterised in that methods described also includes:
Adjust the corresponding authority of the terminal;
The second message adjusted for authority is sent to the terminal, so that the terminal becomes the COS of service provided
The corresponding COS of authority after more adjusting.
11. methods according to claim 7, it is characterised in that described to obtain request according to described second, determine the mesh
Mark configuration file, including:
According to the described second type of service for obtaining the destination application carried in request, the target configuration file pair is determined
The target configuration template and target configuration information answered;
According to the target configuration template and the target configuration information, the target configuration file is generated.
12. a kind of configuration file acquisition device, it is characterised in that be applied to terminal, described device includes:
First sending module, for being sent for obtaining destination application in the terminal to the first api interface of service end
The profile list first acquisition request, wherein, first api interface is:For receiving connecing for network access request
Mouthful;
First receiver module, for receiving the service end according to the described first configuration file row for obtaining request feedback
Table, and target configuration file is determined according to described the profile list;
Second sending module, for being sent for obtaining the target configuration file to the second api interface of the service end
Second obtains request, wherein, second api interface is:Interface for receiving network access request;
Second receiver module, text is configured for receiving the service end according to the described second target for obtaining request feedback
Part.
13. a kind of configuration file acquisition device, it is characterised in that be applied to service end, described device includes:
First receiver module, for the configuration for obtaining destination application sent by the first api interface, receiving terminal
First acquisition request of listed files, wherein, first api interface is:Interface for receiving network access request;
First feedback module, for obtaining request according to described first, determines described the profile list, and anti-to the terminal
Present described the profile list;
Second receiver module, for by the second api interface, receiving the use that the terminal sends according to described the profile list
In the second acquisition request for obtaining target configuration file, wherein, second api interface is:For receiving network access request
Interface;
Second feedback module, for obtaining request according to described second, determines the target configuration file, and anti-to the terminal
Present the target configuration file.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611248568.0A CN106713471B (en) | 2016-12-29 | 2016-12-29 | Configuration file acquisition method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611248568.0A CN106713471B (en) | 2016-12-29 | 2016-12-29 | Configuration file acquisition method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106713471A true CN106713471A (en) | 2017-05-24 |
CN106713471B CN106713471B (en) | 2019-12-13 |
Family
ID=58903849
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611248568.0A Active CN106713471B (en) | 2016-12-29 | 2016-12-29 | Configuration file acquisition method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106713471B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109034743A (en) * | 2018-07-20 | 2018-12-18 | 中软信息系统工程有限公司 | Crowd's wound development approach, system and device |
CN109408132A (en) * | 2017-08-15 | 2019-03-01 | 腾讯科技(深圳)有限公司 | A kind of configuration file processing method and server, user terminal, storage medium |
CN110806895A (en) * | 2019-11-04 | 2020-02-18 | 精硕科技(北京)股份有限公司 | Project creation method and device and computer readable storage medium |
WO2020168826A1 (en) * | 2019-02-22 | 2020-08-27 | 华为技术有限公司 | Device configuration method, system, and apparatus |
CN114079647A (en) * | 2020-08-11 | 2022-02-22 | 中国移动通信集团安徽有限公司 | Method, device and system for IP address filing verification and computing equipment |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101729594A (en) * | 2009-11-10 | 2010-06-09 | 中兴通讯股份有限公司 | Remote configuration control method and system |
US8560818B2 (en) * | 2011-01-27 | 2013-10-15 | Wyse Technolgoy Inc. | Automatic retrieval, parsing and application of configuration for a specific-purpose client having a windows-based embedded image with a write-filter |
CN105100211A (en) * | 2015-06-26 | 2015-11-25 | 北京奇虎科技有限公司 | Configuration file obtaining method and device |
-
2016
- 2016-12-29 CN CN201611248568.0A patent/CN106713471B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101729594A (en) * | 2009-11-10 | 2010-06-09 | 中兴通讯股份有限公司 | Remote configuration control method and system |
US8560818B2 (en) * | 2011-01-27 | 2013-10-15 | Wyse Technolgoy Inc. | Automatic retrieval, parsing and application of configuration for a specific-purpose client having a windows-based embedded image with a write-filter |
CN105100211A (en) * | 2015-06-26 | 2015-11-25 | 北京奇虎科技有限公司 | Configuration file obtaining method and device |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109408132A (en) * | 2017-08-15 | 2019-03-01 | 腾讯科技(深圳)有限公司 | A kind of configuration file processing method and server, user terminal, storage medium |
CN109034743A (en) * | 2018-07-20 | 2018-12-18 | 中软信息系统工程有限公司 | Crowd's wound development approach, system and device |
WO2020168826A1 (en) * | 2019-02-22 | 2020-08-27 | 华为技术有限公司 | Device configuration method, system, and apparatus |
CN111614476A (en) * | 2019-02-22 | 2020-09-01 | 华为技术有限公司 | Equipment configuration method, system and device |
CN110806895A (en) * | 2019-11-04 | 2020-02-18 | 精硕科技(北京)股份有限公司 | Project creation method and device and computer readable storage medium |
CN114079647A (en) * | 2020-08-11 | 2022-02-22 | 中国移动通信集团安徽有限公司 | Method, device and system for IP address filing verification and computing equipment |
CN114079647B (en) * | 2020-08-11 | 2023-07-21 | 中国移动通信集团安徽有限公司 | Method, device, system and computing equipment for checking IP address record |
Also Published As
Publication number | Publication date |
---|---|
CN106713471B (en) | 2019-12-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106713471A (en) | Method and device for acquiring configuration file | |
US8078692B2 (en) | Method of loading files from a client to a target server and device for implementing the method | |
CN106209726B (en) | Mobile application single sign-on method and device | |
CN102368768B (en) | Identification method, equipment and system as well as identification server | |
CN102739678B (en) | Single-sign-on treatment system and single-sign-on processing method | |
CN111400777B (en) | Network storage system, user authentication method, device and equipment | |
CN104394133A (en) | Login method and login system | |
CN104168339A (en) | Method and device for preventing domain name from being intercepted | |
CN100512158C (en) | Network measuring system structure and realizing method thereof | |
KR20100108053A (en) | Method for controlling device using url in distributed network environment and apparatus thereof | |
CN108206830A (en) | Vulnerability scanning method, apparatus, computer equipment and storage medium | |
CN102523220A (en) | Web authentication method, and client and access layer device used for web authentication | |
CN105933326A (en) | Remote terminal data reporting method and device | |
CN102801687A (en) | Single sign-on system and method | |
CN101924794B (en) | Internet based method for monitoring total software operation quantity in real time | |
EP1499967A2 (en) | Secure transmission and installation of an application | |
CN104823410A (en) | Parameter configuration system | |
CN101442529B (en) | Device management system and device management command scheduling method thereof | |
CN107968725A (en) | Home gateway haplotype terminal equipment configuration information returns and collocation method, equipment | |
TW200304741A (en) | Apparatus and method for managing cable modem based on Web | |
CN106713464B (en) | service management method and device of enterprise service bus | |
CN113014443B (en) | Method and system for testing whether CDN (content delivery network) resources hit cache | |
US11804986B2 (en) | Method for the remote management of a device connected to a residential gateway | |
CN112953969A (en) | Network request response method and device, computer equipment and storage medium | |
CN107566211B (en) | Method, device and system for accessing test equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |