CN112667224A - File processing method and device, computer equipment and storage medium - Google Patents

File processing method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN112667224A
CN112667224A CN202110045402.3A CN202110045402A CN112667224A CN 112667224 A CN112667224 A CN 112667224A CN 202110045402 A CN202110045402 A CN 202110045402A CN 112667224 A CN112667224 A CN 112667224A
Authority
CN
China
Prior art keywords
description language
file
editing
target
interface description
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110045402.3A
Other languages
Chinese (zh)
Inventor
邬亮
严东东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202110045402.3A priority Critical patent/CN112667224A/en
Publication of CN112667224A publication Critical patent/CN112667224A/en
Pending legal-status Critical Current

Links

Images

Abstract

The present disclosure provides a file processing method, apparatus, computer device and storage medium, the method comprising: receiving a data storage request initiated by a first user side based on an editing interface of an online integrated development environment WebIDE displayed by the first user side, wherein the online integrated development environment WebIDE is used for editing an interface description language IDL file, and the data storage request is generated after the first user triggers a storage button of the editing interface; responding to the data storage request, acquiring a target IDL file edited by the first user side on the editing interface, and storing the target IDL file into the server; and responding to an acquisition request aiming at the target IDL file initiated by the second user terminal, and sending the target IDL file to the second user terminal. Therefore, the development, storage and acquisition of the IDL file are operated on the WebIDE server, and cross-system operation is not needed, so that the process of storing and acquiring the target IDL file is simplified, and the processing efficiency of the IDL file is improved.

Description

File processing method and device, computer equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a file processing method and apparatus, a computer device, and a storage medium.
Background
An Interface Description Language (IDL) is a structured Interface Description Language independent of a programming Language, and can be used for mutual communication between objects running on different platforms and programs written in different languages.
In the existing Development process, a local Integrated Development Environment (IDE) is generally adopted to develop the IDL file, and the developed IDL file is generally stored locally when being stored. When sharing the IDL file, the development end needs to send the developed local IDL file to a remote server (here, a server corresponding to the git warehouse is general), and then the receiving end obtains the IDL file from the remote server. In this process, since the remote server needs to be called many times, the process of sharing the IDL file is complicated, and thus the efficiency of processing the IDL file is low.
Disclosure of Invention
The embodiment of the disclosure at least provides a file processing method, a file processing device, computer equipment and a storage medium.
In a first aspect, an embodiment of the present disclosure provides a file processing method, including:
receiving a data storage request initiated by a first user terminal, wherein the data storage request is a request generated based on a trigger operation executed on an editing page of an online integrated development environment, an editing interface of the online integrated development environment is displayed on the first user terminal, and the online integrated development environment is used for editing an interface description language file;
responding to the data storage request, acquiring a target interface description language file edited by the first user side on the editing interface, and storing the target interface description language file into a server;
and responding to an acquisition request aiming at the target interface description language file initiated by a second user end, and sending the target interface description language file to the second user end.
In a possible implementation manner, before receiving a data saving request initiated by a first user terminal based on an editing interface of an online integrated development environment displayed by the first user terminal, the method further includes:
and responding to an editing request initiated by the first user side based on the editing interface, displaying an editing template corresponding to the editing request, and loading a grammar plug-in corresponding to the editing request.
In a possible implementation manner, the edit request carries a target file type and a target interface type selected by the first user;
the displaying of the editing template corresponding to the editing request comprises:
acquiring a target editing template matched with the target file type and the target interface type;
displaying the obtained target editing template;
the loading of the grammar plug-in corresponding to the edit request includes:
and loading a grammar plug-in corresponding to the target interface type.
In a possible embodiment, the method further comprises:
responding to the sharing operation aiming at the target interface description language file, and generating an access link for acquiring the target interface description language file based on the storage position of the target interface description language file in the server;
the acquisition request for the target interface description language file, which is initiated by the second user end, is a request initiated by the second user end based on the access link.
In a possible embodiment, the method further comprises:
responding to a release request aiming at any one of a plurality of target interface description language files stored in a server, and determining the version information of the any one target interface description language file;
and generating a version record corresponding to any target interface description language file based on the any target interface description language file and the version information of the any target interface description language file, and releasing the any target interface description language file and the version record to the server, wherein the version record is used for viewing the version information of the current interface description language file.
In a possible embodiment, the sending the target interface description language file to the second client includes:
analyzing the target interface description language file to obtain an abstract syntax tree corresponding to the target interface description language file;
and sending the abstract syntax tree to the second user end so that the second user end traverses the abstract syntax tree to obtain an interface document corresponding to the target interface description language file.
In a second aspect, an embodiment of the present disclosure further provides a file processing apparatus, including:
the system comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving a data storage request initiated by a first user terminal, the data storage request is a request generated based on a trigger operation executed on an editing page of an online integrated development environment, an editing interface of the online integrated development environment is displayed on the first user terminal, and the online integrated development environment is used for editing an interface description language file;
the storage module is used for responding to the data storage request, acquiring a target interface description language file edited by the first user side on the editing interface, and storing the target interface description language file into a server;
and the sending module is used for responding to an acquisition request aiming at the target interface description language file initiated by a second user terminal and sending the target interface description language file to the second user terminal.
In a possible embodiment, the apparatus further comprises:
and the editing module is used for responding to an editing request initiated by the first user terminal based on the editing interface, displaying an editing template corresponding to the editing request and loading a grammar plug-in corresponding to the editing request.
In a possible implementation manner, the edit request carries a target file type and a target interface type selected by the first user;
the editing module, when displaying the editing template corresponding to the editing request, is configured to:
acquiring a target editing template matched with the target file type and the target interface type;
displaying the obtained target editing template;
the editing module, when the grammar plug-in corresponding to the editing request is loaded, is configured to:
and loading a grammar plug-in corresponding to the target interface type.
In a possible embodiment, the apparatus further comprises:
the sharing module is used for responding to the sharing operation aiming at the target interface description language file and generating an access link for acquiring the target interface description language file based on the storage position of the target interface description language file in the server;
the acquisition request for the target interface description language file, which is initiated by the second user end, is a request initiated by the second user end based on the access link.
In a possible embodiment, the apparatus further comprises:
the publishing module is used for responding to a publishing request aiming at any one of a plurality of target interface description language files stored in the server and determining the version information of the any one of the target interface description language files;
and generating a version record corresponding to any target interface description language file based on the any target interface description language file and the version information of the any target interface description language file, and releasing the any target interface description language file and the version record to the server, wherein the version record is used for viewing the version information of the current interface description language file.
In a possible implementation manner, the sending module, when sending the target interface description language file to the second client, is configured to:
analyzing the target interface description language file to obtain an abstract syntax tree corresponding to the target interface description language file;
and sending the abstract syntax tree to the second user end so that the second user end traverses the abstract syntax tree to obtain an interface document corresponding to the target interface description language file.
In a third aspect, this disclosure also provides a computer device, a processor, and a memory, where the memory stores machine-readable instructions executable by the processor, and the processor is configured to execute the machine-readable instructions stored in the memory, and when the machine-readable instructions are executed by the processor, the machine-readable instructions are executed by the processor to perform the steps in the first aspect or any one of the possible implementations of the first aspect.
In a fourth aspect, this disclosure also provides a computer-readable storage medium having a computer program stored thereon, where the computer program is executed to perform the steps in the first aspect or any one of the possible implementation manners of the first aspect.
According to the file processing method, the file processing device, the computer equipment and the storage medium, after a data storage request initiated by a user side based on an online integrated development environment WebIDE is received, a target IDL file currently being processed can be directly stored in the WebIDE server, and after an acquisition request aiming at the IDL file is received, the target IDL file can be directly acquired from the WebIDE server in which the target IDL file is stored.
In order to make the aforementioned objects, features and advantages of the present disclosure more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for use in the embodiments will be briefly described below, and the drawings herein incorporated in and forming a part of the specification illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the technical solutions of the present disclosure. It is appreciated that the following drawings depict only certain embodiments of the disclosure and are therefore not to be considered limiting of its scope, for those skilled in the art will be able to derive additional related drawings therefrom without the benefit of the inventive faculty.
FIG. 1a is a schematic diagram illustrating an application scenario of a file processing method in the prior art;
fig. 1b is a schematic view illustrating an application scenario of a file processing method provided by an embodiment of the present disclosure;
FIG. 2 is a flow chart illustrating a file processing method provided by an embodiment of the present disclosure;
fig. 3 illustrates a specific method for displaying an edit template corresponding to the edit request in the file processing method provided in the embodiment of the present disclosure;
fig. 4 illustrates a specific method for executing a publishing operation of a target IDL file in the file processing method provided by the embodiment of the present disclosure;
fig. 5 illustrates a specific method for performing a pull operation of a target IDL file in the file processing method provided by the embodiment of the present disclosure;
fig. 6 illustrates a specific method for sending the target IDL file to the second user in the file processing method provided in the embodiment of the present disclosure;
FIG. 7 is a schematic diagram of a document processing apparatus provided by an embodiment of the present disclosure;
fig. 8 shows a schematic structural diagram of a computer device provided by an embodiment of the present disclosure.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be described clearly and completely with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are only a part of the embodiments of the present disclosure, not all of the embodiments. The components of embodiments of the present disclosure, as generally described and illustrated herein, may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present disclosure is not intended to limit the scope of the disclosure, as claimed, but is merely representative of selected embodiments of the disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the disclosure without making creative efforts, shall fall within the protection scope of the disclosure.
It is found that in the existing Development process, the IDL file is generally developed by using a local Integrated Development Environment (IDE). When sharing the IDL file, the development end needs to send the developed IDL file to a remote server (here, a server corresponding to the git warehouse is general), and then the receiving end obtains the IDL file from the remote server. In this process, since the remote server needs to be called many times, the process of sharing the IDL file is complicated, and thus the efficiency of processing the IDL file is low.
On the other hand, in the process of developing the IDL file, because the IDL file is locally developed, the IDL draft file in the development process is also locally stored, if the user wants to share the draft file with other users, the user is also required to send the IDL draft file to the remote server, and then other users acquire the IDL draft file from the remote server.
Based on the above research, the present disclosure provides a file processing method, device, computer device, and storage medium, which may directly save a target IDL file currently being processed to a WebIDE server after receiving a data saving request initiated by a user side based on a WebIDE, and may directly obtain the target IDL file from the WebIDE server storing the target IDL file after receiving an obtaining request for the IDL file, so that development, storage, and obtaining of the IDL file are all performed on the WebIDE server, and a cross-system operation is not required, thereby simplifying a process of storing and obtaining the target IDL file, and improving processing efficiency of the IDL file.
The above-mentioned drawbacks are the results of the inventor after practical and careful study, and therefore, the discovery process of the above-mentioned problems and the solutions proposed by the present disclosure to the above-mentioned problems should be the contribution of the inventor in the process of the present disclosure.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
To facilitate understanding of the present embodiment, first, a document processing method disclosed in the embodiments of the present disclosure is described in detail, where an execution subject of the document processing method provided in the embodiments of the present disclosure is generally a server, and the server includes: and the webIDE corresponds to the server.
To facilitate understanding of the present embodiment, an application scenario of the file processing method disclosed in the embodiment of the present disclosure is first introduced, and as shown in fig. 1a, the application scenario is a schematic diagram of a file processing method in the prior art. In fig. 1a, 101 represents a first user terminal and a corresponding user; 102 represents a front-end display interface of the IDE of the first user end; 103 represents a local server corresponding to the first user terminal; 104 represents a remote server (here, typically a server corresponding to the git repository); 105 represents a local server corresponding to the second user terminal; 106 represents a second user terminal and a corresponding user; 107 represents the front-end presentation interface of the IDE of the second user-side. In a specific scenario, a user corresponding to the first user side can edit/share the IDE carried on the first user side, so that the processed IDL file can be uploaded to a server of a corresponding git warehouse through a local server; meanwhile, when a user corresponding to the second user needs to view the corresponding IDL file, a request can be initiated to the git warehouse on the local IDE, and the corresponding IDL file can be transmitted to a server corresponding to the second user through a network and finally displayed on the interface of the second user.
As shown in fig. 1b, an application scenario diagram of a file processing method provided in the embodiment of the present disclosure is shown. In fig. 1b, 11 represents the first user end and the corresponding user; 12 represents a front-end display interface of the WebIDE deployed in each user side; 13 represents a server corresponding to WebIDE; and 14 represents a second user terminal and a corresponding user. In a specific scene, a user corresponding to the first user side can perform online operation on the WebIDE carried on the first user side, so that the IDL file processed by the user can be published to a server corresponding to the WebIDE in real time; meanwhile, after the user corresponding to the second user receives the sharing link aiming at the IDL file, the corresponding IDL file can be pulled from the server corresponding to the WebIDE for real-time viewing. Therefore, the development, storage and acquisition of the IDL file are operated on the WebIDE server without performing cross-system operation, so that the process of storing and acquiring the target IDL file is simplified, and the processing efficiency of the IDL file is improved.
It should be noted that "the first user", "the user corresponding to the first user side", and "the developer" all refer to "the first user".
Referring to fig. 2, a flowchart of a file processing method provided in an embodiment of the present disclosure is shown, where the method includes S201 to S203, where:
s201: receiving a data saving request initiated by a first user terminal, wherein the data saving request is a request generated based on a trigger operation executed on an editing page of an online integrated development environment, an editing interface of the online integrated development environment is displayed on the first user terminal, and the online integrated development environment is used for editing an interface description language file.
S202: and responding to the data storage request, acquiring a target interface description language file edited by the first user side on the editing interface, and storing the target interface description language file into a server.
S203: and responding to an acquisition request aiming at the target interface description language file initiated by a second user end, and sending the target interface description language file to the second user end.
Each step and the corresponding implementation method in the embodiments of the present disclosure will be described in detail below.
Aiming at S201, different from the traditional IDE, the WebIDE uses a unified online development standard and a unified tool to standardize the processing process of the IDL file, thereby avoiding the problem of low development efficiency caused by too many types of IDE and incapability of unifying.
In a possible implementation manner, before receiving a data saving request initiated by a first user side based on an editing interface of the online integrated development environment WebIDE displayed by the first user side, the editing of the IDL can be completed by responding to the editing request initiated by the first user side based on the editing interface, displaying an editing template corresponding to the editing request, and loading a grammar plug-in corresponding to the editing request.
The editing request may carry a target file type and a target interface type selected by the first user. The target file type and the target interface type carried in the edit request may be used to perform the operation steps as described in S301 and S302.
Wherein, the file type can comprise a Proto file and a thread file; the interface types may include an HTTP interface and an RPC interface.
As shown in fig. 3, the displaying the editing template corresponding to the editing request may include the following two steps:
s301, acquiring a target editing template matched with the target file type and the target interface type.
Here, after setting the target file type and the target interface type in the IDL project is completed, the corresponding target edit template may be matched based on the selected type.
Illustratively, 4 editing templates can be preset, namely Proto files for the HTTP interface; a Proto file for an RPC interface; a thread file for an HTTP interface; a thread file for RPC interface. Each editing template comprises a corresponding use example of IDL grammar, which can help developers to rapidly complete the development of IDL files, thereby improving the writing efficiency of IDL files.
And S302, displaying the obtained target editing template.
Specifically, the obtained target editing template may be displayed at the first user end where the developer logs in.
In a possible implementation manner, while the obtained target editing template is displayed, a grammar plug-in corresponding to the target interface type may be loaded.
Here, the grammar plug-in can support auxiliary processing functions such as grammar highlighting, automatic completion, definition skip, grammar check and error prompt, so as to assist a user in writing an IDL file.
In practical applications, because different local IDEs need to configure different IDL syntax plug-ins, the existing IDL syntax plug-ins are still imperfect and only support a few IDEs, so that some IDL developers cannot use the IDL syntax plug-ins, thereby affecting the writing efficiency of IDL files. In addition, the IDL syntax plug-ins of different IDL developers are different, and if the IDL syntax plug-ins need to be upgraded, the IDL syntax plug-ins corresponding to different IDEs need to be upgraded one by one, and the upgrading mode is complicated.
Through the implementation mode, unified IDL grammar plug-ins can be loaded on the WebIDE, and the plug-in loading of the WebIDE is uniformly controlled by WebIDE operation and maintenance personnel, so that the IDL grammar plug-ins can be uniformly configured and can also be uniformly updated, the same management on the IDL grammar plug-ins is realized, and the editing experience of developing IDL files by developers is improved.
After displaying the editing template corresponding to the editing request and loading the grammar plugin corresponding to the editing request, a developer can edit the IDL file on line, and can save the currently edited target IDL file by clicking a save button on the editing interface of the WebIDE displayed by the first user side.
In a possible implementation manner, after receiving a data saving request initiated by a first user based on an editing interface of an online integrated development environment WebIDE displayed by the first user, a target IDL file edited by the first user on the editing interface may be obtained according to step S102, and the target IDL file is saved in a server, which is described in detail as follows.
S202: and responding to the data storage request, acquiring a target interface description language file edited by the first user side on the editing interface, and storing the target interface description language file into a server.
Here, the server refers to a server corresponding to the WebIDE, and the target IDL file is directly stored in the server when being stored, but is not stored in the first user side or a remote server.
Since the development of the target IDL file may not be completed all at once, or a developer has a new inspiration and needs to modify/re-edit the IDL file stored before, the number of times of the data storage request is often more than one, so that one version information may be generated during each storage, or the first user may directly input corresponding version information for representing draft files of different versions of the target IDL file.
In practical applications, during the process of editing the IDL, a developer needs to temporarily save the IDL file so as to continue editing next time. Each time the server receives that the first user initiates a saving operation for the target IDL file of the draft version, the target IDL file of the current draft version and the corresponding version information may be saved in the server.
In one possible embodiment, after responding to the data saving request, referring to fig. 4, the issuing operation on the target IDL file can be implemented by the following two steps:
s401, responding to a release request aiming at any one of a plurality of target interface description language files stored in a server, and determining the version information of the any one target interface description language file.
Illustratively, the server caches a plurality of versions of the IDL project 1 currently being processed, such as version 1, version 2, and version 3, the version number corresponding to each version is sequentially 1.1.0, 1.2.0, and 1.3.0, a release button may be correspondingly set for a file of each version, and when a release request for an IDL file of the version is received, that is, after a corresponding release button is triggered, version information of the IDL file corresponding to the triggered release button may be determined according to a corresponding relationship between the release button and the IDL file. For example, a release button may be set behind each version number, and since the IDL file has a corresponding relationship with a release button behind, when any release button is triggered, the version information of the IDL file corresponding to the triggered release button may be determined based on the corresponding positional relationship.
S402, based on any target interface description language file and version information of any target interface description language file, generating a version record corresponding to any target interface description language file, and issuing any target interface description language file and the version record to the server, wherein the version record is used for viewing the version information of the current interface description language file.
In a specific implementation, after the target IDL file is saved in the server, the target IDL file may be sent to the second user according to step S203, which is described in detail as follows.
S203: and responding to an acquisition request aiming at the target interface description language file initiated by a second user end, and sending the target interface description language file to the second user end.
In a possible implementation, the second ue and the first ue may be different ues. For example, the user a may edit and store the target IDL file for multiple times through the first user side, and may store the currently edited IDL file to the server every time of storage; and the user B acquires the target IDL file through the second user side, and the target IDL file acquired by the user B each time can be the IDL file newly stored by the user A, so that the user B can acquire the newly edited and stored content of the first user side through the second user side in real time, and the real-time sharing of the editing process of the target IDL file can be realized.
Specifically, a copy link corresponding to the target IDL file may be generated in response to a sharing request of the first user for the target IDL file and stored to the pasting board, and then, a user corresponding to the first user may send the link to the second user.
Further, when the second user receives and accesses the link, the server may receive the request for obtaining the corresponding target IDL file from the second user synchronously.
In a specific implementation, after receiving an acquisition request of the second user for a corresponding target IDL file, as shown in fig. 5, the operation of pulling the IDL file may also be implemented through the following three steps:
s501, copying the pull script.
The pull script is a script program written using a scripting language, such as Python, Shell. The pull script may download the target IDL file from the server to a client running the pull script.
Specifically, the corresponding pull script can be automatically generated in response to the pull operation of the user side for the target IDL file, and the pull script is copied on the pasting board of the user side, so that the user can further use the pull script by directly pasting the pull script.
And S502, running a pull script.
Due to the self-attribute of the script, the pull script can be directly operated in a command line of a computer without installation, so that the use cost of a user can be reduced.
Specifically, a command line prompt window of the client may be directly opened, that is, a cmd.
S503, the pull script reads the IDL file of the appointed version and pulls the IDL file of the appointed version to the local.
Here, the pulling to the local means that the target IDL file is downloaded from the server to the client running the pulling script.
Exemplary, pull script examples are as follows:
curl-s https://fip.example.net/py/pull.py|python-fip 1.1.0。
wherein, the 'curl-s https:// fip. example. net/py/pull. py' represents that a python script file is pulled by a curl, and the curl is a file transmission tool which works under a command line by using URL grammar;
"| python" represents a script file that is pulled with python;
"-fip.1.0" indicates a parameter when the script is executed, and indicates an item name fip and a version number of 1.1.0, respectively.
Through the pulling operation of the pulling script, the target IDL file can be transmitted from the server database to the local, and the corresponding original file still exists in the database, so that the storage space of a user side is saved, and the safety of file storage is improved.
In a possible implementation, when sending the target IDL file to the second client, as shown in fig. 6, the following two steps may be performed:
s601: and analyzing the target interface description language file to obtain an abstract syntax tree corresponding to the target interface description language file.
Here, the target IDL file may be parsed by a parser to obtain an abstract syntax tree AST.
S602: and sending the abstract syntax tree to the second user end so that the second user end traverses the abstract syntax tree to obtain an interface document corresponding to the target interface description language file.
Here, the interface document may be a Schema document, the Schema description information includes Schema parameters and Schema additional information, and the format of the Schema additional information and the Schema parameters is a json format. And traversing the AST to obtain the Schema parameter, and analyzing the annotation of the IDL file by using a regular expression to obtain the Schema additional information.
In a specific implementation, the regular expression that may be used is "/^ s @ ([ a-zA ] +) \ s + (. For example, matching and analyzing "@ iosversion7.0.5" by using a regular expression to obtain corresponding Schema additional information.
Furthermore, the Schema document in the HTML format of the hypertext markup language can be generated according to the Schema description information in the json format, so that the information display effect in the Schema document is more visual.
In this step, by obtaining Schema description information described by the IDL file and analyzing and generating the Schema document, compared with manually writing and maintaining the Schema document by using an online document editor in the prior art, the Schema document generated based on the IDL file has a uniform format, and flexibility and efficiency of writing and maintaining the Schema document are improved.
Exemplarily, an example of the schema is described by an IDL file:
Figure BDA0002894843970000151
Figure BDA0002894843970000161
the above example describes a Schema with struct. This is a Schema for the publisher page with a prefix of ssl:// publish. The method comprises a parameter, wherein the parameter is named category _ id and represents classification id, the effective IOS application version is 7.0.5, the effective Android application version is 7.0.8, and the page maintainer is place. In line with the described schema example, local:// publiccategory _ id ═ 2.
An exemplary schema document information in json format is as follows:
Figure BDA0002894843970000162
Figure BDA0002894843970000171
an exemplary generated Schema document in HTML format is as follows:
Figure BDA0002894843970000172
as can be seen from the above example, the Schema document information in the HTML format is displayed more intuitively, so that the user corresponding to the second user can more intuitively obtain the information stored in the target IDL file.
According to the file processing method, after a data storage request initiated by a user side based on an online integrated development environment WebIDE is received, a target IDL file currently being processed can be directly stored in a server of the WebIDE, and after an acquisition request aiming at the IDL file is received, the target IDL file can be directly acquired from the server of the WebIDE in which the target IDL file is stored.
It will be understood by those skilled in the art that in the method of the present invention, the order of writing the steps does not imply a strict order of execution and any limitations on the implementation, and the specific order of execution of the steps should be determined by their function and possible inherent logic.
Based on the same inventive concept, a file processing apparatus corresponding to the file processing method is also provided in the embodiments of the present disclosure, and because the principle of the apparatus in the embodiments of the present disclosure for solving the problem is similar to the above file processing method in the embodiments of the present disclosure, the implementation of the apparatus may refer to the implementation of the method, and repeated details are not described again.
Referring to fig. 7, a schematic diagram of a document processing apparatus provided in an embodiment of the present disclosure is shown, where the apparatus includes: a receiving module 701, a saving module 702, and a sending module 703; wherein the content of the first and second substances,
a receiving module 701, configured to receive a data saving request initiated by a first user, where the data saving request is a request generated based on a trigger operation executed on an editing page of an online integrated development environment, an editing interface of the online integrated development environment is displayed on the first user, and the online integrated development environment is used for editing an interface description language file;
a saving module 702, configured to respond to the data saving request, obtain a target interface description language file edited by the first user on the editing interface, and save the target interface description language file in a server;
a sending module 703, configured to respond to an acquisition request for the target interface description language file initiated by a second user, and send the target interface description language file to the second user.
In a possible embodiment, the apparatus further comprises:
the editing module 704 is configured to respond to an editing request initiated by the first user side based on the editing interface, display an editing template corresponding to the editing request, and load a grammar plug-in corresponding to the editing request.
In a possible implementation manner, the edit request carries a target file type and a target interface type selected by the first user;
the editing module 704, when the editing template corresponding to the editing request is displayed, is configured to:
acquiring a target editing template matched with the target file type and the target interface type;
displaying the obtained target editing template;
the editing module 704, when the syntax plugin corresponding to the editing request is loaded, is configured to:
and loading a grammar plug-in corresponding to the target interface type.
In a possible embodiment, the apparatus further comprises:
a sharing module 705, configured to respond to a sharing operation for the target interface description language file, and generate an access link for acquiring the target interface description language file based on a storage location of the target interface description language file in the server;
the acquisition request for the target interface description language file, which is initiated by the second user end, is a request initiated by the second user end based on the access link.
In a possible embodiment, the apparatus further comprises:
a publishing module 706, configured to determine version information of any target interface description language file in a plurality of target interface description language files stored in a server in response to a publishing request for the target interface description language file;
and generating a version record corresponding to any target interface description language file based on the any target interface description language file and the version information of the any target interface description language file, and releasing the any target interface description language file and the version record to the server, wherein the version record is used for viewing the version information of the current interface description language file.
In a possible implementation manner, the sending module 703, when sending the target interface description language file to the second user end, is configured to:
analyzing the target interface description language file to obtain an abstract syntax tree corresponding to the target interface description language file;
and sending the abstract syntax tree to the second user end so that the second user end traverses the abstract syntax tree to obtain an interface document corresponding to the target interface description language file.
According to the file processing device, after a data storage request initiated by a user side based on an online integrated development environment WebIDE is received, a target IDL file currently being processed can be directly stored in a server of the WebIDE, and after an acquisition request aiming at the IDL file is received, the target IDL file can be directly acquired from the server of the WebIDE in which the target IDL file is stored.
The description of the processing flow of each module in the device and the interaction flow between the modules may refer to the related description in the above method embodiments, and will not be described in detail here.
Based on the same technical concept, the embodiment of the disclosure also provides computer equipment. Referring to fig. 8, a schematic structural diagram of a computer device 800 provided in the embodiment of the present disclosure includes a processor 801, a memory 802, and a bus 803. The memory 802 is used for storing execution instructions and includes a memory 8021 and an external memory 8022; the memory 8021 is also referred to as an internal memory, and is used for temporarily storing operation data in the processor 801 and data exchanged with an external storage 8022 such as a hard disk, the processor 801 exchanges data with the external storage 8022 through the memory 8021, and when the computer apparatus 800 operates, the processor 801 communicates with the storage 802 through the bus 803, so that the processor 801 executes the following instructions:
receiving a data storage request initiated by a first user terminal, wherein the data storage request is a request generated based on a trigger operation executed on an editing page of an online integrated development environment, an editing interface of the online integrated development environment is displayed on the first user terminal, and the online integrated development environment is used for editing an interface description language file;
responding to the data storage request, acquiring a target interface description language file edited by the first user side on the editing interface, and storing the target interface description language file into a server;
and responding to an acquisition request aiming at the target interface description language file initiated by a second user end, and sending the target interface description language file to the second user end.
In a possible implementation manner, the instructions executed by the processor 801 further include, before receiving a data saving request initiated by the first user based on the editing interface of the online integrated development environment exposed by the first user:
and responding to an editing request initiated by the first user side based on the editing interface, displaying an editing template corresponding to the editing request, and loading a grammar plug-in corresponding to the editing request.
In a possible implementation manner, in an instruction executed by the processor 801, the edit request carries a target file type and a target interface type selected by the first user;
the displaying of the editing template corresponding to the editing request comprises:
acquiring a target editing template matched with the target file type and the target interface type;
displaying the obtained target editing template;
the loading of the grammar plug-in corresponding to the edit request includes:
and loading a grammar plug-in corresponding to the target interface type.
In a possible implementation manner, the instructions executed by the processor 801 further include:
responding to the sharing operation aiming at the target interface description language file, and generating an access link for acquiring the target interface description language file based on the storage position of the target interface description language file in the server;
the acquisition request for the target interface description language file, which is initiated by the second user end, is a request initiated by the second user end based on the access link.
In a possible implementation manner, the instructions executed by the processor 801 further include:
responding to a release request aiming at any one of a plurality of target interface description language files stored in a server, and determining the version information of the any one target interface description language file;
and generating a version record corresponding to any target interface description language file based on the any target interface description language file and the version information of the any target interface description language file, and releasing the any target interface description language file and the version record to the server, wherein the version record is used for viewing the version information of the current interface description language file.
In a possible implementation manner, the sending the target interface description language file to the second user side in the instructions executed by the processor 801 includes:
analyzing the target interface description language file to obtain an abstract syntax tree corresponding to the target interface description language file;
and sending the abstract syntax tree to the second user end so that the second user end traverses the abstract syntax tree to obtain an interface document corresponding to the target interface description language file.
For the specific execution process of the instruction, reference may be made to the steps of the file processing method described in the embodiments of the present disclosure, and details are not described here.
The embodiments of the present disclosure also provide a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program performs the steps of the file processing method in the above method embodiments. The storage medium may be a volatile or non-volatile computer-readable storage medium.
The computer program product of the file processing method provided in the embodiments of the present disclosure includes a computer-readable storage medium storing a program code, where instructions included in the program code may be used to execute steps of the file processing method in the above method embodiments, which may be referred to specifically for the above method embodiments, and are not described herein again.
The embodiments of the present disclosure also provide a computer program, which when executed by a processor implements any one of the methods of the foregoing embodiments. The computer program product may be embodied in hardware, software or a combination thereof. In an alternative embodiment, the computer program product is embodied in a computer storage medium, and in another alternative embodiment, the computer program product is embodied in a Software product, such as a Software Development Kit (SDK), or the like.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the system and the apparatus described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. In the several embodiments provided in the present disclosure, it should be understood that the disclosed system, apparatus, and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present disclosure may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present disclosure may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present disclosure. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Finally, it should be noted that: the above-mentioned embodiments are merely specific embodiments of the present disclosure, which are used for illustrating the technical solutions of the present disclosure and not for limiting the same, and the scope of the present disclosure is not limited thereto, and although the present disclosure is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive of the technical solutions described in the foregoing embodiments or equivalent technical features thereof within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present disclosure, and should be construed as being included therein. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

Claims (10)

1. A file processing method, comprising:
receiving a data storage request initiated by a first user terminal, wherein the data storage request is a request generated based on a trigger operation executed on an editing page of an online integrated development environment, an editing interface of the online integrated development environment is displayed on the first user terminal, and the online integrated development environment is used for editing an interface description language file;
responding to the data storage request, acquiring a target interface description language file edited by the first user side on the editing interface, and storing the target interface description language file into a server;
and responding to an acquisition request aiming at the target interface description language file initiated by a second user end, and sending the target interface description language file to the second user end.
2. The method of claim 1, wherein prior to receiving a data save request initiated by a first user based on an editing interface of an online integrated development environment exposed by the first user, the method further comprises:
and responding to an editing request initiated by the first user side based on the editing interface, displaying an editing template corresponding to the editing request, and loading a grammar plug-in corresponding to the editing request.
3. The method according to claim 2, wherein the edit request carries a target file type and a target interface type selected by the first user;
the displaying of the editing template corresponding to the editing request comprises:
acquiring a target editing template matched with the target file type and the target interface type;
displaying the obtained target editing template;
the loading of the grammar plug-in corresponding to the edit request includes:
and loading a grammar plug-in corresponding to the target interface type.
4. The method of claim 1, further comprising:
responding to the sharing operation aiming at the target interface description language file, and generating an access link for acquiring the target interface description language file based on the storage position of the target interface description language file in the server;
the acquisition request for the target interface description language file, which is initiated by the second user end, is a request initiated by the second user end based on the access link.
5. The method of claim 1, further comprising:
responding to a release request aiming at any one of a plurality of target interface description language files stored in a server, and determining the version information of the any one target interface description language file;
and generating a version record corresponding to any target interface description language file based on the any target interface description language file and the version information of the any target interface description language file, and releasing the any target interface description language file and the version record to the server, wherein the version record is used for viewing the version information of the current interface description language file.
6. The method according to claim 1, wherein said sending the target interface description language file to the second client comprises:
analyzing the target interface description language file to obtain an abstract syntax tree corresponding to the target interface description language file;
and sending the abstract syntax tree to the second user end so that the second user end traverses the abstract syntax tree to obtain an interface document corresponding to the target interface description language file.
7. A document processing apparatus, characterized by comprising:
the system comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving a data storage request initiated by a first user terminal, the data storage request is a request generated based on a trigger operation executed on an editing page of an online integrated development environment, an editing interface of the online integrated development environment is displayed on the first user terminal, and the online integrated development environment is used for editing an interface description language file;
the storage module is used for responding to the data storage request, acquiring a target interface description language file edited by the first user side on the editing interface, and storing the target interface description language file into a server;
and the sending module is used for responding to an acquisition request aiming at the target interface description language file initiated by a second user terminal and sending the target interface description language file to the second user terminal.
8. The apparatus of claim 7, further comprising:
and the editing module is used for responding to an editing request initiated by the first user terminal based on the editing interface, displaying an editing template corresponding to the editing request and loading a grammar plug-in corresponding to the editing request.
9. A computer device, comprising: a processor, a memory storing machine-readable instructions executable by the processor, the processor for executing the machine-readable instructions stored in the memory, the processor performing the steps of the document processing method according to any one of claims 1 to 6 when the machine-readable instructions are executed by the processor.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when executed by a computer device, performs the steps of the file processing method according to any one of claims 1 to 6.
CN202110045402.3A 2021-01-12 2021-01-12 File processing method and device, computer equipment and storage medium Pending CN112667224A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110045402.3A CN112667224A (en) 2021-01-12 2021-01-12 File processing method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110045402.3A CN112667224A (en) 2021-01-12 2021-01-12 File processing method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112667224A true CN112667224A (en) 2021-04-16

Family

ID=75415043

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110045402.3A Pending CN112667224A (en) 2021-01-12 2021-01-12 File processing method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112667224A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113553090A (en) * 2021-07-26 2021-10-26 网易(杭州)网络有限公司 Update control method and device for client application program
CN113590120A (en) * 2021-07-30 2021-11-02 北京有竹居网络技术有限公司 State manager generation method and device, electronic equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102520922A (en) * 2011-11-14 2012-06-27 上海交通大学 Remote development method and system under coordination environment
CN106469150A (en) * 2015-08-14 2017-03-01 阿里巴巴集团控股有限公司 File read/write method, device and system
CN109062555A (en) * 2018-06-23 2018-12-21 上海泽阳智能科技有限公司 A kind of cooperation programing system
CN110457635A (en) * 2019-08-15 2019-11-15 北京中网易企秀科技有限公司 A kind of webpage generating method and system
CN111309304A (en) * 2020-02-11 2020-06-19 北京字节跳动网络技术有限公司 Method, device, medium and electronic equipment for generating IDL file
CN111367561A (en) * 2020-03-31 2020-07-03 中国工商银行股份有限公司 Software program remote development method and device
CN111950239A (en) * 2020-08-07 2020-11-17 北京字节跳动网络技术有限公司 Schema document generation method and device, computer equipment and medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102520922A (en) * 2011-11-14 2012-06-27 上海交通大学 Remote development method and system under coordination environment
CN106469150A (en) * 2015-08-14 2017-03-01 阿里巴巴集团控股有限公司 File read/write method, device and system
CN109062555A (en) * 2018-06-23 2018-12-21 上海泽阳智能科技有限公司 A kind of cooperation programing system
CN110457635A (en) * 2019-08-15 2019-11-15 北京中网易企秀科技有限公司 A kind of webpage generating method and system
CN111309304A (en) * 2020-02-11 2020-06-19 北京字节跳动网络技术有限公司 Method, device, medium and electronic equipment for generating IDL file
CN111367561A (en) * 2020-03-31 2020-07-03 中国工商银行股份有限公司 Software program remote development method and device
CN111950239A (en) * 2020-08-07 2020-11-17 北京字节跳动网络技术有限公司 Schema document generation method and device, computer equipment and medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李孟辉: "基于web的云开发平台的研究与实现", 《硕士电子期刊》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113553090A (en) * 2021-07-26 2021-10-26 网易(杭州)网络有限公司 Update control method and device for client application program
CN113553090B (en) * 2021-07-26 2023-07-25 网易(杭州)网络有限公司 Update control method and device for client application program
CN113590120A (en) * 2021-07-30 2021-11-02 北京有竹居网络技术有限公司 State manager generation method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
JP5540160B2 (en) Program analysis / verification service providing system, control method thereof, control program, control program for causing computer to function, program analysis / verification device, program analysis / verification tool management device
US10909024B2 (en) System and method for testing electronic visual user interface outputs
US9454363B1 (en) Mobile application development system and method
Kurniawan Learning AWS IoT: Effectively manage connected devices on the AWS cloud using services such as AWS Greengrass, AWS button, predictive analytics and machine learning
US20150082298A1 (en) Packaging and deploying hybrid applications
US9753699B2 (en) Live browser tooling in an integrated development environment
US11449348B2 (en) Pre/post deployment customization
US20060265469A1 (en) XML based scripting framework, and methods of providing automated interactions with remote systems
US20140173454A1 (en) Method and system for designing, deploying and executing transactional multi-platform mobile applications
US20080052684A1 (en) Stepwise source code refactoring
WO2020015191A1 (en) Business rule releasing and managing method, electronic device and readable storage medium
US10162628B2 (en) Transactional distributed data analysis and transformation
CN112667224A (en) File processing method and device, computer equipment and storage medium
US10762285B2 (en) Methods and systems for generating electronic forms
CN110297637A (en) The applicable resource file thermogravimetric of full platform client software carries tool and method of development
CN111159099A (en) Online data generation method and device, electronic equipment and storage medium
CN110727429B (en) Front-end page generation method, device and equipment
CN111950239A (en) Schema document generation method and device, computer equipment and medium
Bugl Learning Redux
White et al. Datadeps. jl: Repeatable data setup for reproducible data science
CN107239265B (en) Binding method and device of Java function and C function
CN112685105A (en) Front-end component sharing method and device, computer equipment and storage medium
CN112988165A (en) Kubernetes-based interactive modeling method and device, electronic equipment and storage medium
CN112632333A (en) Query statement generation method, device, equipment and computer readable storage medium
CN112000334A (en) Page development method, device, server and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant after: Douyin Vision Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant before: Tiktok vision (Beijing) Co.,Ltd.

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant after: Tiktok vision (Beijing) Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant before: BEIJING BYTEDANCE NETWORK TECHNOLOGY Co.,Ltd.