Disclosure of Invention
The embodiment of the application discloses a site self-defining method, a system and a related device, which are used for saving unnecessary resource waste through code reuse of subprograms when sites are created.
A first aspect of an embodiment of the present application provides a site customization method, including:
creating a site self-defined project;
matching site customization data for the site customization project;
creating a page in the site self-defined project, and matching a uniform resource locator for the page;
selecting a first target function in a site management platform, wherein the first target function is a function to be realized of the site self-defined project, and the site management platform comprises a plurality of target functions;
and creating the site according to the selected target application.
Optionally, after creating the site according to the selected target application, the method further includes:
receiving an external access request;
judging whether the access request is crawler access from a search engine;
if so, returning first data, wherein the first data are site data optimized by a search engine.
Optionally, the site customization data includes a language package, and the language package includes multiple language resources for switching site contents between different languages.
Optionally, the method further comprises after receiving the external access request;
matching corresponding language resources from the language package according to the external access request;
judging whether the language resource is the same as the output language of the site;
if not, replacing the site according to the language resources.
Optionally, after creating the site according to the selected target application, the method further includes:
and adding a second target function to the site management platform.
Optionally, after creating the site according to the selected target application, the method further includes:
previewing the created sites.
A second aspect of the present application provides a site customization system, including:
the creation unit is used for creating a site self-defined project;
the processing unit is used for matching site self-defining data for the site self-defining project;
the processing unit is also used for creating a page in the site self-defined project and matching a uniform resource locator for the page;
the processing unit is further configured to select a first target function in a site management platform, where the first target function is a function to be implemented of the site self-defined item, and the site management platform includes multiple target functions;
the creating unit is further configured to create a site according to the selected target application.
Optionally, the system further comprises:
a receiving unit that receives an external access request;
the judging unit is used for judging whether the access request is crawler access from a search engine;
the processing unit is further configured to return first data if the determination unit determines that the first data is the site data optimized by the search engine.
A third aspect of embodiments of the present application provides a computer apparatus, including:
a processor, a memory, an input-output device, and a bus;
the processor, the memory and the input and output equipment are respectively connected with the bus;
the processor is configured to perform the method according to any of the preceding embodiments.
A fourth aspect of embodiments of the present application provides a computer-readable storage medium having a computer program stored thereon, wherein: which when executed by a processor implements the steps of the method according to the previous embodiment.
According to the technical scheme, the embodiment of the application has the following advantages: in this embodiment, a site customization project is created, site customization data is matched with the site customization project, a page is created in the site customization project, a uniform resource locator is matched with the page, a first target function is selected in a site management platform, the first target function is a function to be implemented of the site customization project, the site management platform includes a plurality of target functions, and a site is created according to a selected target application. The functions required to be realized by the site creation are decoupled into a plurality of sub-functions, the functions can be selected according to actual requirements when a user uses the site creation system, and unnecessary resource waste is saved through code reuse of the sub-programs when the site creation is realized.
Detailed Description
The embodiment of the application discloses a site self-defining method, a system and a related device, which are used for saving unnecessary resource waste through code reuse of subprograms when sites are created.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims of the present application and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
For convenience of understanding, a specific flow in the embodiment of the present application is described below, and referring to fig. 1, an embodiment of a method for customizing a site in the embodiment of the present application includes:
101. creating a site self-defined project;
in this embodiment, when a developer performs the site customization creation, a new site customization project needs to be created first, and the site creation operation is performed in the project.
102. Matching site self-defining data for the site self-defining project, creating a site page in the site self-defining project, and matching a uniform resource locator for the site page;
specifically, after a developer creates a project, basic data configuration including a title tag, a keyword tag and a description tag optimized by a search engine of a site can be performed for the project, a web page corresponding to the site is created in the project, and a uniform resource locator is matched with the web page, and the uniform resource locator can describe an address of a resource on a network in an abstract form of a character string.
103. Selecting a first target function in a site management platform, wherein the first target function is a function to be realized of the site self-defined project, and the site management platform comprises a plurality of target functions;
in this embodiment, a site management platform may be provided for a development user to implement a self-defined selection of functions to be implemented to create a corresponding site.
Specifically, a visual webpage editor is provided in a site management platform, and can enable a development user to select a corresponding application component according to actual requirements to realize corresponding functions, including multimedia resources and a plurality of service components corresponding to the functions.
104. And creating the site according to the selected first target function.
In this embodiment, an automatically triggered construction task is run in the site management platform to construct a result output by the visual web page editor.
Specifically, the components operated by the visual web page editor of the site management platform are compatible with different front-end frameworks and languages according to different applications and component configurations, heterogeneous UIs such as fact or Vue can be constructed into independent applications or micro applications capable of communicating with each other, and the micro applications are deployed to SSR or prerendered to a static service according to different application requirements.
In this embodiment, a site customization project is created, site customization data is matched with the site customization project, a page is created in the site customization project, a uniform resource locator is matched with the page, a first target function is selected in a site management platform, the first target function is a function to be implemented of the site customization project, the site management platform includes a plurality of target functions, and a site is created according to a selected target application. The functions required to be realized by the site creation are decoupled into a plurality of sub-functions, the functions can be selected according to actual requirements when a user uses the site creation system, and unnecessary resource waste is saved through code reuse of the sub-programs when the site creation is realized.
In this embodiment of the present application, based on the embodiment described in fig. 1, a situation that a station receives an external access request after creating is further described, specifically referring to fig. 2, a first embodiment of a method for customizing a station in this embodiment of the present application includes:
201. receiving an external access request;
specifically, after the site is successfully created, an access request from the outside may be received and the data-rendered web page may be output.
202. Judging whether the access request is crawler access from a search engine;
specifically, the access request from the outside is divided into a crawler access from a search engine, which is an automatic access to a web page by a script or a robot for searching, and a general access of a user, which is an access request of an outside user through a web site search, which is used to grab original data from the web page.
203. If so, returning the site data optimized by the search engine.
Specifically, if the web page data are judged to be accessed by the crawler from the search engine, the web page data can be captured by the crawler access, so that the web page data can be displayed when a user searches related contents, the optimized data of the search engine can be returned by the application, the optimized data comprise optimized title tags, optimized keyword tags and optimized description tags, the tags are used for defining the attribute of a website and telling the search engine what the website is, the search engine classifies, arranges and stores the websites in a database according to the definition tags given by the search engine and then sorts the websites, and in order to improve the ranking of the constructed websites in the search engine, the optimized web page data are returned when the crawler access of the search engine is received.
In this embodiment of the present application, based on the embodiment described in fig. 1, further description is performed on custom data matched when a site is created, specifically referring to fig. 3, a first embodiment of a site customization method in this embodiment of the present application includes:
301. the site self-defining data comprises a language package which comprises a plurality of language resources and is used for switching site contents among different languages.
Specifically, the corresponding language package can be stored in the site management platform, the language package is used for storing different languages of the content of the site management platform, multiple use requirements under different languages can be met, and when different use requirements are met, the site only needs to call the language resources of the corresponding requirements from the language package.
In the embodiment of the present application, based on the embodiment described in fig. 1, a processing procedure of a site output language is further described, specifically referring to fig. 4, where a first embodiment of a site customization method in the embodiment of the present application includes:
401. matching corresponding language resources from the language package according to the external access request;
in this embodiment, after receiving the external access request, the language requirement corresponding to the external access request may be determined through the access request.
Specifically, whether the output language of the current site management platform needs to be switched can be determined by determining the source of the access request and the content input by the development user in the search engine, where the output language of the site management platform is a real-time display language in which display content exists in a visual editing interface and the like in the site management platform, and exemplarily, if it is determined that the search content currently developed for input in the search engine is chinese, the language requirement for the access request is chinese.
402. Judging whether the language resource is the same as the output language of the site;
specifically, it is determined that the language requirement of the current access request, that is, the language same as that of the access request, needs to determine whether the output language of the current site management platform is consistent with the language required by the current access request, and execute a corresponding replacement operation.
403. If not, replacing the site according to the language resources.
Specifically, when the output language of the current site management platform is judged to be inconsistent with the language required by the current access request, the language package in the site management platform calls the language resource corresponding to the access request, and the language resource is used for replacing the real-time output language of the site management platform, so that the use requirement of the current user is met.
In this embodiment of the present application, based on the embodiment described in fig. 1, for further description of a case that if a site management platform has a requirement for a new function, specifically referring to fig. 5, a first embodiment of a method for customizing a site in the embodiment of the present application includes:
501. and adding a second target function to the site management platform.
Specifically, along with the development of network technology, the functions of the sites become diversified, the method and the system achieve the aim that a plurality of corresponding sub-functions are generated through site function decoupling, and are realized one by one through a plurality of service components.
In this embodiment of the application, based on the embodiment described in fig. 1, a further description is given to a processing procedure after site custom editing and before receiving an external access request, specifically referring to fig. 5, where a first embodiment of a site custom method in this embodiment of the application includes:
601. previewing the created sites.
Specifically, a site which has been created but has not received an external access request may be previewed, whether the site meets all requirements of a current development user is checked through previewing, if a service component corresponding to a certain function is missed in a step of passing through a visual web page editor, the service component is added again, and data capture is performed on the created site for preventing external access before the preview is finished, the site access right at this time is limited to the inside of the site management platform, and a complete access right is opened after the preview is finished, so that an access request outside the site management platform is received.
In this embodiment, a site customization project is created, site customization data is matched with the site customization project, a page is created in the site customization project, a uniform resource locator is matched with the page, a first target function is selected in a site management platform, the first target function is a function to be implemented of the site customization project, the site management platform includes a plurality of target functions, and a site is created according to a selected target application. The functions required to be realized by the site creation are decoupled into a plurality of sub-functions, the functions can be selected according to actual requirements when a user uses the site creation system, and unnecessary resource waste is saved through code reuse of the sub-programs when the site creation is realized.
The method in the embodiment of the present application is introduced above, and the embodiment of the present application is described below from the perspective of a virtual device.
Referring to fig. 7, an embodiment of a system for site customization in an embodiment of the present application includes:
a creating unit 701, configured to create a site customization project;
a processing unit 702, configured to match site customization data for the site customization project;
the processing unit 702 is further configured to create a page in the site customization project, and match a uniform resource locator to the page;
the processing unit 702 is further configured to select a first target function in a site management platform, where the first target function is a function to be implemented of the site self-defined item, and the site management platform includes multiple target functions;
the creating unit 701 is further configured to create a site according to the selected target application.
Optionally, the system further comprises:
a receiving unit 703 that receives an external access request;
a judging unit 704, configured to judge whether the access request is a crawler access from a search engine;
the processing unit 702 is further configured to, if the determining unit determines that the first data is the site data optimized by the search engine, return the first data.
Referring to fig. 8, a computer device in an embodiment of the present application is described below from the perspective of a physical device, where an embodiment of the computer device in the embodiment of the present application includes:
the computing device 800 may have a large difference due to different configurations or performances, and may include one or more Central Processing Units (CPUs) 801 (e.g., one or more processors) and a memory 805, where one or more applications or data are stored in the memory 805.
Memory 805 may be volatile storage or persistent storage, among others. The program stored in the memory 805 may include one or more modules, each of which may include a sequence of instructions for operating on the server. Still further, the central processor 801 may be configured to communicate with the memory 805 to execute a series of instruction operations in the memory 805 on the smart terminal 800.
The computer device 800 may also include one or more power supplies 802, one or more wired or wireless network interfaces 803, one or more input-output interfaces 804, and/or one or more operating systems, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, and the like.
The processor 801 is specifically configured to process the following steps:
creating a site self-defined project;
matching site customization data for the site customization project;
creating a page in the site self-defined project, and matching a uniform resource locator for the page;
selecting a first target function in a site management platform, wherein the first target function is a function to be realized of the site self-defined project, and the site management platform comprises a plurality of target functions;
and creating the site according to the selected target application.
Optionally, after creating the site according to the selected target application, the method further includes:
receiving an external access request;
judging whether the access request is crawler access from a search engine;
if so, returning first data, wherein the first data are site data optimized by a search engine.
Optionally, the site customization data includes a language package, and the language package includes multiple language resources for switching site contents between different languages.
Optionally, the method further comprises after receiving the external access request;
matching corresponding language resources from the language package according to the external access request;
judging whether the language resource is the same as the output language of the site;
if not, replacing the site according to the language resources.
Optionally, after creating the site according to the selected target application, the method further includes:
and adding a second target function to the site management platform.
Optionally, after creating the site according to the selected target application, the method further includes:
previewing the created sites.
It should be understood that, in the various embodiments of the present application, the sequence numbers of the above steps do not mean the execution sequence, and the execution sequence of the steps should be determined by their functions and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.