Summary of the invention
This specification embodiment provides a kind of resource exhibition method, device, computer equipment and computer-readable storage medium
Matter, can resource simple, that neatly more new resources displaying class control is shown.
In a first aspect, this specification embodiment provides a kind of resource exhibition method, comprising:
Search the associated more new resources of index information that the resource in the page shows class control;
If finding, when showing the page, the more new resources are loaded;
If not finding, when showing the page, the preset resource that the resource shows class control is loaded.
Optionally, the resource shows that the index information of class control includes the page iden-tity and the resource exhibition of the page
Show the control mark of class control, the control identifies to be configured in the resource displaying class control construction process.
Optionally, control mark includes that the resource shows the class name of the corresponding data transmission class of class control and described
The number of resource displaying class control.
Optionally, the resource searched in the page shows the associated more new resources of index information of class control, comprising:
The associated more new resources of index information that the resource in the page shows class control are searched by configuration manager.
Optionally, the index mark that the resource displaying class control in the page is searched by configuration manager is associated more
New resources, comprising: search the index that the resource in the page shows class control in local storage by the configuration manager
The more new resources of information association;
This method further include: the configuration manager is by the update resource downloading in server to the local storage.
Optionally, before the associated more new resources of index information for searching the resource displaying class control in the page, this method
Further include:
After the resource shows class control initialization example, the page iden-tity and control mark are obtained;
The index information is generated using the page iden-tity of acquisition and control mark.
Second aspect, this specification embodiment provide a kind of resource displaying device, comprising:
Resource lookup module is updated, the associated update money of index information of class control is shown for searching the resource in the page
Source;
First resource loading module, if when showing the page, loading the more new resources for finding;
Secondary resource loading module, if when showing the page, loading the resource for not finding and showing class control
Preset resource.
Optionally, the resource shows that the index information of class control includes the page iden-tity and the resource exhibition of the page
Show the control mark of class control, the control identifies to be configured in the resource displaying class control construction process.
Optionally, the control mark includes that the resource shows the corresponding executable file name of class control and the resource
Show the number of class control.
Optionally, the update resource lookup module is specifically used for:
The associated more new resources of index information that the resource in the page shows class control are searched by configuration manager.
Optionally, the update resource lookup module is specifically used for: through the configuration manager in local storage
Search the associated more new resources of index information that the resource in the page shows class control;
Further include configuration manager, be used for: by the update resource downloading by server to the local storage.
Optionally, further include index information generation module, be used for:
After the resource shows class control initialization example, the page iden-tity and control mark are obtained;
The index information is generated using the page iden-tity of acquisition and control mark.
The third aspect, this specification embodiment provide a kind of computer equipment, comprising:
Memory, for storing computer program;
Processor, the step of above-mentioned any means embodiment is realized when for executing the computer program.
Fourth aspect, this specification embodiment provide a kind of computer readable storage medium, are stored thereon with computer journey
The step of sequence, the computer program realizes above-mentioned any means embodiment when being executed by processor.
This specification embodiment has the beneficial effect that:
For resource show class control add index information, load its shown by resource before, first search the index letter
Associated more new resources are ceased, if finding, the more new resources is loaded if not finding and loads default resource.By this
Implementation, when needing more new resources to show resource shown by class control, it is only necessary to configuration more new resources, and and index information
Association, without rewriting code and updating software, implementation simple and flexible.
This specification embodiment provides configuration method, device, computer equipment and the calculating of a kind of resource displaying class control
Machine readable storage medium storing program for executing, can resource simple, that neatly more new resources displaying class control is shown.
In a first aspect, this specification embodiment provides a kind of configuration method of resource displaying class control, comprising:
Obtain the more new resources that resource shows class control;
The more new resources are shown that the index information of class control is associated with preservation with the resource, the index information is used for
Client searches the associated more new resources, and loads the update in the page where showing that the resource shows class control
Resource.
Optionally, the resource shows that the index information of class control includes the page iden-tity and the resource exhibition of the page
Show the control mark of class control, the control identifies to be configured in the resource displaying class control construction process.
Optionally, control mark includes that the resource shows the class name of the corresponding data transmission class of class control and described
The number of resource displaying class control.
Based on above-mentioned any means embodiment, optionally, this method further include:
To using the resource to show, at least one client of class control sends the more new resources.
Second aspect, this specification embodiment provide a kind of configuration device of resource displaying space-like, comprising:
Source obtaining module is updated, the more new resources of class control are shown for obtaining resource;
Resource conservation module is updated, for the more new resources to be shown that the index information of class control is associated with the resource
It saves, the index information searches the associated more new resources for client, and shows class control in the display resource
The more new resources are loaded when the page of place.
Optionally, the resource shows that the index information of class control includes the page iden-tity and the resource exhibition of the page
Show the control mark of class control, the control identifies to be configured in the resource displaying class control construction process.
Optionally, control mark includes that the resource shows the class name of the corresponding data transmission class of class control and described
The number of resource displaying class control.
Optionally, further include more new resources sending module, be used for:
To using the resource to show, at least one client of class control sends the more new resources.
The third aspect, this specification embodiment provide a kind of computer equipment, comprising:
Memory, for storing computer program;
Processor, the step of above-mentioned any means embodiment is realized when for executing the computer program.
Fourth aspect, this specification embodiment provide a kind of computer readable storage medium, are stored thereon with computer journey
The step of sequence, the computer program realizes above-mentioned any means embodiment when being executed by processor.
This specification embodiment has the beneficial effect that:
Show that class control adds index information for resource, correspondingly, needing more new resources to show shown by class control
When resource, more new resources are obtained, and be associated withs preservation with index information, so that client is before resource of the load shown by it,
The associated more new resources of the index information are first searched, if finding, load the more new resources, if not finding, load is silent
Recognize resource.Through this implementation, when needing more new resources to show resource shown by class control, it is only necessary to which configuration updates money
Source, and be associated with index information, without rewriting code and updating software, implementation simple and flexible.
Specific embodiment
In order to better understand the above technical scheme, below by attached drawing and specific embodiment to this specification embodiment
Technical solution be described in detail, it should be understood that the specific features in this specification embodiment and embodiment are to this explanation
The detailed description of book embodiment technical solution, rather than the restriction to this specification technical solution, in the absence of conflict,
Technical characteristic in this specification embodiment and embodiment can be combined with each other.
This specification embodiment provide resource exhibition method and resource show class control configuration method can with but not only
Limit is applied to system shown in FIG. 1.In the system shown in figure 1, the method that can be provided using this specification embodiment is realized
Dynamic resource updates: showing that class control is transformed to resource in advance, shows that class control assigns dynamic updating ability for resource,
As resource shows that class control adds index information, by the index information, on the one hand can find corresponding resource and show
On the other hand class control can find more new resources, to realize that resource shows the resource updates of class control.Wherein, it services
Device 101 obtains the more new resources that resource shows class control, and the more new resources and the resource are shown to the index information of class control
Association saves;Correspondingly, client device 102, which searches the resource in the page, shows the associated update money of the index information of class control
Source loads the more new resources when showing the page if finding, to realize that the dynamic that resource is shown updates.
Wherein, server 101 may include separate server, also may include the server group of multiple server compositions.
If topology both may include centralized server group including multiple servers, also may include distributed server group (such as
Server cluster, Cloud Server etc.).
Wherein, client device 102 can with but be not limited only to include mobile terminal, palm PC, PC machine.
The technical solution that this specification embodiment provides is carried out from client device side and server side separately below detailed
It describes in detail bright.
This specification embodiment provides a kind of resource exhibition method, and this method is applied in client device side, such as Fig. 2 institute
Show, this method comprises:
Step 201 searches the associated more new resources of index information that the resource in the page shows class control.
Wherein, the page can refer to the page shown in client software, correspondingly, the step is specifically soft by client
Part is realized;The page may also mean that the page of browser, correspondingly, the step is specifically to be realized by browser.
Wherein, more new resources are the concepts opposite with the resource displaying preset resource of class control, are referred to preset for replacing
The displaying content (such as text, picture) of resource.
If finding, when executing step 203, showing the above-mentioned page, above-mentioned more new resources are loaded.
If not finding, when executing step 205, showing the above-mentioned page, the preset money that above-mentioned resource shows class control is loaded
Source.
The technical solution that this specification embodiment provides shows that class control adds index information for resource, is loading its institute
Before the resource of display, the associated more new resources of the index information are first searched, if finding, the more new resources are loaded, if not
It finds, then loads default resource.By this implementation, more new resources is being needed to show resource shown by class control
When, it is only necessary to configuration more new resources, and be associated with index information, without rewriting code and updating software, implementation letter
It is single flexible.
As described above, the method that this specification embodiment provides, shows that class control assigns mobilism allocative abilities for resource,
The mobilism is mainly reflected in the dynamic modification to contents such as text, pictures, does not change original service logic, without compiling again
Write code.Class control distribution index information is shown particular by for resource, shows space-like by index information correlated resources
The resource (i.e. more new resources) modified with needs, to realize the dynamic modification of resource.Wherein, index information is for positioning control
Part, and it is associated with control and resource.To reach the purpose, index information may include page iden-tity (the i.e. page of the page where control
Face ViewId) and control control identify (DynamicId).In order to realize batch updating (such as to using identical version software
Multiple client on all carry out control show resource update, need to install the identical control in the client of identical version software
The index information of part is identical, and therefore, control mark, which can be resource and show in class control construction process, to be configured.
For client software, resource shows that the construction of class control is carried out in the compilation process of software, because
This, control mark is configured and is fixed up during software translating.Pass through the side of Remote configuration KEY-VALUE (key-value pair)
Formula issues more new resources, and the update of showing resource may be implemented in the control in all softwares for running corresponding version.
Further, above-mentioned control mark can also include resource show the corresponding data transmission class of class control (such as
Bundle class name and the resource) shows the number of class control.Wherein, resource shows that the number of class control can be constructed in control
Period by way of increasing the Custom Attributes of control newly configuring.
It should be pointed out that above are only index information data composition for example, in practical application, it is all to position
Class control is shown to resource, and the data format of control and resource associations can be used equally for index information.
Above-mentioned index information be it is preconfigured, the process for being pre-configured with index information is alternatively referred to as preprocessing process.Tool
Body, it can be according to the page file type (such as XML type, JAVA type) for showing class control comprising resource, selection text
The corresponding script of part type shows that class control configures Custom Attributes and category by the script selected for the resource in page file
Property value (i.e. the number of control).
Since page iden-tity and class name are all existing, thus, it is only required to be pre-configured with the number of control.
In the technical solution that this specification embodiment provides, there are many implementations of above-mentioned steps 201, a kind of preferred
In implementation, the index information that the resource in the page shows class control is searched by configuration manager (ConfigManager)
Associated more new resources.Specifically, sending inquiry request to configuration manager, phase is searched according to inquiry request by configuration manager
The more new resources answered.By calling configuration manager to realize, resource lookup, implementation are simple and efficient.
Further, in order to improve search efficiency, configuration manager can be arrived the update resource downloading in server
This secondary memory (such as disk, memory);Correspondingly, being searched in the page in local storage when requiring to look up more new resources
More new resources.
Wherein, configuration manager can access server after client software starting;It can also be according to the scheduled period
Server is accessed, and downloads more new resources;Server can also be accessed according to the update notification of server, and download update money
Source.
Certainly, the technical solution that this specification embodiment provides directly can also search more new resources in server end.
In this specification embodiment, update resource conservation is in specific storage location (in such as server or local storage
Particular memory location), in a kind of implementation, newest more new resources are only saved in the storage location, for example, resource management
After device has downloaded more new resources, history more new resources can be override, then, it is in the more new resources that the storage location is found
The resource for needing to show;In another implementation, newest more new resources are not only saved in the storage location, also preservation history
More new resources, then, the target of lookup is newest more new resources, and the implementation for judging whether it is newest more new resources has
It is a variety of, for example, each more new resources Jun You version number, judges whether it is newest more new resources by version number, in another example, often
A more new resources are corresponding with renewal time, judge whether it is newest more new resources by renewal time.
In above method embodiment, the index information of control is made of multiple marks, correspondingly, empty to save storage
Between, it does not need to pre-save index information, but generates index information when requiring to look up more new resources.Correspondingly, searching
Before resource in the page shows the associated more new resources of index information of class control, show that the initialization of class control is real in the resource
After example, above-mentioned page iden-tity and above-mentioned control mark are obtained;Index information is generated using page iden-tity and the control mark of acquisition.
The resource exhibition method that this specification embodiment provides, the resource suitable for client software show class control institute
The dynamic of showing resource updates, and the resource being also applied in browser page shows that the dynamic of class control institute showing resource updates.
Below by taking the resource in client software shows the dynamic update of class control institute showing resource as an example, to this specification
The resource exhibition method that embodiment provides is described in detail.
As shown in figure 3, calling configuration manager more new resources first are matched after client software starting (i.e. program operation)
It sets, i.e., configuration manager downloads more new resources (induction disk update) from server end.Specifically, configuration manager can be to clothes
Business device end sends resource updates request, and the version number of client software is carried in the request, if the client software has update money
Source, then server end more will be sent to configuration manager by new resources;Configuration manager will update resource conservation to local storage,
Realize the synchronization of more new resources.
It completes after updating resource distribution, client software is that resource shows that class control initializes example, later, reads resource
Bundle name (BundleName, i.e. the resource exhibition of the page iden-tity (ViewId), client software of the page where showing class control
Show the class name of class control corresponding data transmission class) and resource displaying class number (ID), index is generated by cascade mode
Information (CombinedID).
That is CombinedId=ViewId+BundleName+ID
Such as: 1058601064_alipass_16,1058608495_antui_2.Wherein, " 1058601064 ",
" 1058608495 " are ViewID, and " alipass ", " antui " are BundleName, and " 16 ", " 2 " are the number of control.
It should be pointed out that and not all resource shows that class control supports dynamic more new resources, that is, have index information.Cause
This, the resource that client software is directed to the number for finding control shows that class control generates index xinxi, to not finding control
Number resource show class control according to existing service logic carry out resource load.
Show that class control, client software call configuration manager (i.e. setting resource side for the resource for finding number
Method is called), more new resources (i.e. replacement resource) is searched using index information (CombinedID) by configuration manager, if searching
It arrives, then when showing the page, load more new resources (implement replacement), if not finding, when showing the page, load control
Preset resource (i.e. original logic).
The technical solution that this specification embodiment provides is that a kind of mobilism of lightweight is energized scheme, and business development is basic
Unaware, processes of research & development is without adjustment;Mobilism is mainly reflected in the dynamic modification to contents such as text, pictures.
Based on inventive concept same as method, this specification embodiment provides a kind of resource displaying device, such as Fig. 4 institute
Show, comprising:
Resource lookup module 401 is updated, shows that the index information of class control is associated more for searching the resource in the page
New resources;
First resource loading module 402, if when showing the page, loading the more new resources for finding;
Secondary resource loading module 403, if when showing the page, loading the resource for not finding and showing class
The preset resource of control.
Optionally, the resource shows that the index information of class control includes the page iden-tity and the resource exhibition of the page
Show the control mark of class control, the control identifies to be configured in the resource displaying class control construction process.
Optionally, the control mark includes that the resource shows the corresponding executable file name of class control and the resource
Show the number of class control.
Optionally, the update resource lookup module is specifically used for:
The associated more new resources of index information that the resource in the page shows class control are searched by configuration manager.
Optionally, the update resource lookup module is specifically used for: through the configuration manager in local storage
Search the associated more new resources of index information that the resource in the page shows class control;
Further include configuration manager, be used for: by the update resource downloading by server to the local storage.
Optionally, further include index information generation module, be used for:
After the resource shows class control initialization example, the page iden-tity and control mark are obtained;
The index information is generated using the page iden-tity of acquisition and control mark.
Based on inventive concept same as method, this specification embodiment provides a kind of computer equipment, comprising: storage
Device, for storing computer program;Processor realizes above-mentioned any means embodiment when for executing the computer program
Step.
Based on inventive concept same as method, this specification embodiment provides a kind of computer readable storage medium,
On be stored with computer program, the computer program realizes above-mentioned any means embodiment when being executed by processor the step of.
This specification embodiment provides a kind of configuration method of resource displaying class control, and this method is applied in server side,
As shown in figure 5, this includes:
Step 502 obtains the more new resources that resource shows class control.
Wherein it is possible to be inputted on the server by staff, server obtains the more new resources of input;Service
The device more new resources that also available other equipment are sent.
Server also obtains the control index that the resource shows class control together, to identify the corresponding control of more new resources
Part.
The more new resources are shown that the index information of class control is associated with preservation, the index with the resource by step 504
Information searches the associated more new resources for client, and loads in the page where showing that the resource shows class control
The more new resources.
The method that this specification embodiment provides shows that class control adds index information for resource, correspondingly, needing more
When new resources show resource shown by class control, more new resources are obtained, and preservation is associated with index information, so that client exists
Before loading the resource shown by it, the associated more new resources of the index information are first searched, if finding, load update money
Source loads default resource if not finding.By this implementation, more new resources is being needed to show shown by class control
Resource when, it is only necessary to configuration more new resources and be associated withs with index information, without rewriting code and updating software, realization
Mode simple and flexible.
Optionally, the resource shows that the index information of class control includes the page iden-tity and the resource exhibition of the page
Show the control mark of class control, the control identifies to be configured in the resource displaying class control construction process.
Optionally, control mark includes that the resource shows the class name of the corresponding data transmission class of class control and described
The number of resource displaying class control.
As described in above-mentioned resource display method embodiment, identical control in the client software of same version can be with
Batch updating is realized based on identical index information.Based on above-mentioned any means embodiment, optionally, this method further include: to
Show that at least one client of class control sends the more new resources using the resource.
Wherein, server end can be by issuing update notification to active transmission more new resources, can also be according to client
The request at end sends more new resources.
Based on inventive concept same as method, this specification embodiment provides a kind of configuration dress of resource displaying space-like
It sets, as shown in Figure 6, comprising:
Source obtaining module 601 is updated, shows the corresponding more new resources of class control for obtaining resource;
Resource conservation module 602 is updated, for the more new resources and the resource to be shown to the index information of class control
Association saves, and the index information searches the associated more new resources for client, and loads when showing the page
The more new resources.
Optionally, the resource shows that the index information of class control includes the page iden-tity and the resource exhibition of the page
Show the control mark of class control, the control identifies to be configured in the resource displaying class control construction process.
Optionally, control mark includes that the resource shows the class name of the corresponding data transmission class of class control and described
The number of resource displaying class control.
Optionally, further include more new resources sending module, be used for:
To using the resource to show, at least one client of class control sends the more new resources.
Based on inventive concept same as method, this specification embodiment provides a kind of computer equipment, comprising:
Memory, for storing computer program;
Processor, the step of above-mentioned any means embodiment is realized when for executing the computer program.
Based on inventive concept same as method, this specification embodiment provides a kind of computer readable storage medium,
On be stored with computer program, the computer program realizes above-mentioned any means embodiment when being executed by processor the step of.
This specification is referring to the method, equipment (system) and computer program product according to this specification embodiment
Flowchart and/or the block diagram describes.It should be understood that can be realized by computer program instructions every in flowchart and/or the block diagram
The combination of process and/or box in one process and/or box and flowchart and/or the block diagram.It can provide these computers
Processor of the program instruction to general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices
To generate a machine, so that generating use by the instruction that computer or the processor of other programmable data processing devices execute
In setting for the function that realization is specified in one or more flows of the flowchart and/or one or more blocks of the block diagram
It is standby.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,
Enable the manufacture of equipment, the commander equipment realize in one box of one or more flows of the flowchart and/or block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or
The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one
The step of function of being specified in a box or multiple boxes.
Although the preferred embodiment of this specification has been described, once a person skilled in the art knows basic wounds
The property made concept, then additional changes and modifications may be made to these embodiments.So the following claims are intended to be interpreted as includes
Preferred embodiment and all change and modification for falling into this specification range.
Obviously, those skilled in the art can carry out various modification and variations without departing from this specification to this specification
Spirit and scope.In this way, if these modifications and variations of this specification belong to this specification claim and its equivalent skill
Within the scope of art, then this specification is also intended to include these modifications and variations.