CN108804155A - Profile acquisition method, device, terminal and computer readable storage medium - Google Patents
Profile acquisition method, device, terminal and computer readable storage medium Download PDFInfo
- Publication number
- CN108804155A CN108804155A CN201810556684.1A CN201810556684A CN108804155A CN 108804155 A CN108804155 A CN 108804155A CN 201810556684 A CN201810556684 A CN 201810556684A CN 108804155 A CN108804155 A CN 108804155A
- Authority
- CN
- China
- Prior art keywords
- configuration file
- file
- acquisition
- information
- processor
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/547—Remote procedure calls [RPC]; Web services
- G06F9/548—Object oriented; Remote method invocation [RMI]
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The present invention provides a kind of profile acquisition method, device, terminal and computer readable storage mediums, wherein profile acquisition method includes:Obtain the attribute information of script tag in homepage face;File path information is obtained according to the attribute information;Corresponding configuration file is introduced according to this document routing information.It solves through the invention in the prior art in the case where project publication is using virtual route, when asking the Actual path of its configuration file without virtual route in front end project initiation, lead to not find configuration file problem, it realizes configuration file to introduce by way of homepage entry file, different configuration file can be obtained by request method.
Description
Technical field
The present invention relates to computer software application technical fields, and in particular to a kind of profile acquisition method, device, end
End and computer readable storage medium.
Background technology
Front and back end detaches the industrywide standard occupation mode for having become internet project development, and can be later large size point
Cloth framework, elastic calculation framework, micro services framework, multiterminal service (a variety of clients, such as:Browser, car-mounted terminal,
Android, IOS etc.) it lays a solid foundation.The step is the only way which must be passed of system architecture from ape evolution adult.Front and back end point
From core concept be the front end html pages by ajax call rear end restuful api interfaces and using json data into
Row interaction.
Briefly, front and back end separation is exactly that front-end and back-end are divided into two engineerings, is responsible for exploitation by different team,
Have on from the angle of engineering and responsibility and separate, such rear end is partial to provide simple api interface, and front end is exactly to call API
Interface is shown and calling service.Front and back end separation not only peels away page rendering and service logic from server, will
Page rendering transfers to front-end processing, or even browser is transferred to handle;It transfers to backstage attentively to do business service logic, reduces him
Between coupling, and carried out from responsibility clearly demarcated, be more suitable for large project and Large Groups management and exploitation.
In the prior art if project publication uses virtual route, it can cause to can not find configuration file when project initiation and ask
Topic.Such as access path is:http://192.168.0.100:8080/ phantom item name/index.html, exists in practice
It asks the Actual path of its configuration file without virtual route when the project initiation of front end, causes to can not find configuration file problem.
Invention content
In view of this, an embodiment of the present invention provides a kind of profile acquisition method, device, terminals and computer-readable
Storage medium, to solve in the prior art, in the case where project publication is using virtual route, to ask when in front end project initiation
When seeking the Actual path of its configuration file without virtual route, lead to not find configuration file problem.
For this purpose, an embodiment of the present invention provides following technical solutions:
First aspect present invention provides a kind of profile acquisition method, including:Obtain script tag in homepage face
Attribute information;File path information is obtained according to the attribute information;According to the corresponding configuration of the file path acquisition of information
File.
Optionally, after according to the corresponding configuration file of the file path acquisition of information, further include:By configuration text
Part is stored into technical routine under the catalogue that need not be compiled.
Optionally, the method further includes:Change the configuration item that server address is used to indicate in the configuration file.
Optionally, in the case where the homepage face is html page, the configuration file is js files.
Second aspect of the present invention provides a kind of configuration file acquisition device, including:First acquisition module, for obtaining
The attribute information of script tag in homepage face;Second acquisition module, for obtaining file path information according to the attribute information;
Third acquisition module, for according to the corresponding configuration file of the file path acquisition of information.
Optionally, described device further includes:Memory module is used in the third acquisition module according to the file path
After the corresponding configuration file of acquisition of information, the configuration file is stored into technical routine under the catalogue that need not be compiled.
Optionally, described device further includes:Modified module, for changing in the configuration file with being used to indicate server
The configuration item of location.
Optionally, in the case where the homepage face is html page, the configuration file is js files.
Third aspect present invention provides a kind of terminal, including:At least one processor;And with it is described at least one
The memory of processor communication connection;Wherein, the memory is stored with the instruction that can be executed by one processor, described
Instruction is executed by least one processor, so that any described in the above-mentioned first aspect of at least one processor execution
Profile acquisition method.
Fourth aspect present invention provides a kind of computer readable storage medium, is stored thereon with computer instruction, this refers to
The when of being executed by processor is enabled to realize any profile acquisition method in above-mentioned first aspect.
Technical solution of the embodiment of the present invention, has the following advantages that:
An embodiment of the present invention provides a kind of profile acquisition method, device, terminal and computer readable storage medium,
Wherein, profile acquisition method includes:Obtain the attribute information of script tag in homepage face;Text is obtained according to the attribute information
Part routing information;Corresponding configuration file is introduced according to this document routing information.It solves and exists in the prior art through the invention
Project publication using in the case of virtual route, when asked in front end project initiation the Actual path of its configuration file without
When virtual route, lead to not find configuration file problem, realizes configuration file and draw by way of homepage entry file
Enter, different configuration file can be obtained by request method.
Description of the drawings
It, below will be to specific in order to illustrate more clearly of the specific embodiment of the invention or technical solution in the prior art
Embodiment or attached drawing needed to be used in the description of the prior art are briefly described, it should be apparent that, in being described below
Attached drawing is some embodiments of the present invention, for those of ordinary skill in the art, before not making the creative labor
It puts, other drawings may also be obtained based on these drawings.
Fig. 1 is the flow chart of profile acquisition method according to the ... of the embodiment of the present invention;
Fig. 2 is the structure diagram of configuration file acquisition device according to the ... of the embodiment of the present invention;
Fig. 3 is the hardware architecture diagram of terminal provided in an embodiment of the present invention.
Specific implementation mode
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention
In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is
A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those skilled in the art are not having
There is the every other embodiment obtained under the premise of making creative work, shall fall within the protection scope of the present invention.
According to embodiments of the present invention, a kind of embodiment of profile acquisition method is provided, it should be noted that attached
The step of flow of figure illustrates can execute in the computer system of such as a group of computer-executable instructions, though also,
So logical order is shown in flow charts, but in some cases, it can be with different from shown by sequence execution herein
Or the step of description.
A kind of profile acquisition method provided in the present embodiment, can be used for computer, mobile phone, tablet computer etc., Fig. 1
It is the flow chart of profile acquisition method according to the ... of the embodiment of the present invention, as shown in Figure 1, the flow includes the following steps:
Step S101 obtains the attribute information of script tag in homepage face;
Step S102 obtains file path information according to attribute information;
Step S103, according to the corresponding configuration file of file path acquisition of information.
Through the above steps, corresponding configuration file is found by the attribute information in script tag in homepage face, kept away
Exempt to obtain configuration file by way of request, when solving in the prior art through request method acquisition configuration file,
Project publication using in the case of virtual route, when asked in front end project initiation the Actual path of its configuration file without
When virtual route, lead to not find configuration file problem, it is ensured that can be with real-time loading to configuration file.
Modification to configuration file for convenience is corresponded to according to file path acquisition of information in one alternate embodiment
Configuration file after, configuration file is stored into technical routine under the catalogue that need not be compiled.Configuration file belongs to static
Resource is not on the permanent staff and is translated in range, so that project can be changed maintenance again after being packaged.
In the prior art, it after having configured server address, is packaged after compiling to carry out disposing again and reach the standard grade.If taking this side
Formula needs front end that project is packaged and is issued again after server address changes, with changing server every time
Location is required for repacking, and cumbersome, risk is higher.In order to solve the above-mentioned technical problem, in one alternate embodiment,
In the case where server address changes, the configuration item that server address is used to indicate in the configuration file can be changed.
In Project Running Process, the setting option of system has multinomial, changes different setting options according to different needs, these settings
Item has all been put into configuration file, and changing mode can be manual modification, be realized by way of manual modification configuration file
The dynamic configuration effect of systematic parameter.Specifically, it can also modify to other configuration items of configuration file, such as file
Size, dynamic identifier etc..Specifically, dynamic change configuration file refers in Project Running Process, according to demand hand
Dynamic change configuration item, including:Refresh page, page loading configuration file;Object constant object in configuration file is applied to
In entire project;When the page sends request, relevant configuration information is obtained according to the correspondence configuration item in constant object;It is assembled into
Correctly when request, request address is updated to new server address.
In conjunction with attached drawing 1, when being run after project publication, system setting option or server address in project are not one one-tenth
Constant, there is the case where needing change, at this time if project has virtual route when issuing, it is necessary in homepage entrance text
Part introduces configuration file, so as to ensure that the system page normally finds configuration file, it is ensured that subsequent acquisition request
For newest server address.
In one alternate embodiment, in the case where the homepage face is html page, which is js files.Before
End request data format is generally json formats, and json formats are smaller, and data structure is clear, and front end can be with dynamic requests local
Json files in data realize the mode of configuration server address so as to get newest server address.
Homepage entry file is html page, and project can synchronize load relevant js and css files when rendering homepage face, this optional implementation
Configuration file is encapsulated as js files, it is ensured that html page can be with real-time loading to configuration file by example by HTML characteristics.
Additionally provide a kind of configuration file acquisition device in the present embodiment, the device is for realizing above-described embodiment and excellent
Embodiment is selected, repeating no more for explanation had been carried out.As used below, predetermined function may be implemented in term " module "
Software and/or hardware combination.Although device described in following embodiment is preferably realized with software, hardware,
Or the realization of the combination of software and hardware is also that may and be contemplated.
Fig. 2 is the structure diagram of configuration file acquisition device according to the ... of the embodiment of the present invention, as shown in Fig. 2, the device packet
It includes:First acquisition module 21, the attribute information for obtaining script tag in homepage face;Second acquisition module 22 is used for basis
The attribute information obtains file path information;Third acquisition module 23, for obtaining corresponding match according to this document routing information
Set file.
Optionally, which further includes:Memory module, for being obtained according to this document routing information in the third acquisition module
After taking corresponding configuration file, which is stored into technical routine under the catalogue that need not be compiled.
Optionally, which further includes:Modified module is used to indicate server address for changing in the configuration file
Configuration item.
Optionally, in the case where the homepage face is html page, which is js files.
Configuration file acquisition device in the present embodiment is presented in the form of functional unit, and unit here refers to
ASIC circuit, execute one or more softwares or fixed routine processor and memory and/or other above-mentioned work(can be provided
The device of energy.
The further function description of above-mentioned modules is identical as above-mentioned corresponding embodiment, and details are not described herein.
Referring to Fig. 3, the terminal may include:At least one processor 301, such as CPU (Central Processing
Unit, central processing unit), at least one communication interface 303, memory 304, at least one communication bus 302.Wherein, it communicates
Bus 302 is for realizing the connection communication between these components.Wherein, communication interface 303 may include display screen
(Display), keyboard (Keyboard), optional communication interface 303 can also include standard wireline interface and wireless interface.It deposits
Reservoir 304 can be high-speed RAM memory (Random Access Memory, effumability random access memory), also may be used
To be non-labile memory (non-volatile memory), for example, at least a magnetic disk storage.Memory 304 can
Choosing can also be at least one storage device for being located remotely from aforementioned processor 301.Wherein processor 301 can combine Fig. 2
Described device stores application program in memory 304, and processor 301 calls the program generation stored in memory 304
Code, for executing any of the above-described method and step, i.e., for performing the following operations:
Obtain the attribute information of script tag in homepage face;
File path information is obtained according to the attribute information;
According to the corresponding configuration file of the file path acquisition of information.
In the embodiment of the present invention, processor 301 calls the program code in memory 304, is additionally operable to execute following operation:
The configuration file is stored into technical routine under the catalogue that need not be compiled.
In the embodiment of the present invention, processor 301 calls the program code in memory 304, is additionally operable to execute following operation:
Change the configuration item that server address is used to indicate in the configuration file.
Wherein, communication bus 302 can be Peripheral Component Interconnect standard (peripheral component
Interconnect, abbreviation PCI) bus or expanding the industrial standard structure (extended industry standard
Architecture, abbreviation EISA) bus etc..Communication bus 302 can be divided into address bus, data/address bus, controlling bus etc..
For ease of indicating, only indicated with a thick line in Fig. 3, it is not intended that an only bus or a type of bus.
Wherein, memory 304 may include volatile memory (English:Volatile memory), such as arbitrary access
Memory (English:Random-access memory, abbreviation:RAM);Memory can also include nonvolatile memory (English
Text:Non-volatile memory), such as flash memory (English:Flash memory), hard disk (English:hard disk
Drive, abbreviation:HDD) or solid state disk is (English:Solid-state drive, abbreviation:SSD);Memory 304 can also wrap
Include the combination of the memory of mentioned kind.
Wherein, processor 301 can be central processing unit (English:Central processing unit, abbreviation:
CPU), network processing unit (English:Network processor, abbreviation:) or the combination of CPU and NP NP.
Wherein, processor 301 can further include hardware chip.Above-mentioned hardware chip can be application-specific integrated circuit
(English:Application-specific integrated circuit, abbreviation:ASIC), programmable logic device (English:
Programmable logic device, abbreviation:PLD) or combinations thereof.Above-mentioned PLD can be Complex Programmable Logic Devices
(English:Complex programmable logic device, abbreviation:CPLD), field programmable gate array (English:
Field-programmable gate array, abbreviation:FPGA), Universal Array Logic (English:generic array
Logic, abbreviation:GAL) or it is arbitrarily combined.
Optionally, memory 304 is additionally operable to storage program instruction.Processor 301 can be instructed with caller, be realized such as this
Apply for profile acquisition method shown in Fig. 1 embodiments.
The embodiment of the present invention additionally provides a kind of non-transient computer storage medium, and the computer storage media is stored with
Computer executable instructions, the computer executable instructions can perform the configuration file acquisition side in above-mentioned any means embodiment
Method.Wherein, the storage medium can be magnetic disc, CD, read-only memory (Read-Only Memory, ROM), deposit at random
Store up memory body (Random Access Memory, RAM), flash memory (Flash Memory), hard disk (Hard Disk
Drive, abbreviation:) or solid state disk (Solid-State Drive, SSD) etc. HDD;The storage medium can also include above-mentioned
The combination of the memory of type.
Although being described in conjunction with the accompanying the embodiment of the present invention, those skilled in the art can not depart from the present invention
Spirit and scope in the case of various modifications and variations can be made, such modifications and variations are each fallen within by appended claims institute
Within the scope of restriction.
Claims (10)
1. a kind of profile acquisition method, which is characterized in that including:
Obtain the attribute information of script tag in homepage face;
File path information is obtained according to the attribute information;
According to the corresponding configuration file of the file path acquisition of information.
2. according to the method described in claim 1, it is characterized in that, according to the corresponding configuration text of the file path acquisition of information
After part, further include:
The configuration file is stored into technical routine under the catalogue that need not be compiled.
3. according to the method described in claim 2, it is characterized in that, the method further includes:
Change the configuration item that server address is used to indicate in the configuration file.
4. according to any method in claims 1 to 3, which is characterized in that be the feelings of html page in the homepage face
Under condition, the configuration file is js files.
5. a kind of configuration file acquisition device, which is characterized in that including:
First acquisition module, the attribute information for obtaining script tag in homepage face;
Second acquisition module, for obtaining file path information according to the attribute information;
Third acquisition module, for according to the corresponding configuration file of the file path acquisition of information.
6. device according to claim 5, which is characterized in that described device further includes:
Memory module, for the third acquisition module according to the corresponding configuration file of the file path acquisition of information it
Afterwards, the configuration file is stored into technical routine under the catalogue that need not be compiled.
7. device according to claim 6, which is characterized in that described device further includes:
Modified module, for changing the configuration item for being used to indicate server address in the configuration file.
8. according to any device in claim 5 to 7, which is characterized in that be the feelings of html page in the homepage face
Under condition, the configuration file is js files.
9. a kind of terminal, which is characterized in that including:At least one processor;And connect at least one processor communication
The memory connect;Wherein, the memory is stored with the instruction that can be executed by one processor, described instruction by it is described extremely
A few processor executes, so that at least one processor executes any configuration text in the claims 1-4
Part acquisition methods.
10. a kind of computer readable storage medium, is stored thereon with computer instruction, which is characterized in that the instruction is by processor
Any profile acquisition method in the claims 1-4 is realized when execution.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810556684.1A CN108804155A (en) | 2018-05-31 | 2018-05-31 | Profile acquisition method, device, terminal and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810556684.1A CN108804155A (en) | 2018-05-31 | 2018-05-31 | Profile acquisition method, device, terminal and computer readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108804155A true CN108804155A (en) | 2018-11-13 |
Family
ID=64090044
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810556684.1A Pending CN108804155A (en) | 2018-05-31 | 2018-05-31 | Profile acquisition method, device, terminal and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108804155A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111708582A (en) * | 2020-05-21 | 2020-09-25 | 北京百度网讯科技有限公司 | Online configuration method and device and electronic equipment |
CN111797357A (en) * | 2020-07-12 | 2020-10-20 | 泰安协同软件有限公司 | Front-end integration method based on dependency injection and path mapping under Html |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102109989A (en) * | 2009-12-29 | 2011-06-29 | 阿里巴巴集团控股有限公司 | Method, device and system for controlling browser cache |
US8271836B2 (en) * | 2007-09-27 | 2012-09-18 | Microsoft Corporation | Capturing diagnostics in web browser applications |
CN107291458A (en) * | 2017-06-06 | 2017-10-24 | 北京知道创宇信息技术有限公司 | A kind of plug-in unit construction method, system and the server of Web applications |
-
2018
- 2018-05-31 CN CN201810556684.1A patent/CN108804155A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8271836B2 (en) * | 2007-09-27 | 2012-09-18 | Microsoft Corporation | Capturing diagnostics in web browser applications |
CN102109989A (en) * | 2009-12-29 | 2011-06-29 | 阿里巴巴集团控股有限公司 | Method, device and system for controlling browser cache |
CN107291458A (en) * | 2017-06-06 | 2017-10-24 | 北京知道创宇信息技术有限公司 | A kind of plug-in unit construction method, system and the server of Web applications |
Non-Patent Citations (1)
Title |
---|
佚名: ""js:读取配置文件"", 《HTTPS://WWW.JIANSHU.COM/P/76FF1083CCFC》 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111708582A (en) * | 2020-05-21 | 2020-09-25 | 北京百度网讯科技有限公司 | Online configuration method and device and electronic equipment |
CN111797357A (en) * | 2020-07-12 | 2020-10-20 | 泰安协同软件有限公司 | Front-end integration method based on dependency injection and path mapping under Html |
CN111797357B (en) * | 2020-07-12 | 2023-12-19 | 泰安协同软件有限公司 | Front-end integration method based on dependent injection and path mapping under Html |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20200412644A1 (en) | Content based routing method and apparatus | |
US20170185609A1 (en) | Universal adaptor for rapid development of web-based data visualizations | |
US10725757B2 (en) | Optimizing service deployment in a distributed computing environment | |
CN108777698A (en) | Webpage storage method, system and block chain node device | |
CN110019496B (en) | Data reading and writing method and system | |
CN109697055B (en) | Method and system for generating mobile App page | |
CN111125107A (en) | Data processing method, device, electronic equipment and medium | |
CN104113567A (en) | Content distribution network data processing method, device and system | |
CN113505302A (en) | Method, device and system for supporting dynamic acquisition of buried point data and electronic equipment | |
CN108804155A (en) | Profile acquisition method, device, terminal and computer readable storage medium | |
CN112965916B (en) | Page testing method, page testing device, electronic equipment and readable storage medium | |
CN112817562A (en) | Service processing method and device | |
CN111698109A (en) | Method and device for monitoring log | |
CN113536168B (en) | Component processing method and device | |
CN113722007B (en) | Configuration method, device and system of VPN branch equipment | |
CN113961298A (en) | Page switching method, device, equipment and medium | |
US11366613B2 (en) | Method and apparatus for writing data | |
CN113781154A (en) | Information rollback method, system, electronic equipment and storage medium | |
CN110909269B (en) | Log reporting method and device | |
US10990750B2 (en) | Dynamically bundling web page resources | |
CN113761415A (en) | Page display method and device | |
CN109840073B (en) | Method and device for realizing business process | |
CN112565472A (en) | Static resource processing method and device | |
US20230273802A1 (en) | Interface display method and apparatus, and electronic device and medium | |
CN110858240A (en) | Front-end module loading method and device |
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 | ||
TA01 | Transfer of patent application right | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20190705 Address after: Room 1286, Building 101, Bacun, Baolin, Baoshan District, Shanghai, 20199 Applicant after: SHANGHAI YOURTRIP INFORMATION TECHNOLOGY Co.,Ltd. Address before: 100034 4008, 4 floor, 9 building, 56 half moon street, Xicheng District, Beijing. Applicant before: SINOCHAIN TECHNOLOGY Co.,Ltd. |
|
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20181113 |