Server and client interaction method and apparatus, and electronic device

Through the interactive method between the server and the client, the ADAMS model file is processed, the target object array is generated and returned to the client, which solves the problem of insufficient model file management efficiency and security in the field of mechanical engineering simulation, and realizes efficient and secure model file management and display.

CN119645993APending Publication Date: 2025-03-18CHONGQING JINKANG NEW ENERGY VEHICLE CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411532944.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-30
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

The prior art lacks management efficiency and security of ADAMS model files in the field of mechanical engineering simulation, especially when project scale is expanded and model complexity increases.

Method used

Through the interaction method between the server and the client, the request message is received from the client, the files in the target model folder are parsed and processed, the target object array is generated and returned to the client, so as to realize the unified management and display of the model files.

Benefits of technology

It realizes unified management and maintenance of model files, ensures high data availability and disaster recovery capabilities, and improves management efficiency and security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119645993A_ABST
    Figure CN119645993A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an interaction method and device of a server and a client and electronic equipment, and the method comprises the steps: receiving a request message sent by the client, and the request message carries an uploaded target model folder; analyzing the request message to obtain a target file used for being transmitted between the client side and the server side in the target model folder; determining a suffix type of the target file; generating a target object array corresponding to the target file according to the suffix type; and returning the target object array to the client so as to display the target file at the client. Through the embodiment of the invention, the unified management and maintenance of the model file are realized, and the high availability and disaster recovery capability of the data are ensured, so that the management efficiency and security are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a method and device for interaction between a server and a client, and an electronic device. Background Art

[0002] In the existing field of mechanical engineering simulation, ADAMS (Automatic Dynamic Analysis of Mechanical Systems) software is a widely used tool for creating, analyzing and optimizing complex mechanical system models. However, for the management of ADAMS model files, most organizations or project teams still adopt the traditional decentralized management method. This management method usually relies on users to save the .cdb folder and its internal files (including .asy assembly files and variable parameter files) on a local computer or shared network drive. Although this method is simple and direct, as the project scale expands and the model complexity increases, its management efficiency and security gradually expose problems. Summary of the invention

[0003] In view of the above problems, a method and device for interaction between a server and a client, and an electronic device are proposed to overcome the above problems or at least partially solve the above problems, including:

[0004] A method for interaction between a server and a client, applied to the server, the method comprising:

[0005] Receive a request message sent by a client, wherein the request message carries an uploaded target model folder;

[0006] Parsing the request message to obtain a target file in the target model folder for transmission between the client and the server;

[0007] Determine the suffix type of the target file;

[0008] Generate a target object array corresponding to the target file according to the suffix type;

[0009] The target object array is returned to the client to display the target file on the client.

[0010] Optionally, generating a target object array corresponding to the target file according to the suffix type includes:

[0011] When the suffix type is .asy, converting the target file into an object array of list structure;

[0012] When the suffix type is not the .asy suffix type, the target file is converted into an object array of a tree structure.

[0013] Optionally, generating a target object array corresponding to the target file according to the suffix type includes:

[0014] Creating a target object for each target file according to the suffix type;

[0015] Add the target object to the target object array corresponding to the target file.

[0016] A method for interaction between a server and a client, applied to the client, the method comprising:

[0017] Obtaining a target model folder to be uploaded, and generating a request message carrying the target model folder, wherein the target model folder includes a target file for transmission between the client and the server;

[0018] Sending the request message to the server, so that the server parses the request message to obtain the target file, determines the suffix type of the target file, and generates a target object array corresponding to the target file according to the suffix type;

[0019] Receive the target object array returned by the server and display the target object array.

[0020] Optionally, the displaying the target object array includes:

[0021] When the target object array is an object array of a list structure, extracting name information and path information of each object;

[0022] Fill the name information and path information into the created target table;

[0023] The target table is displayed.

[0024] Optionally, the displaying the target object array includes:

[0025] When the target object array is an object array of a tree structure, determining tree structure data of each object in the object array of the tree structure;

[0026] Rendering tree nodes according to the tree structure data;

[0027] After detecting that the rendering is completed, the rendering result is presented on the graphical display interface of the client.

[0028] Optionally, rendering tree nodes according to the tree structure data includes:

[0029] Determining file identification attribute data from the tree structure data;

[0030] Performing initial tree node rendering according to the file identification attribute data;

[0031] Determine the child node attribute data of the initial tree node based on the tree structure data;

[0032] The child nodes of the initial tree node are rendered according to the child node attribute data.

[0033] A server-client interaction device, applied to the server, comprising:

[0034] A request message receiving module, used to receive a request message sent by a client, wherein the request message carries an uploaded target model folder;

[0035] A request message parsing module, used to parse the request message to obtain a target file in the target model folder for transmission between the client and the server;

[0036] A suffix type determination module, used to determine the suffix type of the target file;

[0037] An object data generation module, used for generating a target object array corresponding to the target file according to the suffix type;

[0038] The object data sending module is used to return the target object array to the client so as to display the target file on the client.

[0039] A server-client interaction device, applied to the client, comprising:

[0040] A request message generation module, used for obtaining a target model folder to be uploaded, and generating a request message carrying the target model folder, wherein the target model folder includes a target file for transmission between the client and the server;

[0041] A request message sending module, used to send the request message to the server, so that the server parses the request message to obtain the target file, and determines the suffix type of the target file, and generates a target object array corresponding to the target file according to the suffix type;

[0042] The object data group receiving and displaying module is used to receive the target object array returned by the server and display the target object array.

[0043] An electronic device comprises a processor, a memory and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the method for interacting between a server and a client as described above is implemented.

[0044] The embodiments of the present invention have the following advantages:

[0045] In an embodiment of the present invention, the files in the target model folder can be generated into target object data according to the suffix type and stored in the server, and can be returned to the terminal in the form of a target object array for display, thereby realizing unified management and maintenance of the model files. The data can be retrieved from the server at any time, ensuring the high availability and disaster recovery capabilities of the data, thereby improving management efficiency and security. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solution of the present invention, the accompanying drawings required for use in the description of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0047] Figure 1 It is a flow chart of steps of a method for interaction between a server and a client provided by an embodiment of the present invention;

[0048] Figure 2 is a flowchart of another method for interaction between a server and a client provided by an embodiment of the present invention;

[0049] Figure 3 It is a structural diagram of an interactive device between a server and a client provided by an embodiment of the present invention;

[0050] Figure 4 It is a structural diagram of another interactive device between a server and a client provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0051] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0052] Reference Figure 1, shows a flow chart of a method for interaction between a server and a client provided by an embodiment of the present invention, which is applied to the server and may specifically include the following steps:

[0053] Step S101, receiving a request message sent by a client, the request message carrying an uploaded target model folder;

[0054] In actual applications, the client and the server can interact to realize data storage and retrieval. For the model files in the target model folder that need to be managed and maintained in the client, the client can realize the storage and retrieval of model file data through data transmission interaction with the server.

[0055] The data stored in the model folder may be an ADAMS model file, and the ADAMS model file may specifically include but is not limited to any one or more of .cdb, .asy and variable parameter files.

[0056] The target model folder to be uploaded to the server can be determined in the client according to the folder suffix. For example, the model folder in the embodiment of the present invention can be a folder with a suffix of .cdb.

[0057] After the client determines the folder, the client can process the model file in the folder. Specifically, the client can convert the data format of the model file to obtain the target file for transmission between the client and the server. In one example, the data client can be in FormData format, which is a format for transmitting form data between the client and the server. It is usually used to upload files or submit form data. The FormData object allows a collection of key-value pairs to be constructed, where the key is a string and the value can be a string or a Blob (binary data) object.

[0058] The FormData format has the following characteristics: the FormData object consists of multiple key-value pairs, each of which represents a form field or file; FormData can contain files (Blob or File objects), which makes this format very suitable for file uploads; FormData uses the multipart / form-data encoding format by default, which is suitable for form data containing files; FormData is a standard API supported by most browsers and has a wide range of applications.

[0059] After the client processes the data, the client can generate a request message carrying the target model folder and send the generated request message to the server, so that the server can receive the request message from the client, and the request message is used by the server to perform structured processing on the target file in the target model folder.

[0060] Step S102, parsing the request message to obtain a target file in the target model folder for transmission between the client and the server;

[0061] After receiving the request message, the server parses the request message to obtain the target file in the target model folder for transmission between the client and the server.

[0062] The specific parsing method of the server depends on the programming language and framework used on the server side.

[0063] In one example, the server may parse the request message according to the data format in which the target file is packaged and sent in the request message, thereby obtaining the target file.

[0064] Step S103, determining the suffix type of the target file;

[0065] After obtaining the target file, the suffix type of the target file can be determined.

[0066] For example, the server may determine the suffix type of the target file by reading a preset field corresponding to the subsequent type in the target file.

[0067] The suffix type may include any one or more of the following:

[0068] .asy suffix type, .sub suffix type, .reb suffix type.

[0069] Step S104, generating a target object array corresponding to the target file according to the suffix type;

[0070] The object array structure corresponding to the model files of different suffix types can be preset on the server side, and after the suffix type of the model file is determined, the target object array corresponding to the target file can be generated according to the suffix type.

[0071] For example, when the suffix type is .asy, the target file can be converted into an object array of a list structure, such as an object array of assemblyList; when the suffix type is not .asy, the target file is converted into an object array of a tree structure.

[0072] In terms of data structure, assemblyList is a flat array of objects, each object represents an independent assembly. The tree structure is a hierarchical array object, each node can have child nodes, representing a complex hierarchical relationship.

[0073] In terms of organization, assemblyList is suitable for simple list data without nested relationships. The tree structure is suitable for data that needs to represent nested and hierarchical relationships.

[0074] In terms of data processing, assemblyList data processing is relatively simple, and the array can be directly traversed for operation. Tree structure data processing may require recursive traversal to process the child nodes of each node.

[0075] Based on the above differences, in practical applications, appropriate data structures are selected according to specific needs to represent and process assembly data.

[0076] If the file extension is .asy, the server will treat it as an assembly file of the model and process it accordingly. For example, it can save it to a specific directory or perform further parsing and processing.

[0077] Specifically, for an assembly file, the server will return it to the terminal in the form of an object array with a variable name of assemblyList. Each object in the object array contains the name name and path information path of each assembly.

[0078] For files with suffixes other than .asy (such as .sub, .reb, etc.), the server will treat them as variable parameter files and process them accordingly. For example, they can be saved to another directory, or parameter parsing and processing can be performed.

[0079] In the embodiment of the present invention, after the server has processed all the files, the server can also send a response to the client to inform the result of the file processing. Through the above steps, the server can effectively receive, parse and process the files in FormData format, and then classify and process them according to the file suffix.

[0080] In one embodiment of the present invention, generating a target object array corresponding to a target file according to a suffix type includes: creating a target object for each target file according to the suffix type; and adding the target object to the target object array corresponding to the target file.

[0081] (I) Processing process of model files with .asy suffix:

[0082] (1) Receiving and parsing FormData: After receiving a request in FormData format, the server parses the data therein.

[0083] (2) Check the file extension: For each parsed file, the server will check its file name and extract the file extension.

[0084] (3) Processing assembly files: If the file extension is .asy, the server will treat it as an assembly file of the model and process it accordingly.

[0085] (3) Construct assemblyList object array: For each assembly file, the server creates an object containing the assembly name and path information, and adds these objects to the assemblyList array.

[0086] (4) Return assemblyList object array: After processing all assembly files, the server returns the assemblyList object array to the terminal.

[0087] (II) Model file processing process for non-.asy suffix types:

[0088] (1) Receiving and parsing FormData: After receiving a request in FormData format, the server parses the data therein.

[0089] (2) Check the file extension: For each parsed file, the server will check its file name and extract the file extension.

[0090] (3) Processing variable parameter files: For files with suffixes other than .asy (such as .sub, .reb, etc.), the server will treat them as variable parameter files and retain their original directory hierarchy.

[0091] (4) Constructing a tree-structured array object: For each file and directory, the server creates an object that contains the name name, path path, subdirectories children, and an attribute that indicates whether it is a file isFile, and adds these objects to the tree-structured array object.

[0092] (5) Returning a tree-structured array object: After processing all variable parameter files, the server returns a tree-structured array object to the terminal.

[0093] Step S105, returning the target object array to the client to display the target file on the client.

[0094] The server can store the model file in the form of an object array, and can also return the target object array to the client to display the target file on the client.

[0095] In an embodiment of the present invention, the files in the target model folder can be generated into target object data according to the suffix type and stored in the server, and can be returned to the terminal in the form of a target object array for display, thereby realizing unified management and maintenance of the model files. The data can be retrieved from the server at any time, ensuring the high availability and disaster recovery capabilities of the data, thereby improving management efficiency and security.

[0096] Reference Figure 2 , shows a flowchart of another method for interaction between a server and a client provided by an embodiment of the present invention, which is applied to a client and may specifically include the following steps:

[0097] Step S201, obtaining a target model folder to be uploaded, and generating a request message carrying the target model folder, wherein the target model folder includes a target file for transmission between the client and the server;

[0098] Step S202, sending the request message to the server, so that the server parses the request message to obtain the target file, and determines the suffix type of the target file, and generates a target object array corresponding to the target file according to the suffix type;

[0099] Step S202, receiving the target object array returned by the server, and displaying the target object array.

[0100] In one embodiment of the present invention, the process of displaying target object data may specifically include the following sub-steps:

[0101] Sub-step S11, when the target object array is an object array of a list structure, extracting the name information and path information of each object;

[0102] Sub-step S12, filling the name information and path information into the created target table;

[0103] The target table may be pre-created according to a preset method, and the preset method may use HTML and JavaScript to create a table.

[0104] Sub-step S13, displaying the target table.

[0105] In the embodiment of the present invention, the analysis results can be displayed to the user in a tabular form through an intuitive visual interface, making complex data clear at a glance and helping to make decisions more scientific and efficient.

[0106] For example, after receiving the assemblyList data, the terminal can display it on the page in a table format by following the steps below:

[0107] First, the terminal needs to receive the assemblyList data returned from the server. Assume that the data is obtained through an AJAX request. After receiving the data, the terminal needs to parse the assemblyList object array and extract the name and path information of each assembly. Use HTML and JavaScript to generate a table and fill the data in the assemblyList into the table.

[0108] In another embodiment of the present invention, the process of displaying the target object array may specifically include the following sub-steps:

[0109] Sub-step S21, when the target object array is an object array with a tree structure, determining the tree structure data of each object in the object array with the tree structure;

[0110] Sub-step S22, rendering tree nodes according to the tree structure data;

[0111] Sub-step S23, after detecting that the rendering is completed, presenting the rendering result on the graphical display interface of the client.

[0112] In one embodiment of the present invention, rendering tree nodes according to tree structure data includes:

[0113] Sub-step S31, determining file identification attribute data from the tree structure data;

[0114] Among them, each object in the tree object array may contain a name (name), a path (path), a subdirectory (child), and an attribute for identifying whether it is a file (isFile), that is, the tree structure data may specifically include but is not limited to any one or more of the name (name), path (path), a subdirectory (child), and an attribute for identifying whether it is a file (isFile).

[0115] Sub-step S32, performing initial tree node rendering according to the file identification attribute data;

[0116] When the file identification attribute data is the first attribute value (such as isFile is true), the target object is rendered as a directory node; when the file identification attribute data is the second attribute (isFile is false), the target object is rendered as a child node.

[0117] Sub-step S33, determining the child node attribute data of the initial tree node based on the tree structure data;

[0118] When a node has a child attribute, recursively process this node until all treeData nodes are rendered.

[0119] Sub-step S34, rendering the child nodes of the initial tree node according to the child node attribute data.

[0120] For example, after receiving the tree structure data, you can use the custom tree selector TreeSelect component to render it to the page so that users can browse and manage model files. The following are the steps to implement this rendering process:

[0121] First, you can define a TreeSelect component that receives tree structure data treeData as an input parameter and renders directory nodes or child nodes according to the isFile attribute. Traverse treeData, if isFile is true, render it as a directory node; if isFile is false, render it as a child node. When a node has a children attribute, recursively process this node until all treeData nodes are rendered.

[0122] In one embodiment of the present invention, in the client, when the user clicks on a file directory in the tree selector, the terminal will expand and display the sub-files under the file directory. When the user clicks on a file in the tree selector, the terminal sends the path information of the currently clicked file to the server. After receiving the file path, the server will find the file and parse the information therein for subsequent processing or analysis.

[0123] In one embodiment of the present invention, a client page can provide an intuitive and user-friendly interface, which uses a query table to clearly and systematically display all ADAMS model file data stored in the server. The client page can also allow users to quickly search for specific files by keywords (such as model name, parent model name) to improve file search efficiency.

[0124] In one embodiment of the present invention, the client page can support multiple users to view and edit model file information online at the same time. For example, the client can respond to the editing operations of multiple users and synchronize and adjust the model file information stored on the server in accordance with the user information and the editing information. The embodiment of the present invention can ensure seamless teamwork and data consistency through advanced conflict detection and resolution mechanisms. Among them, the conflict mechanism and resolution mechanism can be set according to the actual scenario, and there are no excessive restrictions on this in the embodiment of the present invention.

[0125] The above scheme in the embodiment of the present invention can be applied to centralized cloud storage and management of ADAMS model files, realizing unified storage, efficient access and security management of model files. At the same time, the server-side intelligence can identify and analyze the key technologies of ADAMS model files. Specifically, through Java language and efficient algorithm technology, the server-side can automatically identify keywords, parameters and structural information in the model file, and realize in-depth analysis and intelligent analysis. And in the embodiment of the present invention, the tree selector component of ADAMS model file information can be used for visualization display technology, that is, using a graphical interface and a tree structure, the information hierarchy, directory structure and association relationship of the model file can be intuitively displayed. Users can easily browse the various parts of the model file by clicking, dragging and other operations, and understand the dependencies and interaction logic between files.

[0126] In the embodiment of the present invention, unified management and maintenance of model files are achieved through data interaction between the server and the client, and data can be retrieved from the server at any time, ensuring high availability and disaster recovery capabilities of the data, thereby improving management efficiency and security.

[0127] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

[0128] Reference Figure 3 , shows a schematic diagram of the structure of a server-client interaction device provided by an embodiment of the present invention, which is applied to the server and may specifically include the following modules:

[0129] The request message receiving module 301 is used to receive a request message sent by a client, wherein the request message carries an uploaded target model folder;

[0130] A request message parsing module 302 is used to parse the request message to obtain a target file in the target model folder for transmission between the client and the server;

[0131] A suffix type determination module 303, used to determine the suffix type of the target file;

[0132] An object data generating module 304 is used to generate a target object array corresponding to the target file according to the suffix type;

[0133] The object data sending module 305 is used to return the target object array to the client so as to display the target file on the client.

[0134] In an embodiment of the present invention, the object data generation module 304 may include the following submodules:

[0135] A first object array conversion submodule, used for converting the target file into an object array of a list structure when the suffix type is an .asy suffix type;

[0136] The second object array conversion submodule is used to convert the target file into an object array of a tree structure when the suffix type is not the .asy suffix type.

[0137] In an embodiment of the present invention, the object data generation module 304 may include the following submodules:

[0138] A target object creation submodule, used to create a target object for each target file according to the suffix type;

[0139] The target object adding submodule is used to add the target object to the target object array corresponding to the target file.

[0140] In an embodiment of the present invention, the files in the target model folder can be generated into target object data according to the suffix type and stored in the server, and can be returned to the terminal in the form of a target object array for display, thereby realizing unified management and maintenance of the model files. The data can be retrieved from the server at any time, ensuring the high availability and disaster recovery capabilities of the data, thereby improving management efficiency and security.

[0141] Reference Figure 4 , shows a schematic diagram of the structure of a server-client interaction device provided by an embodiment of the present invention, which is applied to the client and may specifically include the following modules:

[0142] The request message generation module 401 is used to obtain a target model folder to be uploaded and generate a request message carrying the target model folder, wherein the target model folder includes a target file for transmission between the client and the server;

[0143] The request message sending module 402 is used to send the request message to the server, so that the server parses the request message to obtain the target file, and determines the suffix type of the target file, and generates a target object array corresponding to the target file according to the suffix type;

[0144] The object data group receiving and displaying module 403 is used to receive the target object array returned by the server and display the target object array.

[0145] In one embodiment of the present invention, the object data group receiving and displaying module 403 may include the following submodules:

[0146] An information extraction submodule, used for extracting name information and path information of each object when the target object array is an object array of a list structure;

[0147] A table filling submodule, used to fill the name information and path information into the created target table;

[0148] The table display submodule is used to display the target table.

[0149] In one embodiment of the present invention, the object data group receiving and displaying module 403 may include the following submodules:

[0150] A tree structure data determination submodule, used for determining the tree structure data of each object in the tree structure object array when the target object array is a tree structure object array;

[0151] A tree node rendering submodule, used for rendering tree nodes according to the tree structure data;

[0152] The rendering display submodule is used to present the rendering result on the graphical display interface of the client after detecting that the rendering is completed.

[0153] In one embodiment of the present invention, the tree node rendering submodule includes the following units:

[0154] A file identification attribute data determining unit, used to determine the file identification attribute data from the tree structure data;

[0155] An initial node rendering unit, used for performing initial tree node rendering according to the file identification attribute data;

[0156] A sub-node attribute determination unit, configured to determine sub-node attribute data of the initial tree node based on the tree structure data;

[0157] The child node rendering module is used to render the child nodes of the initial tree node according to the child node attribute data.

[0158] An embodiment of the present invention further provides an electronic device, which may include a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, the above-mentioned method of interaction between the server and the client is implemented.

[0159] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned method for interaction between a server and a client is implemented.

[0160] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0161] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0162] Those skilled in the art will appreciate that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0163] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0164] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0165] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0166] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.

[0167] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0168] The above is a detailed introduction to a method and device for interaction between a server and a client, and an electronic device. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for a person skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A method for interaction between a server and a client, characterized in that: Applied to the server, the method includes: Receive a request message sent by a client, wherein the request message carries an uploaded target model folder; Parsing the request message to obtain a target file in the target model folder for transmission between the client and the server; Determine the suffix type of the target file; Generate a target object array corresponding to the target file according to the suffix type; The target object array is returned to the client to display the target file on the client.

2. The method according to claim 1, characterized in that The step of generating a target object array corresponding to the target file according to the suffix type includes: When the suffix type is .asy, converting the target file into an object array of list structure; When the suffix type is not the .asy suffix type, the target file is converted into an object array of a tree structure.

3. The method according to claim 1 or 2, characterized in that: The step of generating a target object array corresponding to the target file according to the suffix type includes: Creating a target object for each target file according to the suffix type; Add the target object to the target object array corresponding to the target file.

4. A method for interaction between a server and a client, characterized in that: Applied to a client, the method comprises: Acquire a target model folder to be uploaded, and generate a request message carrying the target model folder, wherein the target model folder includes a target file for transmission between the client and the server; Sending the request message to the server, so that the server parses the request message to obtain the target file, determines the suffix type of the target file, and generates a target object array corresponding to the target file according to the suffix type; Receive the target object array returned by the server and display the target object array.

5. The method according to claim 4, characterized in that The display of the target object array includes: When the target object array is an object array of a list structure, extracting name information and path information of each object; Fill the name information and path information into the created target table; The target table is displayed.

6. The method according to claim 4, characterized in that The display of the target object array includes: When the target object array is an object array of a tree structure, determining tree structure data of each object in the object array of the tree structure; Rendering tree nodes according to the tree structure data; After detecting that the rendering is completed, the rendering result is presented on the graphical display interface of the client.

7. The method according to claim 6, characterized in that The rendering of tree nodes according to the tree structure data includes: Determining file identification attribute data from the tree structure data; Performing initial tree node rendering according to the file identification attribute data; Determine the child node attribute data of the initial tree node based on the tree structure data; The child nodes of the initial tree node are rendered according to the child node attribute data.

8. An interactive device between a server and a client, characterized in that: Applied to the server, the device comprises: A request message receiving module, used to receive a request message sent by a client, wherein the request message carries an uploaded target model folder; A request message parsing module, used to parse the request message to obtain a target file in the target model folder for transmission between the client and the server; A suffix type determination module, used to determine the suffix type of the target file; An object data generation module, used for generating a target object array corresponding to the target file according to the suffix type; The object data sending module is used to return the target object array to the client so as to display the target file on the client.

9. An interactive device between a server and a client, characterized in that: Applied to a client, the device comprises: A request message generation module, used for obtaining a target model folder to be uploaded, and generating a request message carrying the target model folder, wherein the target model folder includes a target file for transmission between the client and the server; A request message sending module, used for sending the request message to the server, so that the server parses the request message, obtains the target file, determines the suffix type of the target file, and generates a target object array corresponding to the target file according to the suffix type; The object data group receiving and displaying module is used to receive the target object array returned by the server and display the target object array.

10. An electronic device, characterized in that: The invention comprises a processor, a memory and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the method for interaction between a server and a client as claimed in any one of claims 1 to 8 is implemented.

Citation Information

Cited By

  • File processing method, server and client

    CN120744255A