Data loading method and device, computer equipment, storage medium and program product
By displaying the indication information in the hidden column, the stress pack workbook is automatically opened and the node number is generated, which solves the problem of low efficiency in pipeline stress screening and summary in the liquefied natural gas module, and realizes batch loading of different brackets and different working conditions in the SACS model Fast and efficient handling of loads.
Patent Information
- Application Number
- CN202411327164.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-23
- Publication Date
- 2024-12-31
AI Technical Summary
In the LNG module, the stress screening and summary process of pipeline brackets is time-consuming and error-prone, especially when loading the bracket reaction force one by one in the SACS model, it has low efficiency and high error rate.
By displaying the instructions in the hidden column, the workbook corresponding to the stress pack is automatically opened, the bracket number name is read and the node number in the marine structure calculation model is generated, the load of the pipeline node is batched, and the input text format that conforms to the SACS model is generated is generated. .
It realizes fast and efficient batch loading of different brackets and different working conditions, reduces time consumption and error rate in manual operations, and improves data loading efficiency.
Smart Images

Figure CN119227654A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a data loading method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art
[0002] With the increasing development of the international and domestic natural gas industry, process modules for liquefaction or processing of NG (Natural Gas) or LNG (Liquid Natural Gas) have also been widely used. The process module involves the collaboration of multiple disciplines such as pipelines, safety, equipment, and structures. Among them, the pipeline support and its auxiliary support structure are the structures that support various pipelines in the module. It involves pipeline and structural disciplines and belongs to the field of cross-disciplinary interaction. Usually, the structural discipline will perform structural design and strength verification based on the support position and various working loads provided by the pipeline discipline.
[0003] In traditional technology, multiple Excel workbooks are interactively used to manually find specific values in each Excel, search for related series based on specific values, and summarize certain specific values that meet the characteristics in various Excel tables into a single Excel table according to a certain rule. That is, the pipeline stress results of the pipeline support output by CAESAR (pipeline stress calculation) software are screened and summarized by manual methods, and loaded one by one into the SACS (marine engineering structure calculation) model.
[0004] However, due to the large number of pipe supports in the LNG module, it takes a lot of time and is prone to errors when screening and summarizing the stresses and loading the pipeline stresses of the SACS model into the pipe supports one by one in the form of support reaction forces. Summary of the invention
[0005] Based on this, it is necessary to provide a data loading method, device, computer equipment, computer-readable storage medium and computer program product that can batch load different supports and loads of different working conditions in the SACS model, and can significantly improve the loading efficiency and reduce the error rate in response to the above technical problems.
[0006] In a first aspect, the present application provides a data loading method, comprising:
[0007] Displaying a hidden column in the current worksheet; wherein the hidden column pre-stores indication information, the indication information comprising: the row number where the pipeline node is located in the first designated column of the workbook corresponding to the stress package;
[0008] Determine the first workbook to be opened according to the stress package name stored in the second designated column of the first target worksheet; wherein the first workbook is the workbook corresponding to the stress package;
[0009] The first workbook opened is used as the current workbook, and the bracket number name in the first designated column of the current workbook is read;
[0010] Generate a node number in the offshore structure calculation model according to the read bracket number name, and store the node number in the third designated column of the first target worksheet;
[0011] Enter the node numbers in the third designated column of the first target worksheet into the corresponding cells in the third designated column of the second target worksheet respectively;
[0012] Reading the indication information in the hidden column of the current worksheet, and inputting the loads of the pipeline nodes in various directions into the corresponding positions of the second target worksheet according to the indication information;
[0013] According to the second target worksheet, a target text conforming to the input text format of the offshore structure calculation model is generated, wherein the target text includes: pipeline nodes, loads in various directions of the nodes, and operating condition numbers.
[0014] In one embodiment, before displaying the hidden columns in the current worksheet, the method further includes:
[0015] Set the parameters used in the data loading process and the parameter types, where the parameters include: file name, number of brackets, address of workbook, and the parameter types include: string, long value, workbook, and worksheet.
[0016] In one embodiment, before displaying the hidden columns in the current worksheet, the method further includes:
[0017] Set the parameters used in the data loading process and the parameter types, where the parameters include: file name, number of brackets, address of workbook, and the parameter types include: string, long value, workbook, and worksheet.
[0018] In one embodiment, determining the first workbook to be opened according to the stress package name stored in the second designated column of the first target worksheet includes:
[0019] According to the number of brackets read in the first target worksheet, determine N rows of data corresponding to the number of brackets in the second designated column of the first target worksheet; wherein each row of data corresponds to a stress package name, and the value of N is equal to the number of brackets;
[0020] Traverse and read the stress package names stored in N rows of data;
[0021] The workbook corresponding to the stress package name is used as the first workbook to be opened.
[0022] In one embodiment, inputting the node numbers in the third designated column of the first target worksheet into corresponding cells in the third designated column of the second target worksheet includes:
[0023] According to the number of working conditions under the support, determine M rows of data corresponding to the number of working conditions in the third designated column of the first target worksheet; wherein each row of data corresponds to a node number, and the value of M is equal to the number of working conditions under the corresponding support;
[0024] Traverse and read the node numbers stored in M rows of data;
[0025] Enter the M node numbers into the corresponding cells in the third designated column of the second target worksheet.
[0026] In one embodiment, generating a target text conforming to the input text format of the offshore structure calculation model according to the second target worksheet includes:
[0027] Through the text function and typesetting function of Excel, target texts that conform to the input text format of the offshore structure calculation model are automatically generated in batches according to the node numbers in the second target worksheet and the loads in various directions of the pipeline nodes.
[0028] In one embodiment, after generating the target text conforming to the input text format of the offshore structure calculation model according to the second target worksheet, the method further comprises:
[0029] Close all workbooks except the current workbook, and hide hidden columns in the current worksheet.
[0030] In a second aspect, the present application further provides a data loading device, comprising:
[0031] A display module is used to display a hidden column in the current worksheet; wherein the hidden column is pre-stored with indication information, and the indication information includes: the row number where the pipeline node is located in the first designated column of the workbook corresponding to the stress package;
[0032] A determination module, used to determine a first workbook to be opened according to the name of the stress package stored in the second designated column of the first target worksheet; wherein the first workbook is a workbook corresponding to the stress package;
[0033] A reading module, used for taking the first workbook after opening as the current workbook, and reading the bracket number name in the first designated column of the current workbook;
[0034] A storage module, used for generating a node number in the offshore structure calculation model according to the read bracket number name, and storing the node number in the third designated column of the first target worksheet;
[0035] A first input module, used for inputting the node numbers in the third designated column of the first target worksheet into corresponding cells in the third designated column of the second target worksheet;
[0036] A second input module is used to read the indication information in the hidden column of the current worksheet, and input the loads of the pipeline nodes in various directions into the corresponding positions of the second target worksheet according to the indication information;
[0037] The target text generation module is used to generate a target text that conforms to the input text format of the offshore structure calculation model according to the second target worksheet, wherein the target text includes: pipeline nodes, loads in various directions of the nodes, and working condition numbers.
[0038] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0039] Displaying a hidden column in the current worksheet; wherein the hidden column pre-stores indication information, the indication information comprising: the row number where the pipeline node is located in the first designated column of the workbook corresponding to the stress package;
[0040] Determine the first workbook to be opened according to the stress package name stored in the second designated column of the first target worksheet; wherein the first workbook is the workbook corresponding to the stress package;
[0041] The first workbook opened is used as the current workbook, and the bracket number name in the first designated column of the current workbook is read;
[0042] Generate a node number in the offshore structure calculation model according to the read bracket number name, and store the node number in the third designated column of the first target worksheet;
[0043] Enter the node numbers in the third designated column of the first target worksheet into the corresponding cells in the third designated column of the second target worksheet respectively;
[0044] Reading the indication information in the hidden column of the current worksheet, and inputting the loads of the pipeline nodes in various directions into the corresponding positions of the second target worksheet according to the indication information;
[0045] According to the second target worksheet, a target text conforming to the input text format of the offshore structure calculation model is generated, wherein the target text includes: pipeline nodes, loads in various directions of the nodes, and operating condition numbers.
[0046] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0047] Displaying a hidden column in the current worksheet; wherein the hidden column pre-stores indication information, the indication information comprising: the row number where the pipeline node is located in the first designated column of the workbook corresponding to the stress package;
[0048] Determine the first workbook to be opened according to the stress package name stored in the second designated column of the first target worksheet; wherein the first workbook is the workbook corresponding to the stress package;
[0049] The first workbook opened is used as the current workbook, and the bracket number name in the first designated column of the current workbook is read;
[0050] Generate a node number in the offshore structure calculation model according to the read bracket number name, and store the node number in the third designated column of the first target worksheet;
[0051] Enter the node numbers in the third designated column of the first target worksheet into the corresponding cells in the third designated column of the second target worksheet respectively;
[0052] Reading the indication information in the hidden column of the current worksheet, and inputting the loads of the pipeline nodes in various directions into the corresponding positions of the second target worksheet according to the indication information;
[0053] According to the second target worksheet, a target text conforming to the input text format of the offshore structure calculation model is generated, wherein the target text includes: pipeline nodes, loads in various directions of the nodes, and operating condition numbers.
[0054] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0055] Displaying a hidden column in the current worksheet; wherein the hidden column pre-stores indication information, the indication information comprising: the row number where the pipeline node is located in the first designated column of the workbook corresponding to the stress package;
[0056] Determine the first workbook to be opened according to the stress package name stored in the second designated column of the first target worksheet; wherein the first workbook is the workbook corresponding to the stress package;
[0057] The first workbook opened is used as the current workbook, and the bracket number name in the first designated column of the current workbook is read;
[0058] Generate a node number in the offshore structure calculation model according to the read bracket number name, and store the node number in the third designated column of the first target worksheet;
[0059] Enter the node numbers in the third designated column of the first target worksheet into the corresponding cells in the third designated column of the second target worksheet respectively;
[0060] Reading the indication information in the hidden column of the current worksheet, and inputting the loads of the pipeline nodes in various directions into the corresponding positions of the second target worksheet according to the indication information;
[0061] According to the second target worksheet, a target text conforming to the input text format of the offshore structure calculation model is generated, wherein the target text includes: pipeline nodes, loads in various directions of the nodes, and operating condition numbers.
[0062] The above-mentioned data loading method, device, computer equipment, computer-readable storage medium and computer program product display the hidden columns in the current worksheet; wherein the hidden columns are pre-stored with indication information, and the indication information includes: the row number where the pipeline node is located in the first designated column of the workbook corresponding to the stress package; thereby the information of the hidden columns in the worksheet can be obtained. According to the stress package name stored in the second designated column of the first target worksheet, the first workbook to be opened is determined; wherein the first workbook is the workbook corresponding to the stress package; thereby the workbooks corresponding to each stress package can be accurately opened, so that data extraction operations can be performed on each workbook later. The first workbook after opening is used as the current workbook, and the bracket number name in the first designated column of the current workbook is read; thereby the bracket number name stored in the workbook corresponding to each stress package can be obtained, so that the corresponding node number can be read later according to the bracket number name. Generate the node number in the offshore structure calculation model according to the read bracket number name, and store the node number in the third designated column of the first target worksheet; input the node numbers in the third designated column of the first target worksheet into the corresponding cells in the third designated column of the second target worksheet respectively; thereby, the node numbers corresponding to the bracket names can be added to the corresponding positions in the second target worksheet respectively, so as to facilitate the subsequent processing of the data in the second worksheet. Read the indication information in the hidden column of the current worksheet, and input the loads of the pipeline nodes in various directions into the corresponding positions of the second target worksheet according to the indication information; thereby, the loads of the pipeline nodes in various directions can be automatically added to the second target worksheet according to the indication information in the hidden column. According to the second target worksheet, generate a target text that conforms to the input text format of the offshore structure calculation model, wherein the target text includes: pipeline node, loads in various directions of the node, and working condition number. Therefore, when using the original pipeline stress output file of CAESAR, the corresponding pipeline support pipeline stress can be quickly and efficiently extracted and summarized, and output in the SACS model load input text format, realizing batch loading of load inputs of different supports and different working conditions in the SACS model, solving the shortcomings of manual extraction and summary of pipeline stress and loading them into the SACS model one by one, which is time-consuming and error-prone. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0064] Figure 1An application environment diagram of a data loading method in an embodiment;
[0065] Figure 2 A schematic diagram of a data loading method in one embodiment;
[0066] Figure 3 is a flow chart of a data loading method in another embodiment;
[0067] Figure 4 is a flowchart of a data loading method in yet another embodiment;
[0068] Figure 5 is a flow chart of a data loading method in a fourth embodiment;
[0069] Figure 6 is a structural block diagram of a data loading device in one embodiment;
[0070] Figure 7 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0071] 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.
[0072] The data loading method provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. For example, the workbooks corresponding to multiple stress packages to be processed can be stored on the server 104 (if the terminal 102 itself has a large storage capacity, part of the data to be processed can also be stored in the terminal 102). Specifically, the terminal 102 side inputs the user's operation instructions through various input devices to start the data loading process, and first displays the hidden columns in the current worksheet; wherein the hidden column pre-stores indication information, and the indication information includes: the row number where the pipeline node is located in the first designated column of the workbook corresponding to the stress package; according to the stress package name stored in the second designated column of the first target worksheet, determine the first workbook to be opened; wherein the first workbook is the workbook corresponding to the stress package; use the opened first workbook as the current workbook, read the bracket number name in the first designated column of the current workbook; according to the read bracket number name Generate the node number in the offshore structure calculation model, and store the node number in the third designated column of the first target worksheet; input the node numbers in the third designated column of the first target worksheet into the corresponding cells in the third designated column of the second target worksheet; read the indication information in the hidden column of the current worksheet, and input the loads of the pipeline nodes in various directions into the corresponding positions of the second target worksheet according to the indication information; generate a target text that conforms to the input text format of the offshore structure calculation model according to the second target worksheet, wherein the target text includes: pipeline node, loads in various directions of the node, and working condition number. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, etc. The server 104 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.
[0073] In an exemplary embodiment, Figure 2 As shown, a data loading method is provided, which is applied to Figure 1 The terminal in is taken as an example to illustrate, including the following steps 201 to 206. Among them:
[0074] Step 201, display the hidden columns in the current worksheet.
[0075] The hidden column stores indication information in advance, and the indication information includes: the row number of the pipeline node in the first designated column of the workbook corresponding to the stress package. The first designated column may be a pre-set column, such as column A in the worksheet.
[0076] In this embodiment, the hidden columns in the current worksheet must first be unhidden, so that the stored indication information can be obtained from the hidden columns later. Hidden columns are a built-in function in Excel. When creating a worksheet, one or more columns can be set as hidden columns, that is, when the worksheet is opened, the hidden columns are not displayed.
[0077] For example, taking Excel as an example, VBA (Visual Basic Application) can be used for secondary development. Specifically, the parameter of the current Excel worksheet can be set to "owk", the parameter of the cell in the current worksheet can be set to "orng", the parameter type of "orng" can be defined as a cell, and the "E" column in "owk" (the currently activated worksheet) is assigned to "orng", and the hidden property of the column is set to No. In this way, the "E" column in the current worksheet that is hidden can be unhidden.
[0078] Step 202: Determine the first workbook to be opened according to the stress package name stored in the second designated column of the first target worksheet.
[0079] The first workbook is the workbook corresponding to the stress package. The stress package means that when calculating pipeline stress, various working conditions will be loaded, and these working conditions will be extracted and summarized according to different nodes to form a summary table, which will be output by CAESAR in the form of Excel.
[0080] In this embodiment, the first target worksheet can read the number of brackets and the file address from the worksheet "SPSinput", where the number of brackets is used to determine which rows of data in the second specified column of the first target worksheet are read. The file address is used to indicate which address path to open the first workbook from. For example, after knowing the name of the stress package, the corresponding file address can be found according to the stress package name, so as to facilitate the subsequent opening of the workbook corresponding to the stress package name.
[0081] Exemplarily, based on the number of brackets read in the first target worksheet, determine N rows of data corresponding to the number of brackets in the second designated column of the first target worksheet; wherein each row of data corresponds to a stress package name, and the value of N is equal to the number of brackets; traverse and read the stress package names stored in the N rows of data; and take the workbook corresponding to the stress package name as the first workbook that needs to be opened.
[0082] In this embodiment, a loop statement may be used to read N rows of data in sequence, and each time a stress package name in a corresponding row number is read, the workbook corresponding to the stress package name is used as the first workbook to be opened.
[0083] Step 203, taking the first workbook opened as the current workbook, and reading the bracket number name in the first designated column of the current workbook.
[0084] In this embodiment, the first designated column may be a preset column in the workbook, such as column A, or other columns. A bracket number name is pre-stored in the first designated column. The bracket number name is used to generate a node number corresponding to the bracket number name in subsequent steps.
[0085] Step 204: Generate a node number in the offshore structure calculation model according to the read bracket number name, and store the node number in the third designated column of the first target worksheet.
[0086] In this embodiment, after the bracket number name is read, the node number (Joint number) in the SACS model can be generated according to the corresponding bracket. In order to facilitate subsequent processing of the node number, the generated node number is input into the third designated column of the first target worksheet. The third designated column can be a preset column in the first target worksheet, such as column B, or other columns.
[0087] Step 205: input the node numbers in the third designated column of the first target worksheet into corresponding cells in the third designated column of the second target worksheet respectively.
[0088] In this embodiment, a loop can be used to traverse and read the node numbers in the third designated column of the first target worksheet, and then the read node numbers are respectively input into the corresponding cells in the third designated column of the second target worksheet. Wherein, each bracket corresponds to multiple working conditions, and according to the number of working conditions, several rows of data corresponding to the number of working conditions in the third designated column of the first target worksheet are determined, and the read data are respectively input into the corresponding cells in the third designated column of the second target worksheet. Wherein, these cells can be continuous or discretely distributed.
[0089] Exemplarily, based on the number of operating conditions under the bracket, determine M rows of data corresponding to the number of operating conditions in the third designated column of the first target worksheet; wherein each row of data corresponds to a node number, and the value of M is equal to the number of operating conditions under the corresponding bracket; traverse and read the node numbers stored in the M rows of data; and input the M node numbers into the corresponding cells in the third designated column of the second target worksheet, respectively.
[0090] In this embodiment, a loop statement may be used to read M rows of data in sequence, and each time a node number in a corresponding row number is read, the node number is input into a corresponding cell in the third designated column of the second target worksheet.
[0091] Step 206, reading the indication information in the hidden column of the current worksheet, and inputting the loads of the pipeline nodes in various directions into the corresponding positions of the second target worksheet according to the indication information.
[0092] In this embodiment, the row number of the pipeline node in the first designated column of the workbook corresponding to the stress package is stored in the hidden column of the current worksheet, so the pipeline node can be read according to the row number. The load of each direction (for example: X, Y, Z direction) of the pipeline node is automatically generated and input into the corresponding position of the second target worksheet. Among them, load refers to a general term for various forces loaded on the structure.
[0093] Step 207: Generate a target text that complies with the input text format of the offshore structure calculation model according to the second target worksheet.
[0094] The target text includes: pipeline nodes, loads in various directions of nodes, and operating condition numbers.
[0095] In this embodiment, the text function and typesetting function of Excel can be used to automatically generate target texts in batches that conform to the input text format of the offshore structure calculation model according to the node numbers in the second target worksheet and the loads in various directions of the pipeline nodes.
[0096] In the above data loading method, the hidden columns in the current worksheet are displayed; wherein the hidden columns are pre-stored with indication information, and the indication information includes: the row number of the pipeline node in the first designated column of the workbook corresponding to the stress package; thereby the information of the hidden columns in the worksheet can be obtained. According to the stress package name stored in the second designated column of the first target worksheet, the first workbook to be opened is determined; wherein the first workbook is the workbook corresponding to the stress package; thereby the workbooks corresponding to each stress package can be accurately opened, so that data extraction operations can be performed on each workbook later. The opened first workbook is used as the current workbook, and the bracket number name in the first designated column of the current workbook is read; thereby the bracket number name stored in the workbook corresponding to each stress package can be obtained, so that the corresponding node number can be read later according to the bracket number name. Generate the node number in the offshore structure calculation model according to the read bracket number name, and store the node number in the third designated column of the first target worksheet; input the node numbers in the third designated column of the first target worksheet into the corresponding cells in the third designated column of the second target worksheet respectively; thereby, the node numbers corresponding to the bracket names can be added to the corresponding positions in the second target worksheet respectively, so as to facilitate the subsequent processing of the data in the second worksheet. Read the indication information in the hidden column of the current worksheet, and input the loads of the pipeline nodes in various directions into the corresponding positions of the second target worksheet according to the indication information; thereby, the loads of the pipeline nodes in various directions can be automatically added to the second target worksheet according to the indication information in the hidden column. According to the second target worksheet, generate a target text that conforms to the input text format of the offshore structure calculation model, wherein the target text includes: pipeline node, loads in various directions of the node, and working condition number. Therefore, when using the original pipeline stress output file of CAESAR, the corresponding pipeline support pipeline stress can be quickly and efficiently extracted and summarized, and output in the SACS model load input text format, realizing batch loading of load inputs of different supports and different working conditions in the SACS model, solving the shortcomings of manual extraction and summary of pipeline stress and loading them into the SACS model one by one, which is time-consuming and error-prone.
[0097] In another exemplary embodiment, Figure 3 As shown, a data loading method is provided, which is applied to Figure 1 The terminal in is taken as an example to illustrate, including the following steps 301 to 308. Among them:
[0098] Step 301, setting the parameters used in the data loading process and the parameter types.
[0099] The parameters include: file name, number of brackets, address of workbook, and the types of parameters include: string, long value, workbook, worksheet.
[0100] In this embodiment, because workbooks, worksheets, and data in workbooks and worksheets are involved, when the compiler executes the above steps 201 to 207, it is necessary to set the parameters in the data loading process and the parameter types. This facilitates reading or inputting workbooks, worksheets, and data in workbooks and worksheets.
[0101] Step 302, display the hidden columns in the current worksheet.
[0102] Step 303: Determine the first workbook to be opened according to the stress package name stored in the second designated column of the first target worksheet.
[0103] Step 304, taking the first workbook opened as the current workbook, and reading the bracket number name in the first designated column of the current workbook.
[0104] Step 305: Generate a node number in the offshore structure calculation model according to the read bracket number name, and store the node number in the third designated column of the first target worksheet.
[0105] Step 306: input the node numbers in the third designated column of the first target worksheet into corresponding cells in the third designated column of the second target worksheet.
[0106] Step 307, reading the indication information in the hidden column of the current worksheet, and inputting the loads of the pipeline nodes in various directions into the corresponding positions of the second target worksheet according to the indication information.
[0107] Step 308: Generate a target text that complies with the input text format of the offshore structure calculation model according to the second target worksheet.
[0108] In this embodiment, the specific implementation process and technical effects of steps 302 to 308 are shown in Figure 2 The descriptions of steps 201 to 207 in the illustrated method embodiment are not repeated here.
[0109] In yet another exemplary embodiment, Figure 4 As shown, a data loading method is provided, which is applied to Figure 1 The terminal in is taken as an example to illustrate, including the following steps 401 to 408. Among them:
[0110] Step 401, display the hidden columns in the current worksheet.
[0111] Step 402: Determine the first workbook to be opened according to the stress package name stored in the second designated column of the first target worksheet.
[0112] Step 403, taking the first workbook opened as the current workbook, and reading the bracket number name in the first designated column of the current workbook.
[0113] Step 404: Generate a node number in the offshore structure calculation model according to the read bracket number name, and store the node number in the third designated column of the first target worksheet.
[0114] Step 405: input the node numbers in the third designated column of the first target worksheet into the corresponding cells in the third designated column of the second target worksheet respectively.
[0115] Step 406, reading the indication information in the hidden column of the current worksheet, and inputting the loads of the pipeline nodes in various directions into the corresponding positions of the second target worksheet according to the indication information.
[0116] Step 407: Generate a target text that complies with the input text format of the offshore structure calculation model according to the second target worksheet.
[0117] In this embodiment, the specific implementation process and technical effects of steps 401 to 407 are shown in Figure 2 The descriptions of steps 201 to 207 in the illustrated method embodiment are not repeated here.
[0118] Step 408, close other workbooks except the current workbook, and hide the hidden columns in the current worksheet.
[0119] In this embodiment, since multiple workbooks may be opened during the data loading process, after the target text is generated, other workbooks except the current workbook are closed. Exemplarily, when closing these workbooks, it is possible to choose not to save these open workbooks. Exemplarily, after the target text is generated, the hidden columns displayed in the current worksheet can also be restored to a hidden state.
[0120] For example, taking Excel as an example, VBA (Visual Basic Application) can be used for secondary development. Specifically, the parameter of the current Excel worksheet can be set to "owk", the parameter of the cell in the current worksheet can be set to "orng", the "orng" parameter type can be defined as a cell, and the "E" column in "owk" (the currently activated worksheet) is assigned to "orng", and the hidden property of the column is set to true. In this way, the "E" column in the current worksheet can be hidden again.
[0121] In a fourth exemplary embodiment, as Figure 5 As shown, a data loading method is provided, which is applied to Figure 1For example, the terminal in Figure 2~Figure 4 The steps in the method embodiment are integrated, and secondary development is performed using Excel's VBA to implement the functions of the main program and the subroutine.
[0122] Exemplarily, in the main program part, first set the main program global parameter type to display the hidden column (column E), where in column E, use the Excel intrinsic function "Match" to obtain the row number of the corresponding "Node" (pipeline node) in column A of the workbook of the corresponding stress package; read the number of brackets and the file address from the worksheet "SPSinput".
[0123] Furthermore, the loop part of the main program may include the following steps:
[0124] Step S1.1: Start with the number of stents as the number of cycles, set the cycle count t, and the initial value of t is 1.
[0125] Step S1.2: Let the cumulative value of the working condition j = 1 + 17 * (t-1); let the number of brackets count s = 1 + s.
[0126] Step S1.3: According to the current number of cycles, read the workbook named "CAL-XXX.xlsx" of the stress package corresponding to the row number in column C, and open the workbook.
[0127] Step S1.4: Set "VBAtest.xlsm" as the current workbook, and read the bracket number name in column A, and automatically generate the corresponding "Joint" number (node number) in column B based on the bracket number name.
[0128] Step S1.5: After reading the data in column E, execute the subroutine part.
[0129] Step S1.6: Determine whether t is less than the preset number of cycles Count. If so (Yes), execute step S1.7; if not (No), execute step S1.8.
[0130] Step S1.7: Increment t by 1 and then return to step 2.
[0131] Step S1.8: Close all workbooks except the current workbook.
[0132] Step S1.9: Hide column E in the worksheet "SPSinput".
[0133] In this embodiment, the loop operation is performed with the number of brackets as the number of loops. "t" is a parameter for counting loops, and its value is the number of loops performed; "j" is used to count the number of loads that have been loaded in the loop, and is used to put the loads obtained from different workbooks into the corresponding cells. By default, a bracket node has 17 loads, so its value is "1 + 17* (t - 1)", and this parameter will also be used in the subroutine "GetValues1"; "s" is a parameter for putting the node (joint) number into the corresponding cell, which will be used in the subroutine "GetValues1" to read the value of the cell in the row corresponding to its value, that is, the corresponding "joint" number. The file name is used to read and store the name of the stress package corresponding to the pipe support; for example, "Workbooks.Open Root1 & FileName", this code is used to open the workbook corresponding to the stress package name stored in FileName (file name), and this operation is performed to enable EXCEL to smoothly link the workbook address so as to read and call the content in the target workbook.
[0134] For example, regarding the subroutine part (GetValues1), first set the local parameters (set the parameter types involved in the subroutine, see Figure 3 (see the relevant description of step 301 in the illustrated embodiment).
[0135] Furthermore, the loop part of the subroutine may include the following steps:
[0136] Step S1.5.1: Take the number of working conditions as the number of cycles, set the cycle statistic value i, and the initial value of i is 1.
[0137] Step S1.5.2: Let the local condition cumulative value jj=1+jj.
[0138] Step S1.5.3: Enter the “Joint” number from column B of the worksheet “SPSinput” into the corresponding position in column B of the worksheet “SACSinput”.
[0139] Step S1.5.4: Input the loads in the X, Y, and Z directions of the corresponding "Node" in the corresponding stress package of the bracket into the corresponding positions of the worksheet "SACS Input" in the workbook "VABtest".
[0140] Step S1.5.5: Determine whether i is less than the number of operating conditions. If so, execute step S1.5.6; if not, continue to execute step S1.6.
[0141] Step S1.5.6: Increment i by 1 and return to execute step S1.5.2.
[0142] In this embodiment, the function of the subroutine part is to receive various parameters passed from the main program (such as the E column data containing pipeline node indication information), and respectively assign the corresponding "joint" number and pipeline stress to the corresponding cells. Set a loop statement with a loop count of 17 times, which corresponds to the 17 working conditions used by the pipeline professional to calculate pipeline stress. The number of loops can be changed according to the specific number of working conditions. In the loop statement, it is achieved: the "Joint" number in the B column of the worksheet "SPSinput" is placed in the corresponding cell in the B column of the worksheet "SACS input" in sequence; the corresponding load is extracted from the corresponding stress package workbook, the names of these workbooks are recorded in the C column of the worksheet "SPSinput", and are placed in the E, F, and G columns of the worksheet "SACS input" in sequence (it can also be other columns, which can be flexibly set according to needs).
[0143] Exemplarily, after executing step S1.5.3 or step S1.5.4, the method further includes:
[0144] Using Excel's inherent text functions and typesetting features, generate text formats recognizable by the SACS input document in columns K and M of the "SACS Input" worksheet, and accept the "Joint" number and load passed by the VBA program to automatically generate loads and Amod text that can be used for SACS input.
[0145] In this embodiment, the text function provided by Excel can be used to combine the node number, working condition number, load and other inputs into text, and automatically generate texts in batches that comply with the SACS input text format.
[0146] In this embodiment, when using the original pipeline stress output file of CAESAR, the pipeline stress of the corresponding pipeline support can be extracted and summarized quickly, efficiently and automatically; and it can be output in the corresponding text format of the SACS model load input, so as to realize batch loading of load inputs of different supports and different working conditions in the SACS model, and solve the shortcomings of manual extraction and summary of pipeline stress and loading them into the SACS model one by one, which is time-consuming and error-prone. Exemplarily, through statistical estimation, the time saved by using the method in this embodiment will increase accordingly with the increase in the number of supports. In terms of structural specialty, if it is assumed that the number of supports to be processed is 160, under the existing technology, one support is processed in 10 minutes, a total of 26 hours, while using the method in this embodiment, it can be completed in about 3 hours, thereby saving nearly 90% of the time.
[0147] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0148] Based on the same inventive concept, the embodiment of the present application also provides a data loading device for implementing the data loading method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more data loading device embodiments provided below can refer to the limitations on the data loading method above, and will not be repeated here.
[0149] In an exemplary embodiment, Figure 6 As shown, a data loading device is provided, including: a display module 601, a determination module 602, a reading module 603, a storage module 604, a first input module 605, a second input module 606 and a target text generation module 607, wherein:
[0150] Display module 601, used to display hidden columns in the current worksheet; wherein the hidden columns are pre-stored with indication information, the indication information including: the row number where the pipeline node is located in the first designated column of the workbook corresponding to the stress package;
[0151] A determination module 602 is used to determine a first workbook to be opened according to the name of the stress package stored in the second designated column of the first target worksheet; wherein the first workbook is a workbook corresponding to the stress package;
[0152] The reading module 603 is used to use the first workbook after opening as the current workbook, and read the bracket number name in the first designated column of the current workbook;
[0153] The storage module 604 is used to generate a node number in the offshore structure calculation model according to the read bracket number name, and store the node number in the third designated column of the first target worksheet;
[0154] A first input module 605, for inputting the node numbers in the third designated column of the first target worksheet into corresponding cells in the third designated column of the second target worksheet;
[0155] The second input module 606 is used to read the indication information in the hidden column of the current worksheet, and input the loads of the pipeline nodes in various directions to the corresponding positions of the second target worksheet according to the indication information;
[0156] The target text generation module 607 is used to generate a target text that conforms to the input text format of the offshore structure calculation model according to the second target worksheet, wherein the target text includes: pipeline nodes, loads in various directions of the nodes, and working condition numbers.
[0157] Exemplarily, the above-mentioned device may also include: a setting module 608, wherein the setting module 608 is used to set the parameters used in the data loading process, and the types of parameters, wherein the parameters include: file name, number of brackets, address of the workbook, and the types of parameters include: string, long value, workbook, worksheet.
[0158] Exemplarily, the determination module 602 is specifically used to: determine N rows of data corresponding to the number of brackets read in the first target worksheet according to the number of brackets read in the first target worksheet; wherein each row of data corresponds to a stress package name, and the value of N is equal to the number of brackets; traverse and read the stress package names stored in the N rows of data; and use the workbook corresponding to the stress package name as the first workbook that needs to be opened.
[0159] Exemplarily, the first input module 605 is specifically used to: determine, according to the number of operating conditions under the bracket, M rows of data corresponding to the number of operating conditions in the third designated column of the first target worksheet; wherein each row of data corresponds to a node number, and the value of M is equal to the number of operating conditions under the corresponding bracket; traverse and read the node numbers stored in the M rows of data; and input the M node numbers into the corresponding cells in the third designated column of the second target worksheet, respectively.
[0160] Exemplarily, the target text generation module 607 is specifically used to: automatically batch generate target texts that conform to the input text format of the offshore structure calculation model according to the node numbers in the second target worksheet and the loads in various directions of the pipeline nodes through the text functions and typesetting functions of Excel.
[0161] Exemplarily, the above device may further include: a closing module 609, wherein the closing module 609 is used to close other workbooks except the current workbook and hide hidden columns in the current worksheet.
[0162] Each module in the above data loading device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0163] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 7 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (Near Field Communication, NFC) or other technologies. When the computer program is executed by the processor, a data loading method is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0164] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0165] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0166] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0167] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0168] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0169] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0170] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0171] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A data loading method, characterized in that: The method comprises: Displaying a hidden column in the current worksheet; wherein the hidden column pre-stores indication information, the indication information comprising: the row number where the pipeline node is located in the first designated column of the workbook corresponding to the stress package; Determine the first workbook to be opened according to the stress package name stored in the second designated column of the first target worksheet; wherein the first workbook is the workbook corresponding to the stress package; The first workbook opened is used as the current workbook, and the bracket number name in the first designated column of the current workbook is read; Generate a node number in the offshore structure calculation model according to the read bracket number name, and store the node number in the third designated column of the first target worksheet; Enter the node numbers in the third designated column of the first target worksheet into the corresponding cells in the third designated column of the second target worksheet respectively; Reading the indication information in the hidden column of the current worksheet, and inputting the loads of the pipeline nodes in various directions into the corresponding positions of the second target worksheet according to the indication information; According to the second target worksheet, a target text conforming to the input text format of the offshore structure calculation model is generated, wherein the target text includes: pipeline nodes, loads in various directions of the nodes, and operating condition numbers.
2. The method according to claim 1, characterized in that Before displaying the hidden columns in the current worksheet, the method further includes: Set the parameters used in the data loading process and the parameter types, where the parameters include: file name, number of brackets, address of workbook, and the parameter types include: string, long value, workbook, and worksheet.
3. The method according to claim 1, characterized in that The step of determining the first workbook to be opened according to the stress package name stored in the second designated column of the first target worksheet includes: According to the number of brackets read in the first target worksheet, determine N rows of data corresponding to the number of brackets in the second designated column of the first target worksheet; wherein each row of data corresponds to a stress package name, and the value of N is equal to the number of brackets; Traverse and read the stress package names stored in N rows of data; The workbook corresponding to the stress package name is used as the first workbook to be opened.
4. The method according to claim 1, characterized in that Entering the node numbers in the third designated column of the first target worksheet into corresponding cells in the third designated column of the second target worksheet, respectively, includes: According to the number of working conditions under the support, determine M rows of data corresponding to the number of working conditions in the third designated column of the first target worksheet; wherein each row of data corresponds to a node number, and the value of M is equal to the number of working conditions under the corresponding support; Traverse and read the node numbers stored in M rows of data; Enter the M node numbers into the corresponding cells in the third designated column of the second target worksheet.
5. The method according to claim 1, characterized in that Generating a target text conforming to the input text format of the offshore structure calculation model according to the second target worksheet includes: Through the text function and typesetting function of Excel, target texts that conform to the input text format of the offshore structure calculation model are automatically generated in batches according to the node numbers in the second target worksheet and the loads in various directions of the pipeline nodes.
6. The method according to any one of claims 1 to 5, characterized in that: After generating a target text conforming to the input text format of the offshore structure calculation model according to the second target worksheet, the method further includes: Close all workbooks except the current workbook, and hide hidden columns in the current worksheet.
7. A data loading device, characterized in that: The device comprises: A display module is used to display a hidden column in the current worksheet; wherein the hidden column is pre-stored with indication information, and the indication information includes: the row number where the pipeline node is located in the first designated column of the workbook corresponding to the stress package; A determination module, used to determine a first workbook to be opened according to the name of the stress package stored in the second designated column of the first target worksheet; wherein the first workbook is a workbook corresponding to the stress package; A reading module, used for taking the first workbook after opening as the current workbook, and reading the bracket number name in the first designated column of the current workbook; A storage module, used for generating a node number in the offshore structure calculation model according to the read bracket number name, and storing the node number in the third designated column of the first target worksheet; A first input module, used for inputting the node numbers in the third designated column of the first target worksheet into corresponding cells in the third designated column of the second target worksheet; A second input module is used to read the indication information in the hidden column of the current worksheet, and input the loads of the pipeline nodes in various directions into the corresponding positions of the second target worksheet according to the indication information; The target text generation module is used to generate a target text that conforms to the input text format of the offshore structure calculation model according to the second target worksheet, wherein the target text includes: pipeline nodes, loads in various directions of the nodes, and working condition numbers.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
