CN105320672A - Webpage editing method and server - Google Patents

Webpage editing method and server Download PDF

Info

Publication number
CN105320672A
CN105320672A CN201410299175.7A CN201410299175A CN105320672A CN 105320672 A CN105320672 A CN 105320672A CN 201410299175 A CN201410299175 A CN 201410299175A CN 105320672 A CN105320672 A CN 105320672A
Authority
CN
China
Prior art keywords
code
client
web page
page files
server
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
Application number
CN201410299175.7A
Other languages
Chinese (zh)
Other versions
CN105320672B (en
Inventor
宁玉波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201410299175.7A priority Critical patent/CN105320672B/en
Publication of CN105320672A publication Critical patent/CN105320672A/en
Application granted granted Critical
Publication of CN105320672B publication Critical patent/CN105320672B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a webpage editing method and a server. The method comprises the steps of receiving information which is sent by a client and used for requesting first codes stored by the server, wherein each first code is provided with a unique corresponding first code ID; sending the first codes and the first codes ID to the client; receiving and storing second codes ID sent by the client in the first codes ID, and marking the second codes ID to correspond to webpage files edited by the client, wherein the second codes ID are used for labeling the second codes in the first codes, and the second codes represent the first codes added into the webpage files by the client; according to the stored second codes ID, sending information which is used for updating or recovering the second codes in the webpage files to the client. The webpage editing method and server solve the technical problems that more server resources need to be occupied according to existing schemes for tracking edited webpages.

Description

Page authoring method and server
Technical field
The present invention relates to internet, applications field, in particular to a kind of page authoring method and server.
Background technology
At present, in order to enable server to client compile webpage, be especially carried in webpage development framework with code form occur web pages component carry out track record, a kind of feasible web page editing mode is that webpage development personnel are at client-side editor webpage, then this web page files in netting page correspondence is uploaded to server termly, also backup to server side by developer by the webpage of client-side editing, thus server can be followed the tracks of the webpage client-side editor.But, the size of complete web page files is usually larger, when the quantity for the client of editing webpage being connected to server is more, larger pressure will be brought for the network data transmission interface of server, and bring larger flow burden for developer.
Another kind of feasible scheme is that web page editing logic is arranged on server side, client-side is responsible for the seizure of the generation of editing interface and the editing operation to webpage development personnel, and the editing operation captured is uploaded to server, and then make server according to the editing operation of uploading to being maintained in the augmenting in the content of netting page file of server side, deleting and amendment, finally after webpage development process terminates, issue by server the web page files editted to client.But, for this scheme, the execution operation of Web-Page Software in other words of web page editing logic needs to take more resource usually, as processor resource, system resource and memory resource etc., when be connected to server for show editing interface and catch the quantity of the client of editing operation more time, larger processing pressure will be brought for server, thus have influence on the response speed of whole system.In other words, for such scheme, when the client that server connects is more, load problem bigger than normal will be faced.
For above-mentioned problem, at present effective solution is not yet proposed.
Summary of the invention
Embodiments provide a kind of page authoring method and server, at least to solve the existing technical matters to carrying out tracking scheme at netting page and needing to take more server resource.
According to an aspect of the embodiment of the present invention, provide a kind of page authoring method, comprise: the message receiving the first code stored for request server that client sends, wherein, above-mentioned first code is for adding to by the web page files of above-mentioned client-side editing, the page object that the web page display first code making above-mentioned web page files corresponding represents, and each above-mentioned first code has unique corresponding first code ID; Above-mentioned first code and above-mentioned first code ID is sent to above-mentioned client; Receive and preserve the second code ID in the above-mentioned first code ID of above-mentioned client transmission, and above-mentioned second code ID is labeled as corresponding with the web page files of above-mentioned client-side editing, wherein, above-mentioned second code ID is for identifying the second code in above-mentioned first code, and above-mentioned second code represents adds the first code in above-mentioned web page files to by above-mentioned client; Send the message being used to indicate and upgrading or recover the above-mentioned second code in above-mentioned web page files to above-mentioned client according to the above-mentioned second code ID preserved.
According to the another aspect of the embodiment of the present invention, additionally provide a kind of server, comprise: the first receiving element, for receiving the message of the first code stored for request server that client sends, wherein, above-mentioned first code for adding to by the web page files of above-mentioned client-side editing, the page object that the web page display first code making above-mentioned web page files corresponding represents, and each above-mentioned first code has unique corresponding first code ID; First transmitting element, for sending above-mentioned first code and above-mentioned first code ID to above-mentioned client; Second receiving element, for receiving and preserving the second code ID in the above-mentioned first code ID of above-mentioned client transmission, and above-mentioned second code ID is labeled as corresponding with the web page files of above-mentioned client-side editing, wherein, above-mentioned second code ID is for identifying the second code in above-mentioned first code, and above-mentioned second code represents adds the first code in above-mentioned web page files to by above-mentioned client; Second transmitting element, for sending the message being used to indicate and upgrading or recover the above-mentioned second code in above-mentioned web page files to above-mentioned client according to the above-mentioned second code ID preserved.
In embodiments of the present invention, have employed the web page editing logic of simplification is arranged on client-side, by webpage development personnel by add in the operation of client-side web pages component in web page files with its identification item also namely the form of code ID upload and be kept at the mode of server side, reach in realization under the prerequisite of following the tracks of at netting page, reduce the effect of load of server, and then solve the existing technical matters to carrying out tracking scheme at netting page and needing to take more server resource.Further, in embodiments of the present invention, the record at netting page occurred with code ID form can safeguarded according to server side, web pages component in web page files notifies that client upgrades when there is corresponding more fresh code, or when client needs the webpage of the pre-editing of recovery, the web pages component in web page files is recovered.
Accompanying drawing explanation
Accompanying drawing described herein is used to provide a further understanding of the present invention, and form a application's part, schematic description and description of the present invention, for explaining the present invention, does not form inappropriate limitation of the present invention.In the accompanying drawings:
Fig. 1 is the schematic diagram of a kind of optional page authoring method according to the embodiment of the present invention;
Fig. 2 is the schematic diagram according to the optional page authoring method of the another kind of the embodiment of the present invention;
Fig. 3 is the schematic diagram of another the optional page authoring method according to the embodiment of the present invention;
Fig. 4 is the schematic diagram of another the optional page authoring method according to the embodiment of the present invention;
Fig. 5 is the schematic diagram of another the optional page authoring method according to the embodiment of the present invention;
Fig. 6 is the schematic diagram of a kind of optional server according to the embodiment of the present invention.
Embodiment
The present invention program is understood better in order to make those skilled in the art person, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the embodiment of a part of the present invention, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, should belong to the scope of protection of the invention.
It should be noted that, term " first ", " second " etc. in instructions of the present invention and claims and above-mentioned accompanying drawing are for distinguishing similar object, and need not be used for describing specific order or precedence.Should be appreciated that the data used like this can be exchanged in the appropriate case, so as embodiments of the invention described herein can with except here diagram or describe those except order implement.In addition, term " comprises " and " having " and their any distortion, intention is to cover not exclusive comprising, such as, contain those steps or unit that the process of series of steps or unit, method, system, product or equipment is not necessarily limited to clearly list, but can comprise clearly do not list or for intrinsic other step of these processes, method, product or equipment or unit.
Embodiment 1
According to the embodiment of the present invention, provide a kind of page authoring method, as shown in Figure 1, the method comprises:
S102: the message receiving the first code stored for request server that client sends, wherein, first code is for adding in the web page files by client-side editing, the page object that the web page display first code making web page files corresponding represents, and each first code has unique corresponding first code ID;
S104: send first code and first code ID to client;
S106: receive and preserve the second code ID in the first code ID of client transmission, and second code ID is labeled as corresponding with the web page files of client-side editing, wherein, second code ID is for identifying the second code in first code, and second code represents the first code of being added to by client in web page files;
S108: the message sending the second code be used to indicate in renewal or instauration net page file according to the second code ID preserved to client.
Will be clear that, one of embodiment of the present invention problem to be solved is to provide a kind of method, so that the webpage compiled client, especially be carried in webpage development framework with code form occur web pages component carry out track record, and then the information of record can be utilized to follow the tracks of at the webpage compiled, reach in time to the object of the more new state of client notice web pages component, or recover to return in the message of the web page files compiled the reference record about this webpage being maintained in server side to client in response to the request that client sends, to enable client according to the webpage of the pre-editing of the record recovery client returned.
For reaching this purpose, a kind of feasible scheme is that webpage development personnel are at client-side editor webpage, then this web page files in netting page correspondence is uploaded to server termly, also backup to server side by developer by the webpage of client-side editing, thus server can be followed the tracks of the webpage client-side editor.But, the size of complete web page files is usually larger, when the quantity for the client of editing webpage being connected to server is more, larger pressure will be brought for the network data transmission interface of server, and bring larger flow burden for developer.
Another kind of feasible scheme is that web page editing logic is arranged on server side, client-side is responsible for the seizure of the generation of editing interface and the editing operation to webpage development personnel, and the editing operation captured is uploaded to server, and then make server according to the editing operation of uploading to being maintained in the augmenting in the content of netting page file of server side, deleting and amendment, finally after webpage development process terminates, issue by server the web page files editted to client.But, for this scheme, the execution operation of Web-Page Software in other words of web page editing logic needs to take more resource usually, as processor resource, system resource and memory resource etc., when be connected to server for show editing interface and catch the quantity of the client of editing operation more time, larger processing pressure will be brought for server, thus have influence on the response speed of whole system.In other words, for such scheme, when the client that server connects is more, load problem bigger than normal will be faced.
For reducing the load of server and providing the following function at netting page, in embodiments of the present invention, have employed and the web page editing logic of simplification is arranged on client-side, webpage development personnel are uploaded by the web pages component added in the operation of client-side in web page files with the form that its identification item is also code ID and are kept at the mode of server side, reach in realization under the prerequisite of following the tracks of at netting page, reduce the effect of the load of server, and then solve the existing technical matters to carrying out tracking scheme at netting page and needing to take more server resource.Further, in embodiments of the present invention, the record at netting page occurred with code ID form can safeguarded according to server side, web pages component in web page files notifies that client upgrades when there is corresponding more fresh code, or when client needs the webpage of the pre-editing of recovery, the web pages component in web page files is recovered.
Below with reference to the drawings and specific embodiments, technical solution of the present invention is made a more detailed description.
According to the page authoring method that the embodiment of the present invention provides, in step s 102, server can receive the message of the first code stored for request server that client sends, and then in step S104, server can send first code and first code ID to client.Particularly, in embodiments of the present invention, first code for adding in the web page files by client-side editing, the page object represented by first code with the web page display making web page files corresponding, and each first code has unique corresponding first code ID.
In embodiments of the present invention, first code can be the script of web pages component usually, wherein, these codes or web pages component can be editted by webpage development personnel in advance, and reuse in multiple webpage development project, in multiple webpage, realize similar expression effect to reach and avoid developer to carry out repeating to write the object of work.Particularly, these web pages component both can be static components, corresponding to the relatively-stationary rendering content in webpage, also can be dynamic assemblies, corresponding to the variable rendering content in webpage.But this and do not mean that restriction constituted to the present invention, such as, in some embodiments of the invention, for add in the web page files of client-side editor and the first code making this web page files show corresponding page object is not limited to " web pages component " this concept or appellation.
Further, in embodiments of the present invention, the first code of a certain page object of unique display that what each section was relatively complete can be used for all can be provided with a first code ID, particularly, if first code is web pages component, then this first code ID also can be considered as being the web pages component ID for identifying different web pages component.More specifically, in embodiments of the present invention, the character string that first code ID can be made up of numeral and/or letter usually, such as, the each self-corresponding first code ID of web pages component A and B as first code can be 001 and 002 respectively, also can be 001.a and 001.b, wherein, No. ID " 001 " attached before " .a " and " .b " may be used for identifying the assembly bag code packages etc. in other words comprising web pages component A and B, and the present invention is not construed as limiting this.
On this basis, in embodiments of the present invention, server can after the message receiving the acquisition request first code that client sends, first code itself and the first code ID for identifying first code is returned to client, the first code that user then can ask before client-side uses edits webpage, such as directly the first code downloaded can be inserted in the web page files of pre-editing by client, or, also the mode of external linkage can be used to quote first code, etc.When client relates to the use to certain first code, the first code ID that the first code of use is corresponding can be recorded, server is uploaded to as web page editing record, such as, user inserts above-mentioned web pages component A and B by client in web page files, then client does not need the whole section of code of web pages component A and B to be uploaded to server to realize server to the tracking of client at netting page, and each for web pages component A and B self-corresponding first code ID such as 001.a and 001.b can only upload onto the server by client.Under above-mentioned scene, because server itself has just safeguarded first code, therefore server can restore the webpage of client when pre-editing to a certain extent in conjunction with the first code ID of client upload, thus realizes the tracking of client at netting page.
Also be, according to the page authoring method that the embodiment of the present invention provides, in step s 106, server can receive and preserve the second code ID of client transmission, and second code ID is labeled as corresponding with the web page files of client-side editing, wherein, second code ID represents the first code ID that the first code of being added in web page files by client is corresponding.
On basis described above, further, according to the page authoring method that the embodiment of the present invention provides, in step S108, server can send the message of the second code be used to indicate in renewal or instauration net page file to client according to the second code ID preserved.Also be, in embodiments of the present invention, server can utilize followed the tracks of web page editing information to notify the more new state of the assembly of client in netting page in time, or recover to return web page editing information in the message of netting page to client in response to client-requested, so that make client can go out the webpage of first pre-editing according to the information reverting of passback.
Particularly, as shown in Figure 2, in embodiments of the present invention, step S108 can comprise:
S202: if exist and any one the corresponding more fresh code in the second code ID preserved, then notify that any one the corresponding second code with this in client terminal web page file is in renewable state; Or,
S204: return second code ID to client, uses the second code in the second code ID returned and first code instauration net page file for making client.
As the embody rule mode of the client of preserving with the form of first code ID server side at the web page editing information track record in other words of netting page, in embodiments of the present invention, a kind of optional scheme is that integrating step S202 carries out update notification to client.Particularly, server can when detecting more fresh code corresponding to second code ID existed with preservation, judge that the code that the second code corresponding with this second code ID is used by client in first code is in other words in renewable state, and then this situation can be informed to client by server, so that whether user selects to upgrade when the respective code in the webpage of pre-editing by client.Also namely, in embodiments of the present invention, after step S202, above-mentioned page authoring method can also comprise:
S2, receive the request that client sends and upgrade the message of any one corresponding second code with this being in renewable state;
S4, send with this any one corresponding more fresh code to client, be used to indicate client and use any one corresponding second code with this in renewal code update web page files.
Such as, in one embodiment, if the second code ID of client upload comprises 001.a and 001.b, and 001.a and 001.b is respectively used to presentation web page assembly A and B, then server detect web pages component A that it is safeguarded be updated to code that A ', the in other words code of web pages component A be updated to A ' also namely above-mentioned more fresh code time, then server can notify the correspondence in client terminal web page file or webpage development project web pages component also namely the example of web pages component A be in renewable state.If client asks to upgrade the web pages component in web page files further, then server can by more fresh code also namely the code of A ' be handed down to client, so that make client upgrade according to the more example of fresh code to the correspondence in web page files.
Further alternatively, as shown in Figure 3, in embodiments of the present invention, before the second code corresponding with any one in notice client terminal web page file is in renewable state, method also comprises:
S302: receive and preserve the third generation code that any client uploads;
S304: judge whether third generation code belongs to same author with the second code identified by any one; And/or,
S306: judge that whether corresponding the third generation code ID of third generation code is consistent with any one; Wherein,
If third generation code and the second code identified by any one belong to same author and/or third generation code ID is corresponding consistent with any one, then perform step S308;
S308: judge that whether the content of third generation code is consistent with the content of the second code identified by any one, if inconsistent, then performs step S310;
S310: if the content of third generation code is inconsistent with the content of the second code identified by any one, then judge to there is the more fresh code corresponding with any one, and more fresh code is third generation code.
For ease of building the shared platform of an open code or web pages component, and avoid multiple different developer to carry out editing the version conflict that may bring to same web pages component independently of one another, in embodiments of the present invention, can limit the update mode of the first code being maintained in server.Such as, the renewal inspection based on code authors and/or code ID described in above-mentioned steps can be adopted, if the second code used for client more in fresh code and the first code of originally preserving or first code comes from different authors or has different code ID, then can refuse to use the renewal rewards theory that the more code of fresh code to script preservation carries out.Further, if judge, more fresh code belongs to same author with the code originally preserved and/or has identical or corresponding ID, then can think that more fresh code have passed to upgrade to check, and then server can upgrade the code originally preserved according to more fresh code, and can notify that client upgrades corresponding second code accordingly.
In addition, in embodiments of the present invention, another kind of optional scheme is that integrating step S204 recovers the webpage that client is edited.Particularly, in embodiments of the present invention, server can in response to the message of client-requested instauration net page file, the second code ID corresponding with this web page files being kept at server side is returned, so that the second code in the second code ID making client to use to return and first code instauration net page file to client.Also namely, in embodiments of the present invention, before step S204, above-mentioned page authoring method can also comprise:
S6: the message receiving the request instauration net page file that client sends.
Such as, in one embodiment, if the second code ID of client upload comprises 001.a and 001.b, and 001.a and 001.b is respectively used to presentation web page assembly A and B, then server recovers after the message of the web page files compiled in the request receiving client transmission, can return to client the second code ID corresponding with this web page files preserved, be also 001.a and 001.b, and then client can recover its webpage edited according to the second code ID of passback.
Further alternatively, consider the position of multiple web objects in webpage corresponding to second code, the complicacy of hierarchical relationship, as shown in Figure 4, in embodiments of the present invention, step S106 can comprise:
S402: receive and preserve the second code ID and page object parameter that client sends, wherein, page object parameter is for describing form in the webpage that web page files is corresponding of page object represented by second code or position relationship; Wherein,
Step S204 can comprise:
S404: return second code ID and page object parameter to client, uses the second code in second code ID, first code and the page object Parameter reconstruction web page files returned for making client.
By this mode, just can recover the webpage of the first pre-editing of client more perfectly, but the present invention can't limit all kinds of parameters that page object parameter specifically comprises, such as it can comprise coordinate information, also map data mining platform can be comprised, can also comprise other configuration information as information such as size, display states, the present invention does not limit this.
On the other hand, alternatively, for convenience of server, the concrete web page files that certain is being compiled is followed the tracks of, and strengthen second code ID that server preserves and associating between web page files, as shown in Figure 5, in embodiments of the present invention, above-mentioned steps S106 can comprise:
S502: receive and preserve the second code ID of client transmission and the web page files ID of the web page files corresponding with second code ID; Wherein,
Before step S204, above-mentioned page authoring method can also comprise:
S504: receive client send carry web page files ID and for asking the request message of instauration net page file; Wherein,
Step S204 can comprise:
S506: return the second code ID corresponding with the web page files ID be carried in request message in the second code ID preserved to client.
By above embodiment, be described technical solution of the present invention, but should be understood that, above-described embodiment, only for the understanding of the present invention and enforcement, can't form any restriction to the present invention.
It should be noted that, for aforesaid each embodiment of the method, in order to simple description, therefore it is all expressed as a series of combination of actions, but those skilled in the art should know, the present invention is not by the restriction of described sequence of movement, because according to the present invention, some step can adopt other orders or carry out simultaneously.Secondly, those skilled in the art also should know, the embodiment described in instructions all belongs to preferred embodiment, and involved action and module might not be that the present invention is necessary.
Through the above description of the embodiments, those skilled in the art can be well understood to the mode that can add required general hardware platform by software according to the method for above-described embodiment and realize, hardware can certainly be passed through, but in a lot of situation, the former is better embodiment.Based on such understanding, technical scheme of the present invention can embody with the form of software product the part that prior art contributes in essence in other words, this computer software product is stored in a storage medium (as ROM/RAM, magnetic disc, CD), comprising some instructions in order to make a station terminal equipment (can be mobile phone, computing machine, server, or the network equipment etc.) perform method described in each embodiment of the present invention.
Embodiment 2
According to the embodiment of the present invention, additionally provide a kind of server for implementing above-mentioned page authoring method, as shown in Figure 6, this server comprises:
1) the first receiving element 602, for receiving the message of the first code stored for request server that client sends, wherein, first code is for adding in the web page files by client-side editing, the page object that the web page display first code making web page files corresponding represents, and each first code has unique corresponding first code ID;
2) the first transmitting element 604, for sending first code and first code ID to client;
3) the second receiving element 606, for receiving and preserving the second code ID in the first code ID of client transmission, and second code ID is labeled as corresponding with the web page files of client-side editing, wherein, second code ID is for identifying the second code in first code, and second code represents the first code of being added to by client in web page files;
4) the second transmitting element 608, for sending the message of the second code be used to indicate in renewal or instauration net page file to client according to the second code ID preserved.
Will be clear that, one of embodiment of the present invention problem to be solved is to provide a kind of server, so that the webpage compiled client, especially be carried in webpage development framework with code form occur web pages component carry out track record, and then the information of record can be utilized to follow the tracks of at the webpage compiled, reach in time to the object of the more new state of client notice web pages component, or recover to return in the message of the web page files compiled the reference record about this webpage being maintained in server side to client in response to the request that client sends, to enable client according to the webpage of the pre-editing of the record recovery client returned.
For reaching this purpose, a kind of feasible scheme is that webpage development personnel are at client-side editor webpage, then this web page files in netting page correspondence is uploaded to server termly, also backup to server side by developer by the webpage of client-side editing, thus server can be followed the tracks of the webpage client-side editor.But, the size of complete web page files is usually larger, when the quantity for the client of editing webpage being connected to server is more, larger pressure will be brought for the network data transmission interface of server, and bring larger flow burden for developer.
Another kind of feasible scheme is that web page editing logic is arranged on server side, client-side is responsible for the seizure of the generation of editing interface and the editing operation to webpage development personnel, and the editing operation captured is uploaded to server, and then make server according to the editing operation of uploading to being maintained in the augmenting in the content of netting page file of server side, deleting and amendment, finally after webpage development process terminates, issue by server the web page files editted to client.But, for this scheme, the execution operation of Web-Page Software in other words of web page editing logic needs to take more resource usually, as processor resource, system resource and memory resource etc., when be connected to server for show editing interface and catch the quantity of the client of editing operation more time, larger processing pressure will be brought for server, thus have influence on the response speed of whole system.In other words, for such scheme, when the client that server connects is more, load problem bigger than normal will be faced.
For reducing the load of server and providing the following function at netting page, in embodiments of the present invention, have employed and the web page editing logic of simplification is arranged on client-side, webpage development personnel are uploaded by the web pages component added in the operation of client-side in web page files with the form that its identification item is also code ID and are kept at the mode of server side, reach in realization under the prerequisite of following the tracks of at netting page, reduce the effect of the load of server, , and then solve the existing technical matters to carrying out tracking scheme at netting page and needing to take more server resource.Further, in embodiments of the present invention, the record at netting page occurred with code ID form can safeguarded according to server side, web pages component in web page files notifies that client upgrades when there is corresponding more fresh code, or when client needs the webpage of the pre-editing of recovery, the web pages component in web page files is recovered.
Below with reference to the drawings and specific embodiments, technical solution of the present invention is made a more detailed description.
According to the server that the embodiment of the present invention provides, by the first receiving element 602, server can receive the message of the first code stored for request server that client sends, and then by the first transmitting element 604, server can send first code and first code ID to client.Particularly, in embodiments of the present invention, first code for adding in the web page files by client-side editing, the page object represented by first code with the web page display making web page files corresponding, and each first code has unique corresponding first code ID.
In embodiments of the present invention, first code can be the script of web pages component usually, wherein, these codes or web pages component can be editted by webpage development personnel in advance, and reuse in multiple webpage development project, in multiple webpage, realize similar expression effect to reach and avoid developer to carry out repeating to write the object of work.Particularly, these web pages component both can be static components, corresponding to the relatively-stationary rendering content in webpage, also can be dynamic assemblies, corresponding to the variable rendering content in webpage.But this and do not mean that restriction constituted to the present invention, such as, in some embodiments of the invention, for add in the web page files of client-side editor and the first code making this web page files show corresponding page object is not limited to " web pages component " this concept or appellation.
Further, in embodiments of the present invention, the first code of a certain page object of unique display that what each section was relatively complete can be used for all can be provided with a first code ID, particularly, if first code is web pages component, then this first code ID also can be considered as being the web pages component ID for identifying different web pages component.More specifically, in embodiments of the present invention, the character string that first code ID can be made up of numeral and/or letter usually, such as, the each self-corresponding first code ID of web pages component A and B as first code can be 001 and 002 respectively, also can be 001.a and 001.b, wherein, No. ID " 001 " attached before " .a " and " .b " may be used for identifying the assembly bag code packages etc. in other words comprising web pages component A and B, and the present invention is not construed as limiting this.
On this basis, in embodiments of the present invention, server can after the message receiving the acquisition request first code that client sends, first code itself and the first code ID for identifying first code is returned to client, the first code that user then can ask before client-side uses edits webpage, such as directly the first code downloaded can be inserted in the web page files of pre-editing by client, or, also the mode of external linkage can be used to quote first code, etc.When client relates to the use to certain first code, the first code ID that the first code of use is corresponding can be recorded, server is uploaded to as web page editing record, such as, user inserts above-mentioned web pages component A and B by client in web page files, then client does not need the whole section of code of web pages component A and B to be uploaded to server to realize server to the tracking of client at netting page, and each for web pages component A and B self-corresponding first code ID such as 001.a and 001.b can only upload onto the server by client.Under above-mentioned scene, because server itself has just safeguarded first code, therefore server can restore the webpage of client when pre-editing to a certain extent in conjunction with the first code ID of client upload, thus realizes the tracking of client at netting page.
Also be, according to the server that the embodiment of the present invention provides, by the second receiving element 606, server can receive and preserve the second code ID of client transmission, and second code ID is labeled as corresponding with the web page files of client-side editing, wherein, second code ID represents the first code ID that the first code of being added in web page files by client is corresponding.
On basis described above, further, according to the server that the embodiment of the present invention provides, by the second transmitting element 608, server can send the message of the second code be used to indicate in renewal or instauration net page file to client according to the second code ID preserved.Also be, in embodiments of the present invention, server can utilize followed the tracks of web page editing information to notify the more new state of the assembly of client in netting page in time, or recover to return web page editing information in the message of netting page to client in response to client-requested, so that make client can go out the webpage of first pre-editing according to the information reverting of passback.
Particularly, in embodiments of the present invention, the second transmitting element 608 can comprise:
1) the first sending module, for when existing with any one corresponding more fresh code in the second code ID preserved, notifies that any one the corresponding second code with this in client terminal web page file is in renewable state; Or,
2) the second sending module, for returning second code ID to client, and the second code in second code ID client being used return and first code instauration net page file.
As the embody rule mode of the client of preserving with the form of first code ID server side at the web page editing information track record in other words of netting page, in embodiments of the present invention, a kind of optional scheme carries out update notification in conjunction with the first sending module to client.Particularly, server can when detecting more fresh code corresponding to second code ID existed with preservation, judge that the code that the second code corresponding with this second code ID is used by client in first code is in other words in renewable state, and then this situation can be informed to client by server, so that whether user selects to upgrade when the respective code in the webpage of pre-editing by client.Also namely, in embodiments of the present invention, be coupled with the first sending module ground, and above-mentioned server can also comprise:
1) the 5th receiving element, the request sent for receiving client upgrades the message of any one corresponding second code with this being in renewable state;
2) the 3rd transmitting element, for sending with this any one corresponding more fresh code to client, being used to indicate client and using any one the corresponding second code with this upgraded in code update web page files.
Such as, in one embodiment, if the second code ID of client upload comprises 001.a and 001.b, and 001.a and 001.b is respectively used to presentation web page assembly A and B, then server detect web pages component A that it is safeguarded be updated to code that A ', the in other words code of web pages component A be updated to A ' also namely above-mentioned more fresh code time, then server can notify the correspondence in client terminal web page file or webpage development project web pages component also namely the example of web pages component A be in renewable state.If client asks to upgrade the web pages component in web page files further, then server can by more fresh code also namely the code of A ' be handed down to client, so that make client upgrade according to the more example of fresh code to the correspondence in web page files.
Further alternatively, in embodiments of the present invention, be coupled with the first sending module ground, and server can also comprise:
1) the 3rd receiving element, for receiving and preserving the third generation code that any client uploads;
2) the first judging unit, for judging whether third generation code belongs to same author with the second code identified by any one, and/or, judge that whether corresponding the third generation code ID of third generation code is consistent with any one;
3) the second judging unit, for belong in third generation code and the second code identified by any one same author and/or third generation code ID with any one corresponding consistent time, judge that whether the content of third generation code consistent with the content of the second code identified by any one;
4) output unit, for when the content of third generation code is inconsistent with the content of the second code identified by any one, judge to there is the more fresh code corresponding with any one, and more fresh code is third generation code.
For ease of building the shared platform of an open code or web pages component, and avoid multiple different developer to carry out editing the version conflict that may bring to same web pages component independently of one another, in embodiments of the present invention, can limit the update mode of the first code being maintained in server.Such as, the renewal inspection based on code authors and/or code ID described in above-mentioned steps can be adopted, if the second code used for client more in fresh code and the first code of originally preserving or first code comes from different authors or has different code ID, then can refuse to use the renewal rewards theory that the more code of fresh code to script preservation carries out.Further, if judge, more fresh code belongs to same author with the code originally preserved and/or has identical or corresponding ID, then can think that more fresh code have passed to upgrade to check, and then server can upgrade the code originally preserved according to more fresh code, and can notify that client upgrades corresponding second code accordingly.
In addition, in embodiments of the present invention, another kind of optional scheme recovers the webpage that client is edited in conjunction with the second sending module.Particularly, in embodiments of the present invention, server can in response to the message of client-requested instauration net page file, the second code ID corresponding with this web page files being kept at server side is returned, so that the second code in the second code ID making client to use to return and first code instauration net page file to client.Also namely, in embodiments of the present invention, be coupled with the second sending module ground, and above-mentioned server can also comprise:
1) the 6th receiving element, for receiving the message of the request instauration net page file that client sends.
Such as, in one embodiment, if the second code ID of client upload comprises 001.a and 001.b, and 001.a and 001.b is respectively used to presentation web page assembly A and B, then server recovers after the message of the web page files compiled in the request receiving client transmission, can return to client the second code ID corresponding with this web page files preserved, be also 001.a and 001.b, and then client can recover its webpage edited according to the second code ID of passback.
Further alternatively, consider the position of multiple web objects in webpage corresponding to second code, the complicacy of hierarchical relationship, in embodiments of the present invention, the second receiving element 606 can comprise:
1) the first receiver module, for receive and preserve client send second code ID and page object parameter, wherein, page object parameter is for describing form in the webpage that web page files is corresponding of page object represented by second code or position relationship; Wherein,
Second sending module can comprise:
2) first submodule is sent, for returning second code ID and page object parameter to client, and the second code in the second code ID, first code and the page object Parameter reconstruction web page files that client are used return.
By this mode, just can recover the webpage of the first pre-editing of client more perfectly, but the present invention can't limit all kinds of parameters that page object parameter specifically comprises, such as it can comprise coordinate information, also map data mining platform can be comprised, can also comprise other configuration information as information such as size, display states, the present invention does not limit this.
On the other hand, alternatively, for convenience of server, the concrete web page files that certain is being compiled is followed the tracks of, and strengthen second code ID that server preserves and associating between web page files, as shown in Figure 5, in embodiments of the present invention, above-mentioned second receiving element 606 can comprise:
1) the second receiver module, for receiving and preserving the second code ID of client transmission and the web page files ID of the web page files corresponding with second code ID; Wherein,
Before the second sending module, above-mentioned server can also comprise:
1) the 4th receiving element, for receive client send carry web page files ID and for asking the request message of instauration net page file; Wherein,
Second sending module can comprise:
1) second submodule is sent, for returning the second code ID corresponding with the web page files ID be carried in request message in the second code ID preserved to client.
By above embodiment, be described technical solution of the present invention, but should be understood that, above-described embodiment, only for the understanding of the present invention and enforcement, can't form any restriction to the present invention.
The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.
In the above embodiment of the present invention, the description of each embodiment is all emphasized particularly on different fields, in certain embodiment, there is no the part described in detail, can see the associated description of other embodiments.
In several embodiments that the application provides, should be understood that, disclosed server, the mode by other realizes.Wherein, device embodiment described above is only schematic, the such as division of described unit, be only a kind of logic function to divide, actual can have other dividing mode when realizing, such as multiple unit or assembly can in conjunction with or another system can be integrated into, or some features can be ignored, or do not perform.Another point, shown or discussed coupling each other or direct-coupling or communication connection can be by some interfaces, and the indirect coupling of unit or module or communication connection can be electrical or other form.
The described unit illustrated as separating component or can may not be and physically separates, and the parts as unit display can be or may not be physical location, namely can be positioned at a place, or also can be distributed in multiple network element.Some or all of unit wherein can be selected according to the actual needs to realize the object of the present embodiment scheme.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, also can be that the independent physics of unit exists, also can two or more unit in a unit integrated.Above-mentioned integrated unit both can adopt the form of hardware to realize, and the form of SFU software functional unit also can be adopted to realize.
If described integrated unit using the form of SFU software functional unit realize and as independently production marketing or use time, can be stored in a computer read/write memory medium.Based on such understanding, the part that technical scheme of the present invention contributes to prior art in essence in other words or all or part of of this technical scheme can embody with the form of software product, this computer software product is stored in a storage medium, comprises all or part of step of some instructions in order to make a computer equipment (can be personal computer, server or the network equipment etc.) perform method described in each embodiment of the present invention.And aforesaid storage medium comprises: USB flash disk, ROM (read-only memory) (ROM, Read-OnlyMemory), random access memory (RAM, RandomAccessMemory), portable hard drive, magnetic disc or CD etc. various can be program code stored medium.
The above is only the preferred embodiment of the present invention; it should be pointed out that for those skilled in the art, under the premise without departing from the principles of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.

Claims (10)

1. a page authoring method, is characterized in that, comprising:
Receive the message of the first code stored for request server that client sends, wherein, described first code is for adding to by the web page files of described client-side editing, the page object that the web page display first code making described web page files corresponding represents, and each described first code has unique corresponding first code ID;
Described first code and described first code ID is sent to described client;
Receive and preserve the second code ID in the described first code ID of described client transmission, and described second code ID is labeled as corresponding with the web page files of described client-side editing, wherein, described second code ID is for identifying the second code in described first code, and described second code represents adds the first code in described web page files to by described client;
Send the message being used to indicate and upgrading or recover the described second code in described web page files to described client according to the described second code ID preserved.
2. method according to claim 1, is characterized in that, the described described second code ID according to preserving sends the message being used to indicate the described second code upgrading or recover in described web page files and comprises to described client:
If there is the more fresh code corresponding with any one the second code ID in the described second code ID preserved, then notify that the described second code corresponding with any one second code ID described in web page files described in described client is in renewable state; Or,
Returning described second code ID to described client, using the described second code that the described second code ID returned and described first code are recovered in described web page files for making described client.
3. method according to claim 2, is characterized in that, before the described described second code corresponding with any one second code ID described notified in web page files described in described client is in renewable state, described method also comprises:
Receive and preserve the third generation code that any client uploads;
Judge whether described third generation code belongs to same author with the described second code identified by any one second code ID described, and/or, judge that whether corresponding the third generation code ID of described third generation code is consistent with any one second code ID described;
If described third generation code and the described second code identified by any one second code ID described belong to same author and/or described third generation code ID is corresponding consistent with any one second code ID described, then judge that whether the content of described third generation code is consistent with the content of the described second code identified by any one second code ID described;
If the content of described third generation code is inconsistent with the content of the described second code identified by any one second code ID described, then judge to there is the more fresh code corresponding with any one second code ID described, and described more fresh code is described third generation code.
4. method according to claim 2, is characterized in that,
Described reception and preserve described client send described first code ID in second code ID comprise: receives and preserve described client transmission described second code ID and page object parameter, wherein, described page object parameter is for describing form in the webpage that described web page files is corresponding of page object represented by described second code or position relationship;
Describedly returning described second code ID to described client and comprise: return described second code ID and described page object parameter to described client, using described second code in web page files described in the described second code ID returned, described first code and described page object Parameter reconstruction for making described client.
5. method according to claim 2, is characterized in that,
Described reception the second code ID preserved in the described first code ID that described client sends comprise: receive and preserve described second code ID and the web page files ID of the described web page files corresponding with described second code ID of the transmission of described client;
Described return described second code ID to described client before, described method also comprises: what receive that described client sends carries described web page files ID and request message for asking to recover described web page files;
Describedly return described second code ID to described client and comprise: return the second code ID corresponding with the described web page files ID be carried in described request message in the described second code ID preserved to described client.
6. a server, is characterized in that, comprising:
First receiving element, for receiving the message of the first code stored for request server that client sends, wherein, described first code is for adding to by the web page files of described client-side editing, the page object that the web page display first code making described web page files corresponding represents, and each described first code has unique corresponding first code ID;
First transmitting element, for sending described first code and described first code ID to described client;
Second receiving element, for receiving and preserving the second code ID in the described first code ID of described client transmission, and described second code ID is labeled as corresponding with the web page files of described client-side editing, wherein, described second code ID is for identifying the second code in described first code, and described second code represents adds the first code in described web page files to by described client;
Second transmitting element, for sending the message being used to indicate and upgrading or recover the described second code in described web page files to described client according to the described second code ID preserved.
7. server according to claim 6, is characterized in that, described second transmitting element comprises:
First sending module, for when there is the more fresh code corresponding with any one the second code ID in the described second code ID preserved, notify that the described second code corresponding with any one second code ID described in web page files described in described client is in renewable state; Or,
Second sending module, for returning described second code ID to described client, and the described second code ID described client being used return and described first code recover the described second code in described web page files.
8. server according to claim 7, is characterized in that, also comprises:
3rd receiving element, for receiving and preserving the third generation code that any client uploads;
First judging unit, for judging whether described third generation code belongs to same author with the described second code identified by any one second code ID described, and/or, judge that whether corresponding the third generation code ID of described third generation code is consistent with any one second code ID described;
Second judging unit, for belong in described third generation code and the described second code identified by any one second code ID described same author and/or described third generation code ID and any one second code ID described corresponding consistent time, judge that whether the content of described third generation code consistent with the content of the described second code identified by any one second code ID described;
Output unit, for when the content of described third generation code is inconsistent with the content of the described second code identified by any one second code ID described, judge to there is the more fresh code corresponding with any one second code ID described, and described more fresh code is described third generation code.
9. server according to claim 7, is characterized in that,
Described second receiving element comprises: the first receiver module, for receive and preserve described client send described second code ID and page object parameter, wherein, described page object parameter is for describing form in the webpage that described web page files is corresponding of page object represented by described second code or position relationship;
Described second sending module comprises: first sends submodule, for returning described second code ID and described page object parameter to described client, and described client is made to use described second code in web page files described in the described second code ID returned, described first code and described page object Parameter reconstruction.
10. server according to claim 7, is characterized in that,
Described second receiving element comprises: the second receiver module, for receiving and preserving the described second code ID of described client transmission and the web page files ID of the described web page files corresponding with described second code ID;
Described server also comprises: the 4th receiving element, carries described web page files ID and request message for asking to recover described web page files for what receive that described client sends;
Described second sending module comprises: second sends submodule, for returning the second code ID corresponding with the described web page files ID be carried in described request message in the described second code ID preserved to described client.
CN201410299175.7A 2014-06-26 2014-06-26 Page authoring method and device Active CN105320672B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410299175.7A CN105320672B (en) 2014-06-26 2014-06-26 Page authoring method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410299175.7A CN105320672B (en) 2014-06-26 2014-06-26 Page authoring method and device

Publications (2)

Publication Number Publication Date
CN105320672A true CN105320672A (en) 2016-02-10
CN105320672B CN105320672B (en) 2019-05-24

Family

ID=55248074

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410299175.7A Active CN105320672B (en) 2014-06-26 2014-06-26 Page authoring method and device

Country Status (1)

Country Link
CN (1) CN105320672B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106648960A (en) * 2016-09-13 2017-05-10 天津海量信息技术股份有限公司 Data recovery method and device when browser end edits application program
CN110968302A (en) * 2018-09-28 2020-04-07 北京嘀嘀无限科技发展有限公司 Front-end development method and device and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101729590A (en) * 2008-10-15 2010-06-09 北大方正集团有限公司 Method, system and device for providing web page
CN101807209A (en) * 2010-04-14 2010-08-18 深圳市同洲电子股份有限公司 Method and system for manufacturing webpage, client and server
CN103207869A (en) * 2012-01-16 2013-07-17 腾讯科技(深圳)有限公司 Webpage maintenance method, system and platform
CN103412890A (en) * 2013-07-19 2013-11-27 北京亿赞普网络技术有限公司 Webpage loading method and device
CN103841110A (en) * 2014-03-13 2014-06-04 重庆先迈通信技术有限公司 Website establishment service system and processing method based on mobile terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101729590A (en) * 2008-10-15 2010-06-09 北大方正集团有限公司 Method, system and device for providing web page
CN101807209A (en) * 2010-04-14 2010-08-18 深圳市同洲电子股份有限公司 Method and system for manufacturing webpage, client and server
CN103207869A (en) * 2012-01-16 2013-07-17 腾讯科技(深圳)有限公司 Webpage maintenance method, system and platform
CN103412890A (en) * 2013-07-19 2013-11-27 北京亿赞普网络技术有限公司 Webpage loading method and device
CN103841110A (en) * 2014-03-13 2014-06-04 重庆先迈通信技术有限公司 Website establishment service system and processing method based on mobile terminal

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106648960A (en) * 2016-09-13 2017-05-10 天津海量信息技术股份有限公司 Data recovery method and device when browser end edits application program
CN110968302A (en) * 2018-09-28 2020-04-07 北京嘀嘀无限科技发展有限公司 Front-end development method and device and electronic equipment
CN110968302B (en) * 2018-09-28 2024-01-05 北京嘀嘀无限科技发展有限公司 Front-end development method and device and electronic equipment

Also Published As

Publication number Publication date
CN105320672B (en) 2019-05-24

Similar Documents

Publication Publication Date Title
CN103338384A (en) Video play method and video play device
US10284686B2 (en) Server, client, system and method for preloading browsed page in browser
CN108280125A (en) Method, apparatus, storage medium and the electronic device that the page is shown
CN104834530A (en) Method for developing POS application program and cloud server
CN104598902A (en) Method and device for identifying screenshot and browser
CN103064989B (en) Webpage preservation, deployment method and device
CN104765746B (en) Data processing method and device for mobile communication terminal browser
CN105160018A (en) Method, device and system for image copy/paste
CN105488078A (en) Web page data caching method and equipment
CN105335139A (en) Webpage display method and apparatus
CN105677328A (en) Method and device for displaying information and electronic equipment
CN105027116A (en) Flat book to rich book conversion in e-readers
CN104580310A (en) Log processing method and server
CN101702641A (en) Coding method and network server
CN102779045B (en) A kind of interface creating method, interface editor and electronic equipment
CN101652775A (en) System and method for mapping logical and physical assets in a user interface
CN112231055A (en) Mirror image management method and device
CN105320672A (en) Webpage editing method and server
CN103248647A (en) Method and server providing cross-platform book reading
CN108737487B (en) Data synchronization method and device, storage medium and electronic device
CN105677730A (en) Method and device for reading webpage resources and electronic equipment
CN104484399B (en) Webpage redirects treating method and apparatus
CN104572981A (en) Web page caching method and mobile terminal device
CN107368557B (en) Page editing method and device
CN110928547A (en) Public file extraction method, device, terminal and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant