CN111857737A - Dynamic and static resource separation method based on SysML (SysML) model semantic web system - Google Patents

Dynamic and static resource separation method based on SysML (SysML) model semantic web system Download PDF

Info

Publication number
CN111857737A
CN111857737A CN202010740846.4A CN202010740846A CN111857737A CN 111857737 A CN111857737 A CN 111857737A CN 202010740846 A CN202010740846 A CN 202010740846A CN 111857737 A CN111857737 A CN 111857737A
Authority
CN
China
Prior art keywords
model
sysml
dynamic
resources
web system
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010740846.4A
Other languages
Chinese (zh)
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.)
Suzhou Huawang Information Technology Co Ltd
Original Assignee
Suzhou Huawang Information Technology 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 Suzhou Huawang Information Technology Co Ltd filed Critical Suzhou Huawang Information Technology Co Ltd
Priority to CN202010740846.4A priority Critical patent/CN111857737A/en
Publication of CN111857737A publication Critical patent/CN111857737A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a dynamic and static resource separation method based on a semantic web system of a SysML model, which comprises the following steps: a user initiates a request, and the request reaches a Nginx server; the Nginx server appoints a proxy path to separate the dynamic resources and the static resources of the Web application through a configuration port, a supported data format, the size of a cache region and location; the Nginx server selects different processing servers by resource category. The method separates the dynamic resources from the static resources by utilizing the characteristics of the Nginx, greatly accelerates the response of the server and can respond to various requests.

Description

Dynamic and static resource separation method based on SysML (SysML) model semantic web system
Technical Field
The invention belongs to the technical field of internet, and particularly relates to a dynamic and static resource separation method based on a semantic web system of a SysML (SysML) model.
Background
When a user designs and models a complex system based on Model-based systems engineering (MBSE), a large number of static resources are involved, such as: HTML pages, pictures, CSS files, TypeScript source code, etc., while also accessing various dynamic resources such as various backend interfaces.
The original implementation was to put dynamic and static resources into the same cluster. This design has two disadvantages:
1) the pressure of the rear-end server is high, which is not beneficial to expansion;
2) a large amount of static resources required in the actual operation of a user need to be continuously transmitted through a network, so that the network delay is large, the jamming occurs, and the user experience is poor.
Disclosure of Invention
In order to solve the technical problem, the invention provides a dynamic and static resource separation method based on a semantic web system of a SysML model.
In order to achieve the purpose, the technical scheme of the invention is as follows:
on one hand, the invention provides a dynamic and static resource separation method based on a SysML (SysML) model semantic web system, which comprises the following steps:
a user initiates a request, and the request reaches a Nginx server;
the Nginx server appoints a proxy path to separate the dynamic resources and the static resources of the Web application through a configuration port, a supported data format, the size of a cache region and location;
the Nginx server selects different processing servers by resource category.
The method separates the dynamic resources from the static resources by utilizing the characteristics of the Nginx, greatly accelerates the response of the server and can respond to various requests.
On the basis of the technical scheme, the following improvements can be made:
as a preferred scheme, the method for separating the dynamic resources and the static resources of the Web application by the Nginx server through the configuration port, the data format support, the size of the cache area, and the location-specified proxy path specifically includes the following steps: and positioning and requesting the dynamic resources and the static resources according to the Uniform Resource Identifiers (URIs) of the requested resources.
As a preferred scheme, the process of the Nginx server locating and resolving the request of the dynamic resource and the static resource according to the uniform resource identifier URI of the request resource specifically includes the following steps:
the web system automatically identifies whether the URI is accurately hit, if so, the web system immediately returns and finishes the analysis process;
if the URI is not hit accurately, judging whether the URI is hit normally or not, if one URI is hit, recording a matching result, and continuing the analysis process; if a plurality of hits occur, recording the result with the longest match, and continuing the analysis process;
and judging whether the URI is in regular matching or not, if so, ignoring the result of common hit, directly returning the result of regular matching and finishing the analysis process, and if not, returning the longest result of common hit and finishing the analysis process.
Preferably, the static resource can be one or more of the following: the browser renders resources, pictures, videos, files.
On the other hand, the invention also provides a semantic web system based on the SysML model, which comprises the following steps:
the browser end is used for receiving a user request;
the Nginx server realizes the separation of dynamic resources and static resources by using the separation method and allocates different types of resources to corresponding processing servers;
and the processing server performs logic calculation related to the interior of the model based on the request and synchronizes logic calculation data to the browser end.
The Web system disclosed by the invention can quickly realize the separation and loading of dynamic resources and static resources, and has good Web performance.
Preferably, the browser end includes:
the model adaptation layer comprises a Sys ML (system in markup language) field meta-model representation which only contains basic model attributes and can completely support the complex associated semantics in the model, model data formed based on the Sys ML field meta-model representation, and logic calculation and request forwarding for realizing the interaction of the graphic layer and the processing server;
and the graphic layer acquires model data from the model adaptation layer based on the request to perform rendering representation.
Preferably, the processing server performs logic calculation of the internal association of the model based on the request, and synchronizes logic calculation data to the model adaptation layer.
Preferably, the model adaptation layer includes:
a UML component for carrying model elements;
the UMLPool component is used for maintaining and managing model elements, executing logical operation between the model elements and the model elements to obtain first logical data and second logical data related to the interior of a model provided by a service layer, and the model elements, the first logical data and the second logical data form model data;
a model tree component for maintaining and managing logical relationships between model data;
the element factory is used for creating, calling and instantiating UML elements and is also used for logical operation between model elements;
and the operation flow resolver is used for subscribing the user modeling operation.
Preferably, a rendering marker is arranged at a root node of the model tree in the model tree component, and the rendering marker is used for sensing data change of the model tree.
Preferably, the web system is loaded in a preloading mode.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a flowchart of a dynamic and static resource separation method based on a SysML model semantic web system according to an embodiment of the present invention.
Fig. 2 is a flowchart of positioning resolution according to an embodiment of the present invention.
Fig. 3 is a framework diagram of a semantic web system based on the SysML model according to an embodiment of the present invention.
Detailed Description
Preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the 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 invention.
As shown in fig. 1, on the one hand, the embodiment of the invention discloses a dynamic and static resource separation method based on a SysML model semantic web system, which comprises the following steps:
s100: a user initiates a request, and the request reaches a Nginx server;
s101: the Nginx server appoints a proxy path to separate the dynamic resources and the static resources of the Web application through a configuration port, a supported data format, the size of a cache region and location;
s102: the Nginx server selects different processing servers by resource category.
The method separates the dynamic resources from the static resources by utilizing the characteristics of the Nginx, greatly accelerates the response of the server and can respond to various requests.
The Nginx is used as a reverse proxy load balancer to forward the request to the internal server, the static resource and the dynamic resource of the Web application can be separated by using the acceleration mode, and the access speed of the static resource is greatly improved by combining with a cache technology.
In order to further optimize the implementation effect of the present invention, in other embodiments, the remaining feature technologies are the same, except that the separation of the dynamic resource and the static resource of the Web application by the agnix server through configuring the port, supporting the data format, the size of the cache, and the location-specified proxy path specifically includes the following contents: and positioning and requesting the dynamic resources and the static resources according to the Uniform Resource Identifiers (URIs) of the requested resources.
As shown in fig. 2, further, the process of the Nginx server performing the positioning of the dynamic resource and the static resource and the parsing of the request according to the uniform resource identifier URI of the request resource specifically includes the following steps:
the web system automatically identifies whether the URI is accurately hit, if so, the web system immediately returns and finishes the analysis process;
if the URI is not hit accurately, judging whether the URI is hit normally or not, if one URI is hit, recording a matching result, and continuing the analysis process; if a plurality of hits occur, recording the result with the longest match, and continuing the analysis process;
and judging whether the URI is in regular matching or not, if so, ignoring the result of common hit, directly returning the result of regular matching and finishing the analysis process, and if not, returning the longest result of common hit and finishing the analysis process.
In order to further optimize the implementation effect of the present invention, in other embodiments, the rest of the feature technologies are the same, except that the static resource can be one or more of the following: the browser renders resources, pictures, videos, files.
On the other hand, the invention also provides a semantic web system based on the SysML model, which comprises the following steps:
the browser end is used for receiving a user request;
the Nginx server realizes the separation of dynamic resources and static resources by using the separation method and allocates different types of resources to corresponding processing servers;
and the processing server performs logic calculation related to the interior of the model based on the request and synchronizes logic calculation data to the browser end.
The Web system disclosed by the invention can quickly realize the separation and loading of dynamic resources and static resources, and has good Web performance.
As shown in fig. 3, in order to further optimize the implementation effect of the present invention, in other embodiments, the remaining features are the same, except that the browser end includes:
the model adaptation layer comprises SysML field meta-model representation which only contains basic model attributes and can completely support the complex associated semantics in the model, model data formed based on the SysML field meta-model representation, and logic calculation and request forwarding for realizing the interaction between the graphic layer and the processing server;
and the graphic layer acquires model data from the model adaptation layer based on the request to perform rendering representation.
With the above-described embodiments, the presentation of data and the computation are separated from the overall architecture. The front-end browser end is mainly responsible for graphic rendering and user interaction, and the back-end processing server is responsible for model calculation and storage, and the front-end browser end and the back-end processing server are in data communication through a network. The browser-side engine can analyze and execute script languages such as JavaScript.
According to the method, the front-end browser end is further decoupled according to the persistence data of the M-Design and the OMG specification, and is designed into a graph layer and a model adaptation layer. The SysML meta-model representation of the model adaptation layer is different from the model representation of the back-end processing server, and only has basic model attributes, can completely support the complex associated semantics in the model, but cannot perform complex model reasoning calculation; the logic calculation and request forwarding in the front-end and back-end interaction act like an adapter and are responsible for binding the front-end and back-end interaction and necessary logic forwarding.
Further, the processing server performs logic calculation of the internal association of the model based on the request, and synchronizes logic operation data to the model adaptation layer.
By adopting the embodiment, the caching function of the model adaptation layer is realized in that the graphic layer does not need to rely on a back-end processing server to provide the logic data associated in the model, and the logic data associated in the model can be obtained from the model adaptation layer of the browser end; the data is the core of the model adaptation layer. The model adaptation layer is a data layer of the Web system and is a key for the Web system to completely express the semantics of the model.
In order to further optimize the implementation effect of the present invention, in other embodiments, the rest of the feature technologies are the same, except that the model adaptation layer includes:
a UML component for carrying model elements;
the UMLPool component is used for maintaining and managing model elements, executing logical operation between the model elements and the model elements to obtain first logical data and second logical data related to the interior of a model provided by a service layer, and the model elements, the first logical data and the second logical data form model data;
a model tree component for maintaining and managing logical relationships between model data;
the element factory is used for creating, calling and instantiating UML elements and is also used for logical operation between model elements;
and the operation flow resolver is used for subscribing the user modeling operation.
Furthermore, a rendering marker is arranged on a root node of the model tree in the model tree component and used for sensing data change of the model tree.
With the above embodiment, when the modeling project is too complex, the data of the model tree based on Vue cannot be updated in time when the tree depth exceeds 3 levels as the number of model tree mounted elements increases. The reason for this problem is that the above data structure fails when the model tree depth exceeds 3 levels. In order to solve the problem that the model tree cannot be rendered in time, the method sets a rendering marker for the root node of the model tree, and the rendering marker is used for sensing the data change of the model tree. The improved model tree can sense the data change by the mark value of the root node no matter how deep the model tree is, and the model tree can be updated in time.
In order to further optimize the implementation effect of the invention, in other embodiments, the rest features are the same in technology, except that the web system is loaded in a preloading mode.
By adopting the embodiment, the Web performance is greatly optimized by separating and loading the dynamic resources and the static resources, but the loading time is also very critical in the face of so many resource files. Lazy loading refers to loading Web resources by a browser end according to needs, and loading is carried out only when a user enters a visible area. And when the user operates every time, monitoring a user event, and judging whether the processing server needs to be requested to load resources or not by judging whether the picture enters the visible area or not. The lazy loading has the characteristics of reducing the loading of invalid resources and being suitable for scenes of excessive required resources and long paging of pages. Preloading refers to requesting resources in advance, and loading from a cache when resources are used. The preloading can be realized in various ways such as an Image object and an Html tag. According to the analysis, although the lazy loading can improve the experience of initial loading, when the lazy loading sub-route is entered, a large amount of judgments and resource requests need to be carried out, and the user experience is not good. Therefore, the modeling practical situation of the invention is combined, the loading capacity of the browser end is weighed, and the preloading is selected. In this way, the entry into the sub-route during user modeling is very fluid. When a user creates a project, the needed static resources are loaded at one time.
In order to further optimize the implementation effect of the present invention, in other embodiments, the rest features are the same, except that the processing server includes:
the Web static server is used for responding to the static resource access request;
and the Web application server is used for processing the dynamic resource request, executing application logic and connecting with the database server.
The above embodiments are merely illustrative of the technical concept and features of the present invention, and the purpose thereof is to enable those skilled in the art to understand the content of the present invention and implement the present invention, and not to limit the scope of the present invention, and all equivalent changes or modifications made according to the spirit of the present invention should be covered in the scope of the present invention.

Claims (10)

1. The dynamic and static resource separation method based on the semantic web system of the SysML model is characterized by comprising the following steps of:
a user initiates a request, and the request reaches a Nginx server;
the Nginx server appoints a proxy path to separate the dynamic resources and the static resources of the Web application through a configuration port, a supported data format, the size of a cache region and location;
the Nginx server selects different processing servers by resource category.
2. The dynamic and static resource separation method based on the SysML semantic Web system as claimed in claim 1, wherein the Nginx server specifies a proxy path through configuration port, supported data format, buffer size, location to separate the dynamic resource and the static resource of the Web application specifically includes the following contents: and positioning and requesting the dynamic resources and the static resources according to the Uniform Resource Identifiers (URIs) of the requested resources.
3. The dynamic and static resource separation method based on the SysML model semantic web system as claimed in claim 2, wherein the Nginx server performs the positioning of the dynamic resource and the static resource and the parsing process of the request according to the uniform resource identifier URI of the request resource, and specifically comprises the following steps:
the web system automatically identifies whether the URI is accurately hit, if so, the web system immediately returns and finishes the analysis process;
if the URI is not hit accurately, judging whether the URI is hit normally or not, if one URI is hit, recording a matching result, and continuing the analysis process; if a plurality of hits occur, recording the result with the longest match, and continuing the analysis process;
and judging whether the URI is in regular matching or not, if so, ignoring the result of common hit, directly returning the result of regular matching and finishing the analysis process, and if not, returning the longest result of common hit and finishing the analysis process.
4. The method for separating the dynamic and static resources based on the SysML model semantic web system as claimed in any one of claims 1 to 3, wherein the static resources can be one or more of the following: the browser renders resources, pictures, videos, files.
5. The semantic web system based on the SysML model is characterized by comprising the following steps:
the browser end is used for receiving a user request;
nginx server, which uses the separation method as claimed in any one of claims 1-4 to separate the dynamic resource and static resource, and allocates different types of resources to the corresponding processing servers;
and the processing server performs logic calculation related to the interior of the model based on the request and synchronizes logic calculation data to the browser end.
6. The SysML model semantic-based web system of claim 5, wherein the browser end comprises:
the model adaptation layer comprises a Sys ML (system markup language) field meta-model representation which only contains basic model attributes and can completely support the complex associated semantics inside the model, model data formed based on the Sys ML field meta-model representation, and logic calculation and request forwarding for realizing the interaction of the graphic layer and the processing server;
and the graphic layer acquires model data from the model adaptation layer for rendering representation based on a request.
7. The SysML model semantic-based web system of claim 6, wherein the processing server performs logical computation of model internal association based on a request and synchronizes logical operational data to the model adaptation layer.
8. The SysML model semantic-based web system of claim 7, wherein the model adaptation layer comprises:
a UML component for carrying model elements;
the UMLPool component is used for maintaining and managing model elements, executing logical operation between the model elements and the model elements to obtain first logical data and second logical data related to the interior of a model provided by a service layer, and the model elements, the first logical data and the second logical data form model data;
a model tree component for maintaining and managing logical relationships between model data;
the element factory is used for creating, calling and instantiating UML elements and is also used for logical operation between model elements;
and the operation flow resolver is used for subscribing the user modeling operation.
9. The SysML model-based semantic web system as claimed in claim 8, wherein a root node of a model tree in the model tree component is provided with a rendering tag, and the rendering tag is used for sensing data change of the model tree.
10. The SysML model semantic-based web system of any one of claims 5 to 9, wherein the web system is loaded in a pre-loaded manner.
CN202010740846.4A 2020-07-28 2020-07-28 Dynamic and static resource separation method based on SysML (SysML) model semantic web system Pending CN111857737A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010740846.4A CN111857737A (en) 2020-07-28 2020-07-28 Dynamic and static resource separation method based on SysML (SysML) model semantic web system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010740846.4A CN111857737A (en) 2020-07-28 2020-07-28 Dynamic and static resource separation method based on SysML (SysML) model semantic web system

Publications (1)

Publication Number Publication Date
CN111857737A true CN111857737A (en) 2020-10-30

Family

ID=72948503

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010740846.4A Pending CN111857737A (en) 2020-07-28 2020-07-28 Dynamic and static resource separation method based on SysML (SysML) model semantic web system

Country Status (1)

Country Link
CN (1) CN111857737A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113422760A (en) * 2021-06-10 2021-09-21 杭州安恒信息技术股份有限公司 Data transmission method, device, electronic device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1469276A (en) * 2002-06-28 2004-01-21 �ձ����ŵ绰��ʽ���� Method and apparatus for extracting information from self-structured documents
CN103635897A (en) * 2011-06-23 2014-03-12 微软公司 Dynamically updating a running page
US20170223430A1 (en) * 2014-09-12 2017-08-03 Kiswe Mobile Inc. Methods and apparatus for content interaction
CN109522018A (en) * 2018-11-14 2019-03-26 腾讯科技(深圳)有限公司 Page processing method, device and storage medium
CN111427556A (en) * 2020-03-30 2020-07-17 杭州华望系统科技有限公司 Web-based SysM L modeling platform

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1469276A (en) * 2002-06-28 2004-01-21 �ձ����ŵ绰��ʽ���� Method and apparatus for extracting information from self-structured documents
CN103635897A (en) * 2011-06-23 2014-03-12 微软公司 Dynamically updating a running page
US20170223430A1 (en) * 2014-09-12 2017-08-03 Kiswe Mobile Inc. Methods and apparatus for content interaction
CN109522018A (en) * 2018-11-14 2019-03-26 腾讯科技(深圳)有限公司 Page processing method, device and storage medium
CN111427556A (en) * 2020-03-30 2020-07-17 杭州华望系统科技有限公司 Web-based SysM L modeling platform

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
不穿格子衫: "Nginx的 Location匹配规则,泣血总结", pages 1 - 5, Retrieved from the Internet <URL:https://zhuanlan.zhihu.com/p/90506291> *
这个世界~: "【Nginx】实现动静分离", pages 1 - 3, Retrieved from the Internet <URL:https://www.cnblogs.com/haoworld/p/nginx-shi-xian-dong-jing-fen-li.html> *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113422760A (en) * 2021-06-10 2021-09-21 杭州安恒信息技术股份有限公司 Data transmission method, device, electronic device and storage medium
CN113422760B (en) * 2021-06-10 2023-04-07 杭州安恒信息技术股份有限公司 Data transmission method, device, electronic device and storage medium

Similar Documents

Publication Publication Date Title
KR101391894B1 (en) content request optimization
US6877025B2 (en) Integrated JSP and command cache for web applications with dynamic content
US7523158B1 (en) System and method for partial page updates using a proxy element
US6988135B2 (en) Method and system for specifying a cache policy for caching web pages which include dynamic content
US7702800B2 (en) Detecting and handling affinity breaks in web applications
US7490167B2 (en) System and method for platform and language-independent development and delivery of page-based content
Brown et al. Implementation patterns for microservices architectures
US8156429B2 (en) Method and system for accelerating downloading of web pages
US20020116582A1 (en) Batching of invalidations and new values in a web cache with dynamic content
US20090319355A1 (en) Presenting advertisements based on web-page interaction
US20070174420A1 (en) Caching of web service requests
US20060235998A1 (en) Off-loading data formatting to a communicatively coupled client
US10241758B2 (en) System and method for serving multiple data objects and formatting functions in a single request
CA2715834C (en) Method and apparatus for local ip address translation
US20020116583A1 (en) Automatic invalidation dependency capture in a web cache with dynamic content
CN109144619B (en) Icon font information processing method, device and system
US20020111992A1 (en) JSP composition in a cache for web applications with dynamic content
US6823360B2 (en) Cofetching in a command cache
US20020112125A1 (en) Command caching to improve network server performance
US20070055663A1 (en) Programmatic response for detected variants of HTTP requests
CN111857737A (en) Dynamic and static resource separation method based on SysML (SysML) model semantic web system
EP1395905A2 (en) Method and apparatus for dynamic shared-memory caching of scripting engine product
US11716405B1 (en) System and method for identifying cache miss in backend application
US10599740B1 (en) Program code streaming
JP6902580B2 (en) Systems and methods for providing distributed caching in transaction processing environments

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