CN117290016B - Page configuration method and device for view - Google Patents

Page configuration method and device for view Download PDF

Info

Publication number
CN117290016B
CN117290016B CN202311576457.2A CN202311576457A CN117290016B CN 117290016 B CN117290016 B CN 117290016B CN 202311576457 A CN202311576457 A CN 202311576457A CN 117290016 B CN117290016 B CN 117290016B
Authority
CN
China
Prior art keywords
target
page
module
engine
pages
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.)
Active
Application number
CN202311576457.2A
Other languages
Chinese (zh)
Other versions
CN117290016A (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.)
Benxi Steel Group Information Automation Co ltd
Original Assignee
Benxi Steel Group Information Automation 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 Benxi Steel Group Information Automation Co ltd filed Critical Benxi Steel Group Information Automation Co ltd
Priority to CN202311576457.2A priority Critical patent/CN117290016B/en
Publication of CN117290016A publication Critical patent/CN117290016A/en
Application granted granted Critical
Publication of CN117290016B publication Critical patent/CN117290016B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention provides a page configuration method and device of a view, and belongs to the technical field of software development. According to the page configuration method of the view, after the target page numbers are obtained by analyzing the target request information of the user, the association degree analysis is carried out on the target page numbers and the pages configured in advance by the module engines through the root engine, so that at least one target module engine is screened out from the module engines of the plurality of pages configured in advance, the service and the function of the pages can be rapidly loaded, the view feedback to the user is further generated, and compared with a fixed view feedback mode, the method has higher response flexibility, the rapid response to the user request can be realized, and the service efficiency is improved.

Description

Page configuration method and device for view
Technical Field
The invention relates to the technical field of software development, in particular to a page configuration method and device of a view.
Background
Along with the deep application of informatization in enterprises, the requirements of enterprises on informatization are changed continuously according to the management change, and how to quickly and high-quality realize the new requirements of users is a problem which must be solved in the field of software development. The application of the framework is a solution, and a good framework can reduce the coupling between the system modules, improve the maintainability of the system, and is fast to deploy, thereby being beneficial to the engineering management of software.
In a conventional MVC framework, there is often a high degree of coupling between modules. When a new need arises, modifying the implementation of a module may affect other modules, requiring modification and configuration of multiple modules. For example, some employ a micro-service architecture that splits an application into multiple small, autonomous services, each with its own independent database and business logic. The connection between the view and each micro-service controller is too tight and the coupling degree is too strong, in which case one view corresponds to one controller and the binding relationship between the view and the controller prevents independent use. In other development modes, the front end view and the controller are completely independent, and the service of each module needs to be configured, implemented and developed from scratch, and cannot respond to the demands of users quickly.
Disclosure of Invention
The invention provides a page configuration method and device for views, which are used for solving the defect that the architecture response is not flexible and slow in the prior art and realizing the effect of realizing flexible and quick response to user requests.
The invention provides a page configuration method of a view, which comprises the following steps:
acquiring target request information of a user through a front-end controller;
analyzing the target request information through the front-end controller to acquire each target page number corresponding to the target request information;
performing association analysis on each target page number and the page configured in advance by each module engine through the root engine, and screening at least one target module engine from the module engines based on the association analysis result; the root engine nanotube is provided with a plurality of module engines, and pages contained in the module engines are determined based on labels of the pages and response frequencies corresponding to request service types corresponding to the pages;
based on the page numbers and labels of the pages configured in advance in the target module engines obtained through screening, activating the target module engines through the root engine, and configuring configuration information of the pages in the target module engines so as to load services and functions of the pages;
And packaging the services and functions corresponding to the target page numbers according to the configuration format through a view converter, and feeding back to the front-end controller to generate the view corresponding to the target request information.
According to the page configuration method of the view provided by the invention, the association degree analysis is carried out on each target page number and the page configured in advance by each module engine through the root engine, and at least one target module engine is screened out from the module engines based on the association degree analysis result, and the method comprises the following steps:
the method comprises the steps that association degree analysis is conducted on each target page number and each page configured in advance by each module engine through a root engine, and page numbers of the pages configured in advance by each module engine are identified;
and determining the module engine as the target module engine under the condition that the page configured in advance by one module engine contains all pages corresponding to each target page number.
According to the page configuration method of the view provided by the invention, the association degree analysis is carried out on each target page number and the page configured in advance by each module engine through the root engine, and at least one target module engine is screened out from the module engines based on the association degree analysis result, and the method comprises the following steps:
The method comprises the steps that association degree analysis is conducted on each target page number and each page configured in advance by each module engine through a root engine, and page numbers of the pages configured in advance by each module engine are identified;
under the condition that the page which is configured in advance by one module engine does not contain all pages corresponding to the target page numbers, determining the set similarity between a page number set of the page which is configured in advance by the module engine and a set formed by the target page numbers;
and screening more than one target module engine from all the module engines based on the set similarity.
According to the page configuration method of the view provided by the invention, the determining of the set similarity between the page number set of the page configured in advance by each module engine and the set formed by each target page number comprises the following steps:
respectively determining each intersection and each union between a page number set of a page configured in advance by each module engine and a set formed by each target page number;
and determining the ratio of the number of the pages in the intersection corresponding to each module engine to the number of the pages in the union corresponding to each module engine as the set similarity corresponding to each module engine.
According to the page configuration method of the view, the pages contained in the module engine are determined by the following method:
Determining the type of request service contained in each history request information of a user obtained by the front-end controller in a history period;
determining different types of target request services of target quantity according to response frequencies of the request services of each type;
and configuring the pages contained in each module engine based on each page corresponding to each target request service and the labels corresponding to each page.
According to the method for configuring the page of the view provided by the invention, the front-end controller analyzes the target request information to obtain each target page number corresponding to the target request information, and the method comprises the following steps:
analyzing the target request information through the front-end controller, and determining the type of the request service contained in the target request information;
determining each target page corresponding to the target request information based on the type of the request service contained in the target request information;
and determining the page number of the target page as each target page number corresponding to the target request information.
According to the page configuration method of the view, the tag comprises at least one of a page tag, an interface tag, a cache tag, a log tag, a permission tag and a timing start tag.
The invention also provides a page configuration device of the view, which comprises:
the acquisition module is used for acquiring target request information of a user through the front-end controller;
the analysis module is used for analyzing the target request information through the front-end controller and acquiring each target page number corresponding to the target request information;
the first processing module is used for carrying out association analysis on each target page number and the page configured in advance by each module engine through the root engine, and screening at least one target module engine from the module engines based on the association analysis result; the root engine nanotube is provided with a plurality of module engines, and pages contained in the module engines are determined based on labels of the pages and response frequencies corresponding to request service types corresponding to the pages;
the second processing module is used for activating each target module engine through the root engine based on the page number and the label of the page which are configured in advance in each target module engine and configured with the configuration information of the page in each target module engine so as to load the service and the function of the page;
and the third processing module is used for packaging the services and functions corresponding to the target page numbers according to the configuration format through a view converter and feeding back the services and functions to the front-end controller so as to generate the view corresponding to the target request information.
The invention also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing a page configuration method of any of the views described above when executing the program.
The present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a page configuration method of a view as described in any of the above.
The invention also provides a computer program product comprising a computer program which when executed by a processor implements a page configuration method of a view as described in any of the above.
According to the page configuration method and device for the view, after the target page numbers are obtained by analyzing the target request information of the user, the association degree analysis is carried out on the target page numbers and the pages configured in advance by the module engines through the root engine, so that at least one target module engine is screened out from the module engines of the plurality of pages configured in advance, the service and the function of the pages can be rapidly loaded, the view feedback to the user is further generated, and compared with a fixed view feedback mode, the method and device for the view feedback have higher response flexibility, can also realize rapid response to the user request, and improve the service efficiency.
Drawings
In order to more clearly illustrate the invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is one of the flow diagrams of the page configuration method of the view provided by the present invention;
FIG. 2 is a second flow chart of the page configuration method of the view provided by the present invention;
FIG. 3 is a schematic view of the page configuration apparatus of the view provided by the present invention;
fig. 4 is a schematic structural diagram of an electronic device provided by the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The page configuration method and apparatus of the view of the present invention are described below with reference to fig. 1 to 4.
As shown in fig. 1, the page configuration method of the view according to the embodiment of the present invention mainly includes step 110, step 120, step 130, step 140, and step 150.
Step 110, obtaining target request information of a user through a front-end controller.
The front-end controller is a component or module responsible for handling user requests and is the point of entry for the application. The front-end controller may receive a request from a user, be responsible for coordinating the overall process flow, and return the results to the user or for further processing after the processing is completed.
Advantages of the front-end controller include centralized processing of requests, providing a unified portal, facilitating forwarding and distribution of requests, reducing system coupling, and the like. Common front end controllers implement DispatcherServ including Spring MVC, actionServ from Struts2, and so on.
The front-end controller plays an important role in the architecture, is responsible for receiving and distributing user requests, plays a role in unified scheduling and distribution, and enables application programs to be more flexible, extensible and easy to maintain.
And 120, analyzing the target request information through the front-end controller to acquire each target page number corresponding to the target request information.
It will be appreciated that the manner in which the front-end controller parses the user request and obtains the desired page number may be implemented in accordance with a particular framework or technique.
The user sends a request to the front-end controller, which can parse the request according to the URL or other identifier of the request to determine the processing mode and target page of the request.
In some embodiments, the front-end controller analyzes the target request information to obtain each target page number corresponding to the target request information, which includes the following procedures.
The front-end controller can analyze the target request information to determine the type of the request service contained in the target request information. And then, based on the type of the request service contained in the target request information, determining each target page corresponding to the target request information, and determining the page number of the target page as each target page number corresponding to the target request information.
The manner in which the target request information is parsed may include the following.
First, parsing may be performed based on the URL path. The front-end controller parses the requested URL path and extracts the required page number or other identifier therefrom.
After receiving the user request, the front-end controller needs to acquire the URL path information of the request. In the front-end controller, the URL path is parsed and the required page number or other identifier is extracted according to different types of routing rules set in advance. The routing rules may be matched and extracted using regular expressions, wildcards, or other means. And analyzing the URL path of the request by using the defined routing rule. And matching the URL paths with the routing rules, wherein different URL paths and the routing rules correspond to different types of request services, and extracting the required target pages or other identifiers.
Secondly, the analysis can be performed based on the HTTP method. The front-end director may determine the type of request and associated parameters based on the method of the HTTP request, such as GET, POST, PUT and DELETE, etc., to obtain the desired page number or other identifier. After receiving the user request, the front-end controller needs to acquire HTTP method information in the request. According to different HTTP methods, requests are distributed to respective processors or methods to perform corresponding operations. And executing corresponding operation logic according to the matching result of the HTTP method. For example, for the GET method, it may be to display a page; for the POST method, it is possible to process form data or the like. Different HTTP methods correspond to different types of request services, and then the required target page is extracted.
Of course, in some embodiments, the transfer page number or identifier may also be parsed, and after the page number or identifier is obtained, the front-end controller may transfer it to a corresponding processor or other component to execute the corresponding business logic. Or the front-end controller can also analyze the request parameters to obtain the required page number or other identifiers by analyzing the request parameters. For example, information may be extracted by querying a string or form parameter, or the like. The manner of parsing the target request information is not limited herein.
The front-end controller analyzes the target request information, and can further determine different types of target request information according to the analyzed information such as URL paths, routing rules, HTTP methods and the like, so that the type of the request service in the target request information is obtained, each target page corresponding to the target request information is determined, and then the page number of the target page is determined as each target page number corresponding to the target request information.
And 130, performing association analysis on each target page number and the page configured in advance by each module engine through the root engine, and screening at least one target module engine from the module engines based on the association analysis result.
The root engine nanotube has a plurality of module engines, and pages contained in the module engines are determined based on labels of the pages and response frequencies corresponding to request service types corresponding to the pages.
The root engine and the module engine are components used to describe the system architecture. The root engine is a core module and is responsible for coordination and control of the whole module engine. The root engine may manage multiple module engines and select the appropriate module engine for processing according to particular needs.
The module engine is a part managed by the root engine and is focused on a specific functional domain or business module. Each module engine may provide a set of related functions and process the corresponding requests according to its own internal logic. The module engine can be flexibly configured and expanded according to the change of the system requirement.
The tags include at least one of a page tag, an interface tag, a cache tag, a log tag, a permission tag, and a timing start tag.
The Page tag is a Page tag, the Page tag configures a specific Page address under a specific module, the control layer is accessed through the controller, wherein class defines the type of return value, the flag defines the button of the Page for short, action defines the method class of the controller, and the valid defines the method which needs to be verified before operation, and if not, the method is not verified. The value object defines a return value type, which is defined as unique when the return is one VO class, and as sequence when the return value is plural.
Interface tags, such as json tags, are used to rapidly configure internal interfaces and further transmit data in json format.
The cache label is a cache label, so that the configuration of a cache function can be realized, and the cache label defines a cache strategy. Whether the element is eternal or not, the maxentriesLocalHeap defines the maximum number of cache objects in the memory, when the cache reaches the maxelementsInmemory value, whether overflow to the disk is allowed or not and whether the diskPersistent disk is kept when the VM is restarted or not is determined, the timeToidleSeconds defines the access interval which leads to the expiration of the element request, and the timeToliveSeconds defines the time the element exists in the cache.
Log tags, i.e., log tags, log4J Log services may be configured. The Log tag can be configured into four Log levels of DEBUG, INFO, WARN and ERROR, and generates a Log file named by page number and stores the Log file in a corresponding module directory.
Auth label, can dispose the authority control, auth label sets up to true and opens the authority control, auth label sets up to false and closes the authority control.
The timing start tag is a Scheduled tag, and can be configured to start tasks at regular time, wherein the first parameter of the timing start tag is the start frequency, the second parameter is the start day N, and the third parameter is the start time. Starting every N DAYs when the first parameter is DAY; when the first parameter is WEEK, the method is started once every WEEK N; the first parameter is MONTH, which represents a start on day N of each MONTH. The second parameter contains "-", which represents the start-up interval time.
Of course, the tags may also include a Queue tag, a Webservice tag, and the like, without limitation.
The Queue tag can set a text communication service, wherein a first item in assigned content is a text number, and a second item is a target system. The Webservice tag can realize quick configuration of Webservice servers and clients. The webservice defines a configuration file of the server.
In this embodiment, the root engine lower nanotube has a plurality of module engines, each module engine is configured with a plurality of pages in advance, and the pages configured in advance in each module engine can be determined according to the tag based on the page and the response frequency corresponding to the request service type corresponding to the page.
The module engine will typically pre-configure a set of applicable pages, each of which has various tags pre-configured therein for determining configuration information associated with the page function. By matching page tags with pages, it is possible to determine which pages are related to their own functions and assign them to the same module engine.
The request service type and response frequency are attributes describing the type of service and the frequency of requests provided by the page. These attributes may be associated with page tags. For example, a page in a module engine is responsible for processing form data submitted by a user, and then the page in the module engine configures a page tag related to the form data, and determines whether to assign the page to the module engine according to the request service type and response frequency to which the page configuring the form data belongs.
In an actual application scene, the root engine analyzes the association degree of each target page number and the page preconfigured by each module engine, and can determine the association degree between the target page number and the page according to the information such as the label of the page, the request service type, the response frequency and the like. The result of the association analysis can be used for screening at least one target module engine from the module engines, so that the root engine can distribute the request to the proper module engine for processing, and further, the proper module engine is quickly determined, so that quick response is realized, the efficiency of configuration implementation and development is improved, and the user requirement is quickly responded.
In some embodiments, the pages contained in the module engine are determined by the following method.
The type of request service contained in each history request information of the user acquired by the front-end controller in the history period can be determined first. And determining the target number of different types of target request services according to the response frequency of each type of request service. And configuring the pages contained in each module engine based on each page corresponding to each target request service and the labels corresponding to each page.
It will be appreciated that the user request information acquired by the front-end controller during the history period needs to be acquired first, including the type of request service invoked by each request. The specific method can be carried out by adopting a data analysis tool, a log analysis tool and the like according to actual conditions. The acquired data can be counted and analyzed to obtain the use frequency and the duty ratio of different types of request services.
Based on statistics of historical request services, a target number of request services with response frequencies above a frequency threshold may be determined as target request services. The service may then be requested for each target, and its corresponding page and tag analyzed to determine the pages contained in the module engine that need to be configured. The specific method can refer to common technologies and tools in front-end development, such as a page analysis tool, a tag visualization tool and the like.
In some embodiments, common pages and their corresponding tag data may be collected and consolidated. The web page data may be obtained using crawler technology and tag information therein extracted. And the label information of each page is expressed as a vector form, and the label can be converted into a numerical characteristic by using a bag-of-word model or TF-IDF and other methods. For example, one-hot encoding may be performed to represent each tag as a binary vector.
On this basis, a suitable clustering algorithm may be selected to perform cluster analysis on the labels. Common clustering algorithms include K-means, hierarchical clustering, DBSCAN and the like, and suitable algorithms can be selected according to specific requirements and data characteristics.
It will be appreciated that the feature vectors are input into a selected clustering algorithm for cluster analysis. The algorithm divides the labels into different clusters according to the similarity of the labels, observes label combinations and pages corresponding to the label combinations in each cluster, and can infer associated pages by calculating the similarity between labels in the clusters, wherein labels with high similarity possibly correspond to the associated pages.
Other associated pages can be further analyzed and inferred according to the clustering result and the tag similarity. For example, a certain page can be selected as a starting point, a page related to the certain page can be found according to other tags in the cluster, and the related page and a page determined based on the response frequency corresponding to the tag of the page and the request service type corresponding to the page are taken as pages contained in the module engine, so that the number of pages in each module engine can be increased, further, a single module engine can adapt to more different user requests, and the applicability of the module engine is improved.
After determining the pages and tags corresponding to each target request service, each module engine needs to be configured to contain the pages and tags. The specific configuration method can be carried out by adopting modes of automatic script, manual addition and the like according to actual conditions. In order to improve maintainability and flexibility, the configuration can be performed in a templated mode so as to facilitate subsequent maintenance and upgrading.
And 140, activating each target module engine through a root engine based on the page number and the label of the page which are configured in advance in each target module engine and obtained through screening, and configuring configuration information of the page in each target module engine so as to load services and functions of the page.
After determining the target module engines to activate, the root engine may start or load these target module engines to put the target module engines in an available state. May be implemented by operations to load relevant code, initialize configuration, etc. After the module engine is activated, the mapping relation is obtained by obtaining the configuration information of each page number and the label thereof, and the corresponding service of the service controller is triggered. After the target module engine is activated, the request from the root engine may be processed. Since the module engine is configured to a certain degree in advance, a quick response can be achieved.
The configuration information of the page may include page number, tag, function requirement, page layout, etc. The target module engine can load corresponding services and functions according to the configuration information and conduct corresponding page rendering. The target module engine may load corresponding services and functions, such as loading corresponding plug-ins, initializing specific components, registering event handlers, etc., based on the configuration information. By loading the services and functions of the page, the goal module engine is able to provide the user with the desired services and present the various portions of the page.
And step 150, packaging the service and the function corresponding to each target page number according to the configuration format through a view converter, and feeding back to the front-end controller to generate the view corresponding to the target request information.
The view converter is a component for encapsulating services and functions corresponding to each target page number according to a configuration format, and feeds back the encapsulated components to the front-end controller so as to generate a required view.
The front-end controller is a central scheduler for processing all incoming requests. When a user sends target request information, the front-end director receives the target request information and decides to which director to forward for processing. The controller may be a service controller, a page controller, or other type of controller, as the case may be.
Under the action of the view converter, services and functions corresponding to each target page number are packaged into one or more configuration formats so that the front-end controller can understand and process the services and functions. Such configuration information may include layout of the page, data sources, style sheets, script files, etc., as well as mappings of controllers and services associated with the page. Through the configuration information, the front-end controller can select a corresponding view to present according to the request information.
Thus, the view converter is one of the core components that encapsulates the services and functions corresponding to each target page number in a configuration format, and coordinates the various components in the Web application so that they can cooperate to achieve the desired functionality. The front-end controller can generate the required views from the request information and return them to the user via the view converter. Unlike the prior art in which the connection between the view and the controller is too tight and the coupling degree is too strong, the view in the invention can be flexibly realized according to different pages in the engine of the loading target module.
According to the page configuration method of the view, after the target page numbers are obtained by analyzing the target request information of the user, the association degree analysis is carried out on the target page numbers and the pages configured in advance by the module engines through the root engine, and then at least one target module engine is screened out of the module engines of the plurality of pages configured in advance, so that the service and the function of the page can be rapidly loaded, the view feedback is generated to the user, and compared with a fixed view feedback mode, the method has higher response flexibility, can also realize rapid response to the user request, and improves the service efficiency.
In some embodiments, performing association analysis on each target page number and a page configured in advance by each module engine through a root engine, and screening at least one target module engine from the module engines based on the association analysis result, including: the method comprises the steps that association degree analysis is conducted on each target page number and each page configured in advance by each module engine through a root engine, and page numbers of the pages configured in advance by each module engine are identified; and determining the module engine as a target module engine under the condition that one page configured in advance by the module engine contains all pages corresponding to each target page number.
It should be noted that, the root engine performs association analysis on each target page number and the page configured in advance by each module engine, so as to identify the page number of the page configured in advance by each module engine.
And traversing all the pre-configured pages of each module engine when the root engine analyzes the association degree, and checking the association relation between each target page and the page configured by the module engine. The root engine may use different algorithms and policies to determine the degree of association between pages, such as similarity of page content, link relationships between pages, and so on. In this embodiment, whether the page numbers are identical can be directly determined.
Through association analysis, the root engine can determine the page number of the page configured in advance by each module engine. These page numbers can be used for subsequent request distribution and processing, ensuring that each request can be properly routed to the corresponding module engine for processing.
The root engine can identify the page number configured in advance by each module engine through carrying out association analysis on the page configured in advance. This process can help achieve efficient request distribution and processing for different functional modules.
It is understood that when each target page number corresponding to target request information of a user is contained in one module engine, the module engine may be determined as a target module engine.
Of course, in some embodiments, if there are multiple module engines whose pages each include each target page number corresponding to the target request information of the user, the module engine with the smallest number of pages included may be selected as the target module engine, so that the workload of activating configuration may be reduced, and computing resources may be saved
In some embodiments, as shown in fig. 2, the association degree analysis is performed on each target page number and the page configured in advance by each module engine by the root engine, and at least one target module engine is screened from the module engines based on the association degree analysis result, including step 210, step 220 and step 230.
And 210, performing association analysis on each target page number and the page configured in advance by each module engine through the root engine, and identifying the page number of the page configured in advance by each module engine.
Step 220, determining the set similarity between the set of page numbers of the pages configured in advance by the module engines and the set formed by the target page numbers under the condition that the pages configured in advance by the module engines do not contain all the pages corresponding to the target page numbers.
Step 230, more than one target module engine is selected from the module engines based on the aggregate similarity.
In some embodiments, determining the set similarity between the set of page numbers of the page configured in advance by each module engine and the set of target page numbers includes: respectively determining each intersection and each union between a page number set of a page configured in advance by each module engine and a set formed by each target page number; and determining the ratio of the number of the pages in the intersection corresponding to each module engine to the number of the pages in the union corresponding to each module engine as the set similarity corresponding to each module engine.
First, a set of page numbers configured in advance by each module engine is denoted as a, and a set of target page numbers is denoted as B. Let the number of elements of A and B be n and m, respectively.
On this basis, the aggregate similarity between a and B can be calculated. Set similarity is defined as the size of the intersection of two sets divided by the size of their union, i.e.:
J(A, B) = |A ∩ B| / |A ∪ B|;
where |A n B| represents the number of elements of the intersection of A and B, and |A U B| represents the number of elements of the union of A and B.
By calculating the aggregate similarity, a similarity value between A and B can be obtained, ranging from 0 to 1,1 representing complete similarity, 0 representing no similarity.
In this case, the module engines may be ranked according to the similarity value, with the module engines having higher similarity ranked in front. On the basis, selecting a module engine corresponding to the set with the highest similarity as one of the target module engines, and further determining the rest pages corresponding to other target page numbers which are not contained in the target module engine.
Based on the remaining pages, a response of the remaining pages is implemented in determining at least one module engine. In the case that there is a page configured in advance by one module engine including all the remaining pages, the module engine is determined as the target module engine.
When there is no page configured in advance by one module engine and all the rest pages are contained, the target number of the rest pages can be determined first, and when the target number is larger than the number threshold, the set similarity between the set formed by the page numbers of the rest pages and the page number set of the page configured in advance by each module engine is further calculated, the module engines are ordered according to the similarity value, and the module engines with high similarity are arranged in front. On the basis, the module engine corresponding to the set with the highest similarity is selected as one of the target module engines, so that the remaining target module engines are continuously screened, the screening efficiency is improved, and the response efficiency to the user is further improved
The page configuration apparatus of the view provided by the present invention will be described below, and the page configuration apparatus of the view described below and the page configuration method of the view described above may be referred to correspondingly to each other.
As shown in fig. 3, the page configuration apparatus for view of the embodiment of the present invention mainly includes an acquisition module 310, an analysis module 320, a first processing module 330, a second processing module 340, and a third processing module 350.
The acquiring module 310 is configured to acquire target request information of a user through a front-end controller;
the parsing module 320 is configured to parse the target request information through the front-end controller, and obtain each target page number corresponding to the target request information;
the first processing module 330 is configured to perform association analysis on each target page number and a page configured in advance by each module engine through the root engine, and screen at least one target module engine from the module engines based on the association analysis result; the root engine nano-tube is provided with a plurality of module engines, and pages contained in the module engines are determined based on labels of the pages and response frequencies corresponding to request service types corresponding to the pages;
the second processing module 340 is configured to activate each target module engine through the root engine based on the page number and the tag of the page configured in advance in each target module engine obtained by screening, and configure configuration information of the page in each target module engine, so as to load services and functions of the page;
The third processing module 350 is configured to package, by using a view converter, services and functions corresponding to each target page number according to a configuration format, and feed back the services and functions to the front-end controller to generate a view corresponding to the target request information.
According to the page configuration device of the view, provided by the embodiment of the invention, after the target page numbers are obtained by analyzing the target request information of the user, the association degree analysis is carried out on the target page numbers and the pages configured in advance by the module engines through the root engine, so that at least one target module engine is screened out from the module engines of the plurality of pages configured in advance, the service and the function of the pages can be rapidly loaded, the view feedback is generated to the user, and compared with a fixed view feedback mode, the device has higher response flexibility, can also realize rapid response to the user request, and improve the service efficiency.
In some embodiments, the first processing module 330 is further configured to identify, by the root engine, a page number of a page configured in advance by each module engine, and perform association analysis on each target page number and a page configured in advance by each module engine; and determining the module engine as a target module engine under the condition that one page configured in advance by the module engine contains all pages corresponding to each target page number.
In some embodiments, the first processing module 330 is further configured to identify, by the root engine, a page number of a page configured in advance by each module engine, and perform association analysis on each target page number and a page configured in advance by each module engine; under the condition that the page which is configured in advance by one module engine does not contain all pages corresponding to the target page numbers, determining the set similarity between a page number set of the page which is configured in advance by the module engine and a set formed by the target page numbers; and screening more than one target module engine from the module engines based on the set similarity.
In some embodiments, the first processing module 330 is further configured to determine each intersection and each union between the set of page numbers of the pages configured in advance by each module engine and the set of target page numbers, respectively; and determining the ratio of the number of the pages in the intersection corresponding to each module engine to the number of the pages in the union corresponding to each module engine as the set similarity corresponding to each module engine.
In some embodiments, the first processing module 330 is further configured to determine a type of request service included in each history request information obtained by the front-end controller during the history period; determining different types of target request services of target quantity according to response frequencies of the request services of each type; and configuring the pages contained in each module engine based on each page corresponding to each target request service and the labels corresponding to each page.
In some embodiments, the parsing module 320 is further configured to parse the target request information through the front-end controller, and determine a type of the request service included in the target request information; determining each target page corresponding to the target request information based on the type of the request service contained in the target request information; and determining the page number of the target page as each target page number corresponding to the target request information.
In some embodiments, the tag includes at least one of a page tag, an interface tag, a cache tag, a log tag, a permission tag, and a timing start tag.
Fig. 4 illustrates a physical schematic diagram of an electronic device, as shown in fig. 4, which may include: processor 410, communication interface (Communications Interface) 420, memory 430 and communication bus 440, wherein processor 410, communication interface 420 and memory 430 communicate with each other via communication bus 440. Processor 410 may invoke logic instructions in memory 430 to perform a page configuration method for a view, the method comprising: acquiring target request information of a user through a front-end controller; analyzing the target request information through a front-end controller to acquire each target page number corresponding to the target request information; performing association analysis on each target page number and the page configured in advance by each module engine through the root engine, and screening at least one target module engine from the module engines based on the association analysis result; the root engine nano-tube is provided with a plurality of module engines, and pages contained in the module engines are determined based on labels of the pages and response frequencies corresponding to request service types corresponding to the pages; based on the page numbers and labels of the pages configured in advance in the target module engines obtained through screening, activating the target module engines through the root engine, and configuring configuration information of the pages in the target module engines so as to load services and functions of the pages; and packaging the services and functions corresponding to the target page numbers according to the configuration format through a view converter, and feeding back to the front-end controller to generate a view corresponding to the target request information.
Further, the logic instructions in the memory 430 described above may be implemented in the form of software functional units and may be stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product comprising a computer program storable on a non-transitory computer readable storage medium, the computer program, when executed by a processor, being capable of performing a method of page configuration of views provided by the methods described above, the method comprising: acquiring target request information of a user through a front-end controller; analyzing the target request information through a front-end controller to acquire each target page number corresponding to the target request information; performing association analysis on each target page number and the page configured in advance by each module engine through the root engine, and screening at least one target module engine from the module engines based on the association analysis result; the root engine nano-tube is provided with a plurality of module engines, and pages contained in the module engines are determined based on labels of the pages and response frequencies corresponding to request service types corresponding to the pages; based on the page numbers and labels of the pages configured in advance in the target module engines obtained through screening, activating the target module engines through the root engine, and configuring configuration information of the pages in the target module engines so as to load services and functions of the pages; and packaging the services and functions corresponding to the target page numbers according to the configuration format through a view converter, and feeding back to the front-end controller to generate a view corresponding to the target request information.
In yet another aspect, the present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method for page configuration for performing a view provided by the methods described above, the method comprising: acquiring target request information of a user through a front-end controller; analyzing the target request information through a front-end controller to acquire each target page number corresponding to the target request information; performing association analysis on each target page number and the page configured in advance by each module engine through the root engine, and screening at least one target module engine from the module engines based on the association analysis result; the root engine nano-tube is provided with a plurality of module engines, and pages contained in the module engines are determined based on labels of the pages and response frequencies corresponding to request service types corresponding to the pages; based on the page numbers and labels of the pages configured in advance in the target module engines obtained through screening, activating the target module engines through the root engine, and configuring configuration information of the pages in the target module engines so as to load services and functions of the pages; and packaging the services and functions corresponding to the target page numbers according to the configuration format through a view converter, and feeding back to the front-end controller to generate a view corresponding to the target request information.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for configuring a page of a view, comprising:
acquiring target request information of a user through a front-end controller;
analyzing the target request information through the front-end controller to acquire each target page number corresponding to the target request information;
performing association analysis on each target page number and the page configured in advance by each module engine through the root engine, and screening at least one target module engine from the module engines based on the association analysis result; the root engine nanotube is provided with a plurality of module engines, and pages contained in the module engines are determined based on labels of the pages and response frequencies corresponding to request service types corresponding to the pages;
Based on the page numbers and labels of the pages configured in advance in the target module engines obtained through screening, activating the target module engines through the root engine, and configuring configuration information of the pages in the target module engines so as to load services and functions of the pages;
and packaging the services and functions corresponding to the target page numbers according to the configuration format through a view converter, and feeding back to the front-end controller to generate the view corresponding to the target request information.
2. The method for configuring pages of view according to claim 1, wherein the performing, by the root engine, association analysis on each target page number and the page configured in advance by each module engine, and screening at least one target module engine from each module engine based on the association analysis result, includes:
the method comprises the steps that association degree analysis is conducted on each target page number and each page configured in advance by each module engine through a root engine, and page numbers of the pages configured in advance by each module engine are identified;
and determining the module engine as the target module engine under the condition that the page configured in advance by one module engine contains all pages corresponding to each target page number.
3. The method for configuring pages of view according to claim 1, wherein the performing, by the root engine, association analysis on each target page number and the page configured in advance by each module engine, and screening at least one target module engine from each module engine based on the association analysis result, includes:
the method comprises the steps that association degree analysis is conducted on each target page number and each page configured in advance by each module engine through a root engine, and page numbers of the pages configured in advance by each module engine are identified;
under the condition that the page which is configured in advance by one module engine does not contain all pages corresponding to the target page numbers, determining the set similarity between a page number set of the page which is configured in advance by the module engine and a set formed by the target page numbers;
and screening more than one target module engine from all the module engines based on the set similarity.
4. A method of configuring pages of a view according to claim 3, wherein determining the set similarity between the set of page numbers of the pages configured in advance by each module engine and the set of target page numbers comprises:
respectively determining each intersection and each union between a page number set of a page configured in advance by each module engine and a set formed by each target page number;
And determining the ratio of the number of the pages in the intersection corresponding to each module engine to the number of the pages in the union corresponding to each module engine as the set similarity corresponding to each module engine.
5. The page configuration method of view according to claim 1, wherein pages contained in the module engine are determined by:
determining the type of request service contained in each history request information of a user obtained by the front-end controller in a history period;
determining different types of target request services of target quantity according to response frequencies of the request services of each type;
and configuring the pages contained in each module engine based on each page corresponding to each target request service and the labels corresponding to each page.
6. The method for configuring a page of a view according to claim 1, wherein the parsing, by the front-end controller, the target request information to obtain each target page number corresponding to the target request information includes:
analyzing the target request information through the front-end controller, and determining the type of the request service contained in the target request information;
determining each target page corresponding to the target request information based on the type of the request service contained in the target request information;
And determining the page number of the target page as each target page number corresponding to the target request information.
7. The page configuration method of view according to claim 1, wherein the tags comprise at least one of a page tag, an interface tag, a cache tag, a log tag, a permission tag, and a timing start tag.
8. A page configuration apparatus for a view, comprising:
the acquisition module is used for acquiring target request information of a user through the front-end controller;
the analysis module is used for analyzing the target request information through the front-end controller and acquiring each target page number corresponding to the target request information;
the first processing module is used for carrying out association analysis on each target page number and the page configured in advance by each module engine through the root engine, and screening at least one target module engine from the module engines based on the association analysis result; the root engine nanotube is provided with a plurality of module engines, and pages contained in the module engines are determined based on labels of the pages and response frequencies corresponding to request service types corresponding to the pages;
the second processing module is used for activating each target module engine through the root engine based on the page number and the label of the page which are configured in advance in each target module engine and configured with the configuration information of the page in each target module engine so as to load the service and the function of the page;
And the third processing module is used for packaging the services and functions corresponding to the target page numbers according to the configuration format through a view converter and feeding back the services and functions to the front-end controller so as to generate the view corresponding to the target request information.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the page configuration method of the view of any of claims 1 to 7 when the program is executed by the processor.
10. A non-transitory computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when executed by a processor, implements a page configuration method of a view according to any of claims 1 to 7.
CN202311576457.2A 2023-11-24 2023-11-24 Page configuration method and device for view Active CN117290016B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311576457.2A CN117290016B (en) 2023-11-24 2023-11-24 Page configuration method and device for view

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311576457.2A CN117290016B (en) 2023-11-24 2023-11-24 Page configuration method and device for view

Publications (2)

Publication Number Publication Date
CN117290016A CN117290016A (en) 2023-12-26
CN117290016B true CN117290016B (en) 2024-01-26

Family

ID=89241044

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311576457.2A Active CN117290016B (en) 2023-11-24 2023-11-24 Page configuration method and device for view

Country Status (1)

Country Link
CN (1) CN117290016B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101030228A (en) * 2007-03-28 2007-09-05 华为技术有限公司 Page navigation method and device, and applied server
CN103890727A (en) * 2011-09-26 2014-06-25 英特尔公司 Simulation of Web applications and secondary devices in a Web browser, Web application development tools, and methods using the same
WO2018024057A1 (en) * 2016-08-01 2018-02-08 华为技术有限公司 Method and apparatus for accessing service
US10095669B1 (en) * 2015-12-22 2018-10-09 Amazon Technologies, Inc. Virtualized rendering
CN116594709A (en) * 2023-05-17 2023-08-15 北京百度网讯科技有限公司 Method, apparatus and computer program product for acquiring data

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101030228A (en) * 2007-03-28 2007-09-05 华为技术有限公司 Page navigation method and device, and applied server
CN103890727A (en) * 2011-09-26 2014-06-25 英特尔公司 Simulation of Web applications and secondary devices in a Web browser, Web application development tools, and methods using the same
US10095669B1 (en) * 2015-12-22 2018-10-09 Amazon Technologies, Inc. Virtualized rendering
WO2018024057A1 (en) * 2016-08-01 2018-02-08 华为技术有限公司 Method and apparatus for accessing service
CN116594709A (en) * 2023-05-17 2023-08-15 北京百度网讯科技有限公司 Method, apparatus and computer program product for acquiring data

Also Published As

Publication number Publication date
CN117290016A (en) 2023-12-26

Similar Documents

Publication Publication Date Title
US11474673B1 (en) Handling modifications in programming of an iterative message processing system
US11194552B1 (en) Assisted visual programming for iterative message processing system
US11113353B1 (en) Visual programming for iterative message processing system
US11086688B2 (en) Managing resource allocation in a stream processing framework
EP3404542A1 (en) Data pipeline architecture for analytics processing stack
CN107729139B (en) Method and device for concurrently acquiring resources
US11061548B1 (en) Context-sensitive user interfaces in an information technology (IT) and security operations application
US10547520B2 (en) Multi-cloud provisioning architecture with template aggregation
CN105635283A (en) Organization and management and using method and system for cloud manufacturing service
US20220121708A1 (en) Dynamic data enrichment
US10521286B2 (en) System and method for interoperable cloud DSL to orchestrate multiple cloud platforms and services
CN111414381B (en) Data processing method and device, electronic equipment and storage medium
US11715051B1 (en) Service provider instance recommendations using machine-learned classifications and reconciliation
US20210034496A1 (en) Auditing-as-a-service
US11886844B1 (en) Updating reusable custom functions across playbooks
CN109840298A (en) The multi information source acquisition method and system of large scale network data
CN109726004A (en) A kind of data processing method and device
CN108399095B (en) Method, system, device and storage medium for supporting dynamic management of timed tasks
CN111984505A (en) Operation and maintenance data acquisition engine and acquisition method
US11714683B1 (en) Information technology and security application automation architecture
CN112235124B (en) Method and device for configuring pico-cell, storage medium and electronic device
US11379416B1 (en) Systems and methods for common data ingestion
CN117290016B (en) Page configuration method and device for view
CN112751891B (en) Kafka-based message processing method, electronic equipment and storage medium
JP2003132039A (en) Scenario dividing system

Legal Events

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