Path processing method, device and equipment based on online engineering calculation interaction page
By performing path formatting on the online engineering computing interaction page, the problem of inability to effectively store analysis results in the prior art is solved, and the user experience of engineers is improved, making the process of the online engineering computing interaction page close to the running form of local software.
Patent Information
- Application Number
- CN202411833324.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-05-06
AI Technical Summary
Existing computer-aided engineering web applications cannot effectively store analysis results on the online engineering computing interactive page, resulting in inconsistent with the usage pattern of local software and reducing the user experience of engineers.
A path processing method based on online engineering computing interactive page is proposed. By acquiring online processing requests and performing path formatting processing, a target relative path is created to store processing results, so that the processing results are stored in the target engineering project.
It improves the experience of engineers when using computer-aided engineering web applications, makes the process of online engineering computing interactive pages close to the running form of local software, and enhances the convenience of engineers calling stored processing results.
Smart Images

Figure CN119939875A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer-aided engineering technology, and in particular to a path processing method, device and equipment based on an online engineering calculation interactive page. Background Art
[0002] In related technologies, a designed engineering model needs to undergo engineering analysis such as finite element analysis and structural analysis. Therefore, computer-aided engineering technology is needed to assist in the analysis of the engineering model. Generally speaking, there are two types of computer-aided engineering technology. One is to use local software. However, the calculation and operation of local software depends on the hardware computing resources used by engineers, which gives rise to another method of using Web applications.
[0003] In most of the existing computer-aided engineering Web applications, engineers upload engineering models and provide calculation parameters through online engineering calculation interactive pages. The server performs calculations based on the engineering models and calculation parameters, and then returns the calculation results on the page. However, such results are not stored in the current engineering model project, which results in obvious usage differences from local software, does not conform to the operating mode of local software, and reduces the user experience of engineers. Summary of the invention
[0004] The main purpose of the embodiments of the present application is to propose a path processing method, device and equipment based on an online engineering calculation interactive page, aiming to improve the experience of engineers when using computer-aided engineering Web applications.
[0005] To achieve the above-mentioned purpose, a first aspect of an embodiment of the present application proposes a path processing method based on an online engineering calculation interactive page, comprising the following steps: Acquire an online processing request generated through an online engineering calculation interactive page, wherein the online processing request includes processing parameters and a first relative path, the first relative path includes a target relative path, and a second relative path corresponding to a resource of a target engineering project displayed on the online engineering calculation interactive page; If the first relative path does not have a corresponding relative file path in the directory of the target project, performing path formatting processing on the relative directory path corresponding to the second relative path according to the first relative path to obtain a target relative file path of the target relative path under the relative directory path corresponding to the second relative path; The processing result obtained based on the processing parameters is stored in the location pointed to by the target relative file path.
[0006] In one embodiment, the first relative path is a relative path relative to a base directory path; The method of determining whether the first relative path has a corresponding file path in the directory of the target engineering project includes: Determine a first reference directory path corresponding to the online engineering calculation interactive page according to a preset configuration file; Convert the first relative path into a file path format according to the first reference directory path to obtain a target absolute file path corresponding to the first relative path; Perform a path existence check on the target absolute file path, and output a path existence check result of the target absolute file path.
[0007] In one embodiment, converting the first relative path into a directory format according to the first reference directory information to obtain an absolute file path corresponding to the first relative path includes: Acquiring environmental variable information for managing the target engineering project; If the environment variable information indicates that the path format of the first relative path does not match the configuration environment of the target engineering project, the first relative path is converted into a format according to the configuration environment to obtain a third relative path, wherein the path format of the third relative path is the same as the path format of the path in the directory of the target engineering project; The first reference directory information and the third relative path are subjected to file path concatenation processing to obtain the target absolute file path.
[0008] In one embodiment, after storing the processing result, the method further includes: Generate a first web page file according to the first relative path, wherein the first web page file corresponds to the online engineering calculation interactive page; Return response processing is performed according to the first web page file, so that the terminal sending the online processing request renders and displays the online engineering calculation interactive page according to the first web page file, obtains the processing result according to the first relative path, and updates the processing result and displays it in the online engineering calculation interactive page.
[0009] In one embodiment, after performing return response processing according to the first webpage file, the method further includes: Acquire a copy request generated through the target online engineering calculation interactive page, wherein the copy request includes the second relative path and the target transfer relative path; If the copy request indicates that the resources under the relative directory path corresponding to the target transfer relative path are transferred to the relative directory path corresponding to the second relative path, then if the target transfer relative path exists, the resources under the relative directory path corresponding to the target transfer relative path are copied and written to the relative directory path corresponding to the second relative path; Generate a second web page file according to the second relative path, wherein the second web page file corresponds to the online engineering calculation interactive page, and the second web page file includes multiple relative paths at a level below the second relative path; Perform return response processing according to the second web page file, so that the terminal renders and displays the online engineering calculation interactive page according to the second web page file, obtains the processing result according to the first relative path, obtains the current resource under the relative directory path corresponding to the second relative path according to the second relative path, and displays the processing result and the current resource under the relative directory path corresponding to the second relative path in the online engineering calculation interactive page at the same time.
[0010] In one embodiment, after obtaining the copy request, the method further includes: If the copy request indicates that the resource under the relative directory path corresponding to the second relative path is transferred to the relative directory path corresponding to the target transfer relative path, and if the target transfer relative path does not exist, the target transfer relative path is formatted with a relative directory path to obtain a transfer relative directory path of the target transfer relative path; In the directory of the target project, the resources under the relative directory path corresponding to the second relative path are copied and written to the location pointed to by the transfer relative directory path.
[0011] In one embodiment, after storing the processing result, the method further includes: Acquire a second reference directory path for the second relative path according to the target relative file path; Generate a third web page file according to the target relative path, wherein the third web page file corresponds to a target online engineering calculation interaction page, the target online engineering calculation interaction page is a jump page of the online engineering calculation interaction page that generates the online processing request, and the third web page file is associated with the second base directory path; Return response processing is performed according to the third web page file, so that the terminal that sends the online processing request renders and displays the target online engineering calculation interactive page according to the third web page file, obtains the processing result according to the target relative file path, and displays the processing result in the target online engineering calculation interactive page.
[0012] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application proposes a path processing device based on an online engineering calculation interactive page, comprising: An online processing request acquisition module, used to acquire an online processing request generated through an online engineering calculation interactive page, wherein the online processing request includes processing parameters and a first relative path, the first relative path includes a target relative path, and a second relative path corresponding to a resource of a target engineering project displayed on the online engineering calculation interactive page; A path formatting processing module is used for, if the first relative path does not have a corresponding relative file path in the directory of the target engineering project, performing path formatting processing on the relative directory path corresponding to the second relative path according to the first relative path, so as to obtain a target relative file path of the target relative path under the relative directory path corresponding to the second relative path; The processing result storage module is used to store the processing result obtained based on the processing parameters in the directory location pointed to by the target relative file path.
[0013] To achieve the above objectives, a third aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method described in the first aspect is implemented.
[0014] To achieve the above-mentioned purpose, the fourth aspect of an embodiment of the present application proposes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.
[0015] The present application proposes a path processing method, device and equipment based on an online engineering calculation interactive page, the method comprising: obtaining an online processing request generated by an online engineering calculation interactive page, wherein the online processing request comprises processing parameters and a first relative path, the first relative path comprises a target relative path, and a second relative path corresponding to a resource of a target engineering project displayed on the online engineering calculation interactive page; if the first relative path does not have a corresponding relative file path in the directory of the target engineering project, performing path formatting processing on the relative directory path corresponding to the second relative path according to the first relative path to obtain a target relative file path of the target relative path under the relative directory path corresponding to the second relative path; and storing a processing result obtained based on the processing parameters to a location pointed to by the target relative file path. By obtaining the online processing request and performing path formatting, when the path under the requested target engineering project does not exist, a corresponding target relative path is created under the target engineering project. In this way, the processing result can be stored in the location pointed to by the target relative path, so that the processing result can be stored in the target engineering project, thereby making the process of engineering analysis performed through the online engineering calculation interactive page closer to the running form of the local software, providing a convenient basis for engineers to quickly and conveniently call the stored processing results in the target engineering project, thereby better improving the experience of engineers when using computer-aided engineering Web applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 It is a flow chart of a path processing method based on an online engineering calculation interactive page provided by an embodiment of the present application; Figure 2 is a flowchart of determining the existence of a first relative path provided in an embodiment of the present application; Figure 3 yes Figure 2 A flowchart of an embodiment of a sub-step of step 220; Figure 4 is a flow chart of a path processing method based on an online engineering calculation interactive page provided by another embodiment of the present application; Figure 5 is a flow chart of a path processing method based on an online engineering calculation interactive page provided by another embodiment of the present application; Figure 6 is a flow chart of a path processing method based on an online engineering calculation interactive page provided by another embodiment of the present application; Figure 7 is a flow chart of a path processing method based on an online engineering calculation interactive page provided by another embodiment of the present application; Figure 8It is a structural schematic diagram of a path processing device based on an online engineering calculation interactive page provided in an embodiment of the present application; Fig. 9 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0017] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0018] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0019] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0020] First, some terms that appear in the embodiments of the present application are explained.
[0021] The online engineering calculation interactive page refers to an online web page that can be used for Computer Aided Engineering (CAE) calculations. The online engineering calculation interactive page can provide an operation page similar to local CAE software for users to interact with parameters. The input parameters can be transmitted back to the cloud computing platform with CAE capabilities. Through the powerful computing resources of the cloud computing platform with CAE capabilities, the engineering parameters can be quickly calculated and displayed in real time on this online web page, thereby quickly achieving high-quality engineering design.
[0022] In related technologies, a designed engineering model needs to undergo engineering analysis such as finite element analysis and structural analysis. Therefore, computer-aided engineering technology is needed to assist in the analysis of the engineering model. Generally speaking, there are two types of computer-aided engineering technology. One is to use local software. However, the calculation and operation of local software depends on the hardware computing resources used by engineers, which gives rise to another method of using Web applications.
[0023] In most of the existing computer-aided engineering Web applications, engineers upload engineering models and provide calculation parameters through online engineering calculation interactive pages. The server performs calculations based on the engineering models and calculation parameters, and then returns the calculation results on the page. However, such results are not stored in the current engineering model project, which results in obvious usage differences from local software, does not conform to the operating mode of local software, and reduces the user experience of engineers.
[0024] In order to improve the experience of engineers when using computer-aided engineering Web applications, an embodiment of the present application provides a path processing method based on an online engineering calculation interactive page, a path processing device based on an online engineering calculation interactive page, an electronic device and a computer-readable storage medium. The method can first obtain an online processing request generated by the online engineering calculation interactive page, wherein the online processing request includes processing parameters and a first relative path, the first relative path includes a target relative path, and a second relative path corresponding to the resources of the target engineering project displayed on the online engineering calculation interactive page; if the first relative path does not have a corresponding relative file path in the directory of the target engineering project, path formatting processing is performed on the relative directory path corresponding to the second relative path according to the first relative path to obtain the target relative file path of the target relative path under the relative directory path corresponding to the second relative path; then, the processing result obtained based on the processing parameters is stored in the location pointed to by the target relative file path. By obtaining the online processing request and performing path formatting, when the path under the requested target engineering project does not exist, the corresponding target relative path is created under the target engineering project. In this way, the processing result can be stored in the location pointed to by the target relative path, so that the processing result can be stored in the target engineering project, and then the process of engineering analysis performed through the online engineering calculation interactive page can be closer to the running form of the local software, providing a convenient basis for engineers to quickly and conveniently call the stored processing results in the target engineering project, so as to better improve the experience of engineers when using computer-aided engineering Web applications. In addition, since a relative path is used, the compatibility of the analysis process when running the target engineering project can be improved, and the experience difference of engineers on the online engineering calculation interactive page can be reduced. At the same time, without knowing the root directory path or the base directory path in advance, the absolute path cannot be determined through the relative path, so that it is impossible to access the resources under the directory of the target engineering project through the absolute path, which improves the security of the online analysis process.
[0025] The embodiments of the present application provide a path processing method, device, electronic device and storage medium based on an online engineering calculation interactive page, which are specifically illustrated by the following embodiments. First, the path processing method based on an online engineering calculation interactive page in the embodiments of the present application is described.
[0026] The path processing method based on the online engineering calculation interactive page provided in the embodiment of the present application can be applied to the server side, and can also be software running in the terminal or server side. In some embodiments, the server side can be configured as an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the path processing method based on the online engineering calculation interactive page, etc., but is not limited to the above forms.
[0027] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0028] See also Figure 1 , Figure 1 The flow of a path processing method based on an online engineering calculation interactive page provided by an embodiment of the present application is shown. In the embodiment of the present application, the path processing method based on the online engineering calculation interactive page may include steps 110 to 130.
[0029] Step 110: obtaining an online processing request generated through the online engineering calculation interactive page, wherein the online processing request includes processing parameters and a first relative path, the first relative path includes a target relative path, and a second relative path corresponding to a resource of a target engineering project displayed on the online engineering calculation interactive page; Step 120: If the first relative path does not have a corresponding relative file path in the directory of the target project, perform path formatting processing on the relative directory path corresponding to the second relative path according to the first relative path to obtain a target relative file path under the relative directory path corresponding to the second relative path; Step 130: Store the processing results obtained based on the processing parameters in the directory location pointed to by the target relative file path.
[0030] In one embodiment, the online processing request generated by the online engineering calculation interactive page refers to the request generated when the user executes an item that requires input of processing parameters and uploads it in the online engineering calculation interactive page through the terminal. Among them, the processing parameters refer to the parameters required for a specific processing item to be executed. The processing parameters can be physical parameters for finite element analysis (FEA), or model parameters for establishing an analysis model, etc., which are not specifically limited here. In addition, the online processing request can include only the processing parameters and the first relative path, or it can include information such as user identification, token information, etc. in addition to the processing parameters and the first relative path, which are not specifically limited here.
[0031] In one embodiment, the first relative path refers to the URL relative path of a request for a specific resource at a specific location under a specific directory. The second relative path included in the first relative path refers to the relative path of the specific location under the specific directory where the resource displayed on the current online engineering calculation interactive page is located, that is, the online engineering calculation interactive page displays all resources at the specific location pointed to by the second relative path. The target path included in the first relative path refers to the relative path portion of the first relative path except the second relative path. For example, the URL path of the current online engineering calculation interactive page is "http: / / xxxx.com / calculate / ", then " / calculate / " is the second relative path. Assuming that an online processing request is sent, the first relative path included in the request is " / calculate / result.json", then " / result.json" is the target relative path.
[0032] In one embodiment, a relative file path refers to a physical relative storage path in the directory of a target project stored on a server, which is used to indicate the storage location of a specific file relative to a specific root directory path. For example, assuming that a file is stored in the directory of the target project on the server, and the physical absolute path of the file is " / var / www / files / calculate / result.json", then in the physical absolute path of the file, " / www / files / calculate / result.json" is a relative file path.
[0033] In one embodiment, in the process of performing path formatting processing on the relative directory path corresponding to the second relative path according to the first relative path to obtain the target relative file path of the target relative path under the relative directory path corresponding to the second relative path, specifically, the absolute file path corresponding to the first relative path in the directory of the target project can be obtained by converting the root directory path and the first relative path, and then, according to the absolute directory path corresponding to the second relative path in the directory of the target project, the target relative file path corresponding to the target relative path can be separated from the absolute file path corresponding to the first relative path, and then, in the directory corresponding to the second relative path in the target project, the target relative file path can be generated.
[0034] In one embodiment, each relative directory path and each relative file path under the directory of the target engineering project are relative paths relative to the root directory path. After obtaining the target relative file path, the information of the relative file path corresponding to the first relative path under the directory of the target engineering project is persisted in a preset configuration file.
[0035] In one embodiment, each relative directory path and each relative file path under the directory of the target engineering project can be a relative path relative to the base directory path formed by the upper n-level path. After obtaining the target relative file path, first determine the relative file path corresponding to the first relative path, the relative file path relative to the base directory path formed by the upper n-level path; then, persist the relative file path relative to the base directory path formed by the upper n-level path to a pre-set configuration file. In this way, when the online engineering calculation interactive page makes a resource call, the directory structure on the server can be hidden through the relative file path relative to the base directory path formed by the upper n-level path, thereby further reducing the risk of sensitive information exposure on the server.
[0036] In one embodiment, the processing result obtained based on the processing parameters refers to the processing result output after the server performs specific processing items according to the processing parameters. The processing result can be a message or a file, which is not specifically limited here.
[0037] In one embodiment, storing the processing result obtained based on the processing parameters to the location pointed to by the target relative file path refers to the operation of writing the processing result in the form of a file to the physical location pointed to by the target relative file path in the server.
[0038] In one embodiment, if the first relative path has a corresponding relative file path in the directory of the target project, and a file has been stored at the location pointed to by the relative file path, the stored file is overwritten and stored at the location pointed to by the relative file path according to the processing result.
[0039] In one embodiment, if the first relative path has a corresponding relative file path in the directory of the target engineering project, and the location pointed to by the relative file path has no stored file written therein, the process directly goes to step 130 .
[0040] In one embodiment, after step 130, the entire current target engineering project may be exported, so that a target engineering project with processing results can be obtained, thereby effectively retaining the calculated data in the target engineering project.
[0041] See also Figure 2 , Figure 2 The process of determining the existence of a first relative path provided by an embodiment of the present application is shown. In one embodiment, the first relative path is a relative path relative to a base directory path. The method of determining whether the first relative path has a corresponding file path in the directory of the target engineering project may include steps 210 to 230.
[0042] Step 210: determining a first reference directory path corresponding to the online engineering calculation interactive page according to a preset configuration file; Step 220: convert the first relative path into a file path format according to the first reference directory path to obtain a target absolute file path corresponding to the first relative path; Step 230: Perform a path existence check on the target absolute file path, and output the path existence check result of the target absolute file path.
[0043] In one embodiment, the configuration file refers to a file used to store various configuration information of the entire target project. The configuration file may include path information (i.e., recording the paths of various directories and files in the target project), web page file information (paths and names of various web page files in the target project), etc., which are not specifically limited here.
[0044] In one embodiment, when the target engineering project uses a base directory path, either the path information or the web page file information may include association information between the web page file and the base directory path, that is, the relative path included in a web page file combined with its corresponding base directory path can obtain the absolute path of these relative paths.
[0045] In one embodiment, the file path format conversion refers to converting the first relative path into a relative path that complies with the path format of the target engineering project, and then performing a path concatenation operation on the converted relative path and the first reference directory.
[0046] In one embodiment, in the process of performing a path existence check on the target absolute file path and outputting the path existence check result of the target absolute file path, it can be specifically based on accessing each path portion in the target absolute file path. If a path portion in the target absolute file path is successfully accessed, the next path portion is accessed until all accesses are successful, and it is determined that the target absolute file path exists in the target engineering project; if a path portion in the target absolute file path fails to be accessed, it is determined that the relative file path formed by the path portion and the subsequent path portions does not exist in the directory of the target engineering project.
[0047] In one embodiment, in the process of performing a path existence check on the target absolute file path and outputting the path existence check result of the target absolute file path, the target absolute file path can be specifically queried in a preset configuration file. If the target absolute file path is successfully queried, it is determined that the target absolute file path exists in the target engineering project; if the query fails, it is determined that the target absolute file path does not exist in the target engineering project.
[0048] By converting the first relative path and the first base directory path into the target absolute file path, the impact of the path format on file positioning can be reduced. Then, by performing path verification on the target absolute file path, the target project can be accurately located in the server, and the path existence detection can be performed in the target project, thereby improving the reliability of the detection result.
[0049] See also Figure 3 , Figure 3 Shows Figure 2 In the process of a sub-step embodiment of step 220, in one embodiment, step 220 may include the following steps.
[0050] Step 310: Obtaining environment variable information for managing the root directory of the target engineering project; Step 320: If the environment variable information indicates that the path format of the first relative path does not match the configuration environment of the target project, the first relative path is converted according to the configuration environment to obtain a third relative path, wherein the path format of the third relative path is the same as the path format of the path in the directory of the target project; Step 330: Perform file path concatenation processing on the first reference directory information and the third relative path to obtain a target absolute file path.
[0051] In one embodiment, the environment variable information refers to configuration information for representing the operating environment of the web page, wherein the environment variable information may include configuration path information of library files used for web page operation, information of the operating system storing web page files, etc., which are not specifically limited here.
[0052] In one embodiment, the environment variable information indicates that the path format of the first relative path does not match the configuration environment of the target project, which means that the path format of the first relative path determined according to the environment variable information does not match the format of the configuration path used by the operating environment of the configuration of the target project. For example, if the first relative path uses a URL path and the operating environment of the target project is a Linux environment, the first relative path does not match the Linux environment, and the server cannot directly access the path in the target project according to the first relative path.
[0053] In one embodiment, performing format conversion processing on the first relative path for the configuration environment to obtain the third relative path means converting the first relative path into a third relative path matching the path format of the configuration environment. The format conversion processing for the configuration environment can be implemented by converting each drive letter in the third relative path, or by converting a network path into a normalized path, etc., which is not specifically limited here.
[0054] In one embodiment, if the environment variable information indicates that the format of the first relative path matches the configuration environment of the target project, the path format of the first relative path is the same as the path format of the path in the directory of the target project, and therefore, step 330 may be directly executed.
[0055] By converting the path format for the configuration environment when the path format of the first relative path does not match the configuration environment of the target engineering project, the compatibility of the first relative path in different operating systems and file systems can be improved, thereby improving the flexibility of the online engineering calculation interactive page configuration and facilitating the migration of the target engineering project.
[0056] See also Figure 4 , Figure 4The flow chart of a path processing method based on an online engineering calculation interactive page provided by another embodiment of the present application is shown. After step 130, the path processing method may further include the following steps.
[0057] Step 410: Generate a first web page file according to the first relative path, wherein the first web page file corresponds to the online engineering calculation interactive page; Step 420: Perform return response processing according to the first web page file, so that the terminal that sends the online processing request renders and displays the online engineering calculation interactive page according to the first web page file, obtains the processing result according to the first relative path, and updates the processing result and displays it in the online engineering calculation interactive page.
[0058] In one embodiment, in the process of generating a first web page file according to a first relative path, the web page file corresponding to the online engineering calculation interactive page currently displayed under the target engineering project can be called first, and then the first relative path is loaded in the web page file to update the web page file to the first web page file.
[0059] In one embodiment, in the process of generating the first web page file according to the first relative path, the initial page file of the online engineering calculation interactive page can be called first, and then the first relative path and the URL relative path corresponding to the relative file path of the resources displayed on the current online engineering calculation interactive page under the target engineering project are loaded into the initial page file to obtain the first web page file.
[0060] In one embodiment, if the request type of the online processing request is a data request type, in the process of executing step 420, the first relative path can be returned to the terminal as return data, and the terminal can add the received first relative path to the web page file corresponding to the online engineering calculation interactive page currently displayed in the terminal, and update it to the first web page file. Then, in the process of rendering the first web page file, the processing result stored in the target engineering project is obtained from the server according to the first relative path, and then the processing result is updated and displayed in the online engineering calculation interactive page.
[0061] In one embodiment, if the request type of the online processing request is a web page request type, during the execution of step 420, the first web page file can be sent to the terminal, and the terminal renders the page according to the first web page file. During the rendering process, the processing result stored in the target engineering project is obtained from the server according to the first relative path, and the corresponding resources under the target engineering project are obtained from the server according to other relative paths in the first web page file. Then, the online engineering calculation interactive page is regenerated and updated according to the processing results and these resources, and displayed.
[0062] The first web page file is generated through the first relative path, and the corresponding return response processing is performed, so that the terminal can call the server according to the first relative path to generate the processing result, so that the processing result can be returned to the terminal in real time, which is conducive to improving the user experience of the online engineering calculation interactive page.
[0063] See also Figure 5 , Figure 5 The flow of a path processing method based on an online engineering calculation interactive page provided by another embodiment of the present application is shown. After step 420, the path processing method may further include the following steps.
[0064] Step 510: obtaining a copy request generated through the target online engineering calculation interactive page, the copy request including the second relative path and the target transfer relative path; Step 520: If the copy request indicates that the resource under the relative directory path corresponding to the target transfer relative path is transferred to the relative directory path corresponding to the second relative path, if the relative directory path corresponding to the target transfer relative path exists, the resource under the relative directory path corresponding to the target transfer relative path is copied and written to the relative directory path corresponding to the second relative path; Step 530: Generate a second web page file according to the second relative path, wherein the second web page file corresponds to the online engineering calculation interactive page, and the second web page file includes a plurality of relative paths one level below the second relative path; Step 540: Perform return response processing according to the second web page file, so that the terminal renders and displays the online engineering calculation interactive page according to the second web page file, obtains the processing result according to the first relative path, obtains the current resource under the relative directory path corresponding to the second relative path according to the second relative path, and displays the processing result and the current resource under the relative directory path corresponding to the second relative path in the online engineering calculation interactive page at the same time.
[0065] In one embodiment, the target transfer relative path refers to a URL relative path corresponding to a relative directory path of a resource copying event. The relative directory path corresponding to the target transfer relative path in the server may belong to the same target project as the relative directory path corresponding to the second relative path, or may belong to a project other than the target project, which is not specifically limited here.
[0066] In one embodiment, step 520 includes a process of determining the existence of the target transfer relative path. The specific process may refer to steps 210 to 230 and will not be described in detail here.
[0067] In one embodiment, in the process of generating the second web page file according to the second relative path, the first web page file under the target project can be called first, and then, in the first web page file, multiple relative paths of the next level of the second relative path are loaded to update the first web page file to the second web page file. Among them, the multiple relative paths of the next level of the second relative path include the first relative path and the URL relative path corresponding to the relative directory path or relative file path to which the transferred resource belongs.
[0068] In one embodiment, in the process of generating the second web page file according to the second relative path, the initial page file of the online engineering calculation interactive page can be called first, and then multiple relative paths of the next level of the second relative path are loaded in the initial page file, and the web page file is generated again to obtain the second web page file. Among them, the multiple relative paths of the next level of the second relative path include the first relative path and the URL relative path corresponding to the relative directory path or relative file path to which the transferred resource belongs.
[0069] In one embodiment, if the response return type of the copy request is a data type, during the execution of step 540, the newly added relative path in the multiple relative paths at the next level of the second relative path can be returned to the terminal as return data, and the terminal can add the received multiple relative paths at the next level of the second relative path to the first web page file in the terminal, and update it to the second web page file. Then, during the rendering process, according to the newly transferred relative paths in the multiple relative paths at the next level of the second relative path, the server is obtained to obtain the resources corresponding to each of these relative paths under the target engineering project, and then the newly transferred resources and the processing results are displayed simultaneously in the online engineering calculation interactive page.
[0070] In one embodiment, if the response return type of the copy request is a web page type, during the execution of step 540, the second web page file can be sent to the terminal, and the terminal renders the page according to the second web page file. During the rendering process, the resources corresponding to each of these relative paths under the target engineering project are obtained from the server according to multiple relative paths at the next level of the second relative path. Then, the processing results, the original resources under the relative directory path corresponding to the second relative path, and the newly transferred resources are displayed on the online engineering calculation interactive page at the same time.
[0071] In one embodiment, if the copy request indicates that the resources under the relative directory path corresponding to the second relative path are transferred to the relative directory path corresponding to the target transfer relative path, and if the relative directory path corresponding to the target transfer relative path exists, the resources under the relative directory path corresponding to the second relative path can be transferred to the relative directory path corresponding to the target transfer relative path with reference to steps 520 to 540, and the details are not repeated here.
[0072] By obtaining a copy request, the resources under the relative directory path corresponding to the target transfer relative path are copied and written to the relative directory path corresponding to the second relative path. In this way, the resources corresponding to the target transfer path can be copied to the target engineering project in the online engineering calculation interactive page, so that the difference between the resource calling operation of the online engineering calculation interactive page and the resource calling operation of the local CAE software can be effectively reduced, and users can conveniently call different resources to the target engineering project, which is conducive to improving the user experience of the online engineering calculation interactive page.
[0073] See also Figure 6 , Figure 6 The flow of a path processing method based on an online engineering calculation interactive page provided by another embodiment of the present application is shown. After step 510, the path processing method may further include the following steps.
[0074] Step 610: If the copy request indicates that the resource under the relative directory path corresponding to the second relative path is transferred to the relative directory path corresponding to the target transfer relative path, and if the relative directory path corresponding to the target transfer relative path does not exist, the target transfer relative path is formatted to obtain a transfer relative directory path of the target transfer relative path; Step 620: Copy and write the resources under the relative directory path corresponding to the second relative path in the directory of the target project to the location pointed to by the transfer relative directory path.
[0075] In one embodiment, the relative path in the server is a relative path relative to the root directory path. In the process of performing relative directory path formatting on the target transfer relative path to obtain the transfer relative directory path of the target transfer relative path, the absolute directory path corresponding to the target transfer relative path can be obtained based on the root directory path and the target transfer relative path. Then, the non-existent relative path part is separated from the absolute directory path corresponding to the directory of the target project; then, the non-existent relative path part is generated in the directory corresponding to the currently existing lowest-level relative directory path in the absolute directory path.
[0076] In one embodiment, the target transfer relative path can be a relative path relative to a base directory path formed by the upper n-level path. After obtaining the target relative file path, first determine the base directory path corresponding to the directory of the project where the target transfer relative path is located, and then determine the transfer relative directory path of the target transfer relative path based on the relative file path of the base directory path.
[0077] See also Figure 7 , Figure 7 The flow chart of a path processing method based on an online engineering calculation interactive page provided by another embodiment of the present application is shown. After step 130, the path processing method may further include the following steps.
[0078] Step 710: Obtain a second reference directory path for a second relative path according to the target relative file path; Step 720: Generate a third webpage file according to the target relative path, wherein the third webpage file corresponds to the target online engineering calculation interaction page, the target online engineering calculation interaction page is a jump page of the online engineering calculation interaction page that generates the online processing request, and the third webpage file is associated with the second base directory path; Step 730: Perform return response processing according to the third web page file, so that the terminal that sends the online processing request renders and displays the target online engineering calculation interactive page according to the third web page file, obtains the processing result according to the target relative file path, and displays the processing result in the target online engineering calculation interactive page.
[0079] In one embodiment, the second reference directory path for the second relative path refers to a reference directory path that takes the absolute directory path corresponding to the second relative path as a reference.
[0080] In one embodiment, in the process of generating the third web page file according to the target relative path, the initial web page file corresponding to the target online engineering calculation interactive page under the target engineering project can be called first, and then the target relative path is loaded in the initial web page file to obtain the third web page file.
[0081] In one embodiment, during the execution of step 730, a third web page file can be sent to the terminal, and the terminal renders the page according to the third web page file. During the rendering process, the processing result of the first relative path under the target engineering project is obtained from the server according to the target relative path, and then a target online engineering calculation interactive page is generated according to the processing result and displayed.
[0082] By obtaining the second reference directory path, the generated third web page file can carry the target relative path pointing to the storage location of the processing results. In this way, the actual directory structure information set on the server in the third web page file can be greatly reduced, thereby effectively reducing the risk of sensitive information exposure on the server, which is conducive to improving the security of processing target engineering projects through online engineering calculation interactive pages.
[0083] See also Figure 8 The embodiment of the present application further provides a path processing device based on an online engineering calculation interactive page, which can implement the path processing method based on an online engineering calculation interactive page of the first aspect. The path processing device 800 based on an online engineering calculation interactive page includes: The online processing request acquisition module 810 may be used to acquire an online processing request generated through an online engineering calculation interactive page, wherein the online processing request includes processing parameters and a first relative path, the first relative path includes a target relative path, and a second relative path corresponding to a resource of a target engineering project displayed on the online engineering calculation interactive page; The path formatting processing module 820 may be used to perform path formatting processing on the relative directory path corresponding to the second relative path according to the first relative path if there is no corresponding relative file path in the directory of the target project, so as to obtain the target relative file path under the relative directory path corresponding to the second relative path. The processing result storage module 830 can be used to store the processing results obtained based on the processing parameters in the directory location pointed to by the target relative file path.
[0084] The specific implementation of the path processing device based on the online engineering calculation interactive page is basically the same as the specific implementation of the path processing method based on the online engineering calculation interactive page mentioned above, and will not be repeated here.
[0085] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above-mentioned path processing method based on the online engineering calculation interactive page when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.
[0086] See also Fig. 9 , Fig. 9 The hardware structure of an electronic device of another embodiment is illustrated. The electronic device 900 includes: The processor 901 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application; The memory 902 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 902, and the processor 901 calls and executes the path processing method based on the online engineering calculation interactive page of the embodiment of this application; Input / output interface 903, used to implement information input and output; Communication interface 904, used to realize communication interaction between the device and other devices, which can be realized through wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.); A bus 905 that transmits information between various components of the device (e.g., the processor 901, the memory 902, the input / output interface 903, and the communication interface 904); The processor 901 , the memory 902 , the input / output interface 903 and the communication interface 904 are connected to each other in communication within the device via a bus 905 .
[0087] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the above-mentioned path processing method based on the online engineering calculation interactive page.
[0088] The memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory may include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0089] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0090] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0091] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0092] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0093] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0094] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0095] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0096] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0097] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0098] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.
[0099] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. A path processing method based on an online engineering calculation interactive page, characterized in that: The following steps are involved: Acquire an online processing request generated through an online engineering calculation interactive page, wherein the online processing request includes processing parameters and a first relative path, the first relative path includes a target relative path, and a second relative path corresponding to a resource of a target engineering project displayed on the online engineering calculation interactive page; If the first relative path does not have a corresponding relative file path in the directory of the target project, performing path formatting processing on the relative directory path corresponding to the second relative path according to the first relative path to obtain a target relative file path of the target relative path under the relative directory path corresponding to the second relative path; The processing result obtained based on the processing parameters is stored in the location pointed to by the target relative file path.
2. The method according to claim 1, characterized in that The first relative path is a relative path relative to the base directory path; The method of determining whether the first relative path has a corresponding file path in the directory of the target engineering project includes: Determine a first reference directory path corresponding to the online engineering calculation interactive page according to a preset configuration file; Convert the first relative path into a file path format according to the first reference directory path to obtain a target absolute file path corresponding to the first relative path; Perform a path existence check on the target absolute file path, and output a path existence check result of the target absolute file path.
3. The method according to claim 2, characterized in that The converting the first relative path into a directory format according to the first reference directory information to obtain an absolute file path corresponding to the first relative path includes: Acquiring environmental variable information for managing the target engineering project; If the environment variable information indicates that the path format of the first relative path does not match the configuration environment of the target engineering project, the first relative path is converted into a format according to the configuration environment to obtain a third relative path, wherein the path format of the third relative path is the same as the path format of the path in the directory of the target engineering project; The first reference directory information and the third relative path are subjected to file path concatenation processing to obtain the target absolute file path.
4. The method according to claim 1, characterized in that: After storing the processing result, the method further includes: Generate a first web page file according to the first relative path, wherein the first web page file corresponds to the online engineering calculation interactive page; Return response processing is performed according to the first web page file, so that the terminal that sends the online processing request renders and displays the online engineering calculation interactive page according to the first web page file, obtains the processing result according to the first relative path, and updates the processing result and displays it in the online engineering calculation interactive page.
5. The method according to claim 4, characterized in that After performing return response processing according to the first webpage file, the method further includes: Acquire a copy request generated through the target online engineering calculation interactive page, wherein the copy request includes the second relative path and the target transfer relative path; If the copy request indicates that the resources under the relative directory path corresponding to the target transfer relative path are transferred to the relative directory path corresponding to the second relative path, then if the target transfer relative path exists, the resources under the relative directory path corresponding to the target transfer relative path are copied and written to the relative directory path corresponding to the second relative path; Generate a second web page file according to the second relative path, wherein the second web page file corresponds to the online engineering calculation interactive page, and the second web page file includes multiple relative paths at a level below the second relative path; Perform return response processing according to the second web page file, so that the terminal renders and displays the online engineering calculation interactive page according to the second web page file, obtains the processing result according to the first relative path, obtains the current resource under the relative directory path corresponding to the second relative path according to the second relative path, and displays the processing result and the current resource under the relative directory path corresponding to the second relative path in the online engineering calculation interactive page at the same time.
6. The method according to claim 5, characterized in that After obtaining the copy request, the method further includes: If the copy request indicates that the resource under the relative directory path corresponding to the second relative path is transferred to the relative directory path corresponding to the target transfer relative path, and if the target transfer relative path does not exist, the target transfer relative path is formatted with a relative directory path to obtain a transfer relative directory path of the target transfer relative path; In the directory of the target project, the resources under the relative directory path corresponding to the second relative path are copied and written to the location pointed to by the transfer relative directory path.
7. The method according to claim 2, characterized in that After storing the processing result, the method further includes: Acquire a second reference directory path for the second relative path according to the target relative file path; Generate a third web page file according to the target relative path, wherein the third web page file corresponds to a target online engineering calculation interaction page, the target online engineering calculation interaction page is a jump page of the online engineering calculation interaction page that generates the online processing request, and the third web page file is associated with the second base directory path; Return response processing is performed according to the third web page file, so that the terminal that sends the online processing request renders and displays the target online engineering calculation interactive page according to the third web page file, obtains the processing result according to the target relative file path, and displays the processing result in the target online engineering calculation interactive page.
8. A path processing device based on online engineering calculation, characterized in that: include: An online processing request acquisition module, used to acquire an online processing request generated through an online engineering calculation interactive page, wherein the online processing request includes processing parameters and a first relative path, the first relative path includes a target relative path, and a second relative path corresponding to a resource of a target engineering project displayed on the online engineering calculation interactive page; A path formatting processing module is used for, if the first relative path does not have a corresponding relative file path in the directory of the target engineering project, performing path formatting processing on the relative directory path corresponding to the second relative path according to the first relative path, so as to obtain a target relative file path of the target relative path under the relative directory path corresponding to the second relative path; The processing result storage module is used to store the processing result obtained based on the processing parameters in the directory location pointed to by the target relative file path.
9. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the path processing method based on the online engineering calculation interactive page as described in any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the path processing method based on an online engineering calculation interactive page according to any one of claims 1 to 7 is implemented.