CN114217813A - Resource management method and device - Google Patents
Resource management method and device Download PDFInfo
- Publication number
- CN114217813A CN114217813A CN202111357802.4A CN202111357802A CN114217813A CN 114217813 A CN114217813 A CN 114217813A CN 202111357802 A CN202111357802 A CN 202111357802A CN 114217813 A CN114217813 A CN 114217813A
- Authority
- CN
- China
- Prior art keywords
- data
- development
- code
- source code
- prompt information
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
- G06F8/42—Syntactic analysis
- G06F8/427—Parsing
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/362—Debugging of software
- G06F11/3624—Debugging of software by performing operations on the source code, e.g. via a compiler
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/74—Reverse engineering; Extracting design information from source code
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Stored Programmes (AREA)
Abstract
The present disclosure relates to a resource management method and device, and relates to the technical field of big data intelligent analysis, wherein the resource management method comprises: acquiring development source code data aiming at any micro application, wherein the development source code data is in any format; analyzing the development source code data to generate code prompt information; acquiring development data obtained by updating development source code data according to the code prompt information, and developing any micro application according to the development data to obtain and display an initial micro application after development; acquiring a debugging request aiming at the initial micro application and debugging data corresponding to the debugging request; and debugging the initial micro application according to the debugging data to obtain and display the debugged target micro application. Therefore, the method and the device can customize and develop the interface of the integrated development environment IDE, improve the efficiency and flexibility of micro application development, and simultaneously ensure the accuracy and reliability of the micro application development.
Description
Technical Field
The disclosure relates to the technical field of big data intelligent analysis, in particular to a resource management method and device.
Background
With the rapid development of the mobile internet, more and more services are performed on the network, and thus, the requirement for developing a debugging tool is increased.
In the related art, NetBeans or Code:: Blocks is generally adopted for developing debugging tools. However, in the existing development and debugging tools, the problems of incapability of adapting to the customized language grammar, low development efficiency, poor flexibility and the like exist. Therefore, how to improve the efficiency, flexibility and reliability in the development and debugging process has become an urgent problem to be solved.
Disclosure of Invention
The present disclosure provides a resource management method and apparatus, so as to at least solve the problem in the related art that accuracy, flexibility and efficiency in the resource management process cannot be ensured. The technical scheme of the disclosure is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a resource management method, including: acquiring development source code data aiming at any micro application, wherein the development source code data is in any format; analyzing the development source code data to generate code prompt information; acquiring development data obtained by updating the development source code data according to the code prompt information, and developing any micro application according to the development data to obtain and display an initial micro application after development; acquiring a debugging request aiming at the initial micro application and debugging data corresponding to the debugging request; and debugging the initial micro application according to the debugging data to obtain and display a debugged target micro application.
According to one embodiment of the disclosure, acquiring development source code data for any one micro application includes: in response to detecting a first operation for developing the any one of the micro applications, acquiring the development source code data for the any one of the micro applications according to the first operation.
According to an embodiment of the disclosure, the generating of the code prompt information for the development source code data according to the development source code data includes: performing lexical syntax analysis on the development source code data to generate a syntax tree for the development source code data; determining the type of code prompt information according to the syntax tree; and generating the corresponding code prompt information according to the code prompt information type.
According to an embodiment of the present disclosure, the parsing the development source code data to generate code hint information includes: determining code prompt label information according to the code prompt information type; acquiring a trigger position corresponding to the first operation, and judging whether the trigger position meets a code prompt information generation condition or not according to the code prompt tag information; and responding to the trigger position meeting the code prompt information generation condition, and generating the code prompt information according to the code prompt label information.
According to an embodiment of the present disclosure, after generating the corresponding code hint information, the method further includes: and displaying the code prompt information, and storing the code prompt information into a storage area in an editor.
According to an embodiment of the present disclosure, the developing any one of the micro applications according to the development data to obtain an initial micro application after development includes: compiling the development data in real time, and determining the file type of the compiled development data; responding to the file type being the first file type, synthesizing the compiled development data into a file of a target type, and storing the file of the target type in a source code directory; and in response to the file type being the second file type, directly storing the compiled development data in the source code directory.
According to an embodiment of the present disclosure, the method further comprises: in response to detecting a second operation for changing the display component of the display area, obtaining display component update data according to the second operation; and updating the display components in the display area according to the display component updating data.
According to an embodiment of the present disclosure, after the updating the display component of the display area, the method further includes: and in response to detecting a third operation for returning to the last display page, calling the last display page according to the third operation. According to an embodiment of the present disclosure, the method further comprises: and in response to the detection that the table data updating condition is met, acquiring the table data to be updated, and performing fragmentation pre-fragmentation and fragmentation storage on the table data to be updated.
According to an embodiment of the present disclosure, the method further comprises: and calling a target interface, and carrying out data transmission with the first terminal equipment and/or the second terminal equipment through the target interface.
According to a second aspect of the embodiments of the present disclosure, there is provided a resource management apparatus, the apparatus including: a first acquisition unit configured to perform acquisition of development source code data for any one of the micro applications, wherein the development source code data is in any one of formats; a generation unit configured to perform parsing of the development source code data to generate code hint information; the first display unit is configured to execute the steps of acquiring development data obtained by updating the development source code data according to the code prompt information, and developing any micro application according to the development data to obtain and display an initial micro application after development; the second acquisition unit is configured to execute the acquisition of the debugging request aiming at the initial micro application and the debugging data corresponding to the debugging request; and the second display unit is configured to debug the initial micro application according to the debugging data so as to obtain a debugged target micro application and display the debugged target micro application.
According to an embodiment of the present disclosure, the first obtaining unit is further configured to perform: in response to detecting a first operation for developing any one micro application, acquiring development source code data for the any one micro application according to the first operation; generating code prompt information aiming at the development source code data according to the development source code data; and updating the development source code data according to the code prompt information to obtain the development data.
According to an embodiment of the present disclosure, the generating unit is further configured to perform: performing lexical syntax analysis on the development source code data to generate a syntax tree for the development source code data; determining the type of code prompt information according to the syntax tree; and generating the corresponding code prompt information according to the code prompt information type.
According to an embodiment of the present disclosure, the first obtaining unit is further configured to perform: determining code prompt label information according to the code prompt information type; acquiring a trigger position corresponding to the first operation, and judging whether the trigger position meets a code prompt information generation condition or not according to the code prompt tag information; and responding to the trigger position meeting the code prompt information generation condition, and generating the code prompt information according to the code prompt label information.
According to an embodiment of the present disclosure, the management apparatus further includes: a storage unit configured to perform: and displaying the code prompt information, and storing the code prompt information into a storage area in an editor.
According to an embodiment of the present disclosure, the first presentation unit is further configured to perform: compiling the development data in real time, and determining the file type of the compiled development data; responding to the file type being the first file type, synthesizing the compiled development data into a file of a target type, and storing the file of the target type in a source code directory; and in response to the file type being the second file type, directly storing the compiled development data in the source code directory.
According to an embodiment of the present disclosure, the management apparatus further includes: a first updating unit configured to perform: in response to detecting a second operation for changing a display component of a display area, obtaining display component update data according to the second operation,
according to an embodiment of the present disclosure, the management apparatus further includes: a second updating unit configured to perform: and updating the display components in the display area according to the display component updating data.
According to an embodiment of the present disclosure, the second updating unit is further configured to, in response to detecting a third operation for returning to a previous presentation page, invoke the previous presentation page according to the third operation.
According to a third aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including: a processor; a memory for storing the processor-executable instructions; wherein the processor is configured to execute the instructions to implement the resource management method of the first aspect.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium, wherein instructions, when executed by a processor of a data management apparatus/electronic device/server, enable the data management apparatus/electronic device/server to perform the resource management method according to the first aspect.
According to a fifth aspect of embodiments of the present disclosure, there is provided a computer program product comprising computer programs/instructions, characterized in that the computer programs/instructions, when executed by a processor, implement the resource management method of the first aspect.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
the method comprises the steps of acquiring development source code data aiming at any micro application, wherein the development source code data are in any format; analyzing the development source code data to generate code prompt information; acquiring development data obtained by updating development source code data according to the code prompt information, and developing any micro application according to the development data to obtain and display an initial micro application after development; acquiring a debugging request aiming at the initial micro application and debugging data corresponding to the debugging request; and debugging the initial micro application according to the debugging data to obtain and display the debugged target micro application. Therefore, the method and the device can be used for carrying out customized development based on any micro application development request, improve the efficiency and flexibility of micro application development, and simultaneously ensure the accuracy and reliability of micro application development.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
FIG. 1 is a schematic flow chart diagram of a resource management method according to a first embodiment of the present disclosure;
FIG. 2 is a schematic flow chart diagram of a resource management method according to a second embodiment of the present disclosure;
FIG. 3 is a flowchart illustrating a resource management method according to a third embodiment of the present disclosure;
FIG. 4 is a flowchart illustrating a resource management method according to a fourth embodiment of the present disclosure;
FIG. 5 is a flowchart illustrating a resource management method according to a fifth embodiment of the present disclosure;
FIG. 6 is a flowchart illustrating a resource management method according to a sixth embodiment of the present disclosure;
FIG. 7 is a schematic diagram of a resource management system according to the present disclosure;
FIG. 8 is a schematic diagram of a communication process according to the present disclosure;
FIG. 9 is a block diagram of a resource management apparatus for implementing the resource management method of the disclosed embodiments;
FIG. 10 is a block diagram of a resource management apparatus for implementing another resource management method of the disclosed embodiments;
FIG. 11 is a block diagram of an electronic device for implementing a resource management method of an embodiment of the disclosure.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
FIG. 1 is a flow diagram illustrating a method of resource management in accordance with an exemplary embodiment. Note that, the execution subject of the resource management method of the present disclosure is a resource management apparatus. The resource management method of the embodiment of the present disclosure may be executed by the resource management apparatus of the embodiment of the present disclosure, and the resource management apparatus may specifically be a hardware device, or software in a hardware device, or the like. The hardware devices are, for example, terminal devices, servers, and the like.
As shown in fig. 1, the resource management method proposed in this embodiment includes the following steps:
in step 101, development source code data for any one of the micro applications is obtained, wherein the development source code data is in any format.
Any micro application refers to a micro application of any business type, and for example, the micro application can be a banking business micro application; also for example, it may be a shopping-like business micro-application.
In the embodiment of the disclosure, after a development request for any micro application is acquired, development source code data corresponding to the development request may be acquired.
It should be noted that, the present disclosure does not limit the specific manner of obtaining the development source code data for any micro application, and may be selected according to actual situations. For example, the user may perform a matching operation on the interactive interface to trigger a retrieval request of development source code data for any of the micro applications. Accordingly, development source code data carried by the development request can be directly read through the file listener.
The development source code data may be in any format, such as C file, Java file, and the like.
In step 102, the development source code data is parsed to generate code hint information.
In the embodiment of the application, after the development source code data is obtained, lexical syntax analysis can be performed on the development source code data to generate a syntax tree for the development source code data, a code prompt information type is determined according to the syntax tree, and corresponding code prompt information is generated according to the code prompt information type.
In step 103, development data obtained by updating the development source code data according to the code prompt information is obtained, and any micro application is developed according to the development data to obtain and display the developed initial micro application.
In the embodiment of the present disclosure, after the code prompt information is obtained, the development source code data may be updated according to the code prompt information to obtain the development data.
It should be noted that updating the development source code data is an automatic process, that is, after the development source code data changes, the updating is automatically started immediately to obtain the development data.
In the embodiment of the present disclosure, after the development data is obtained, the development data may be compiled in real time to obtain the initial micro application.
It should be noted that, when the development data is compiled in real time, a small node.js Express server provided by the webpack official, namely, the webpack-dev-server, can be utilized to compile in real time,
further, after the initial micro application is obtained, the micro application can be displayed in a corresponding display area.
For example, after the initial micro-application is obtained, the initial micro-application may be displayed on a display interface of the simulator.
In step 104, a debug request for the initial micro application and debug data corresponding to the debug request are obtained.
It should be noted that, when attempting to obtain a debugging request for the initial micro application, the debugging panel may be monitored to obtain the debugging request for the initial micro application, where the debugging request for the initial micro application includes, but is not limited to, a debug debugging request, a debugging request for viewing Console Console printing information, a resource query debugging request, a network request query debugging request, and the like.
In the embodiment of the present disclosure, after the debug request is obtained, debug data corresponding to the debug request may be obtained according to the debug request.
For example, if the debug request is debug, the data C carried by the debug request may be directly read.
In step 105, the initial micro application is debugged according to the debugging data to obtain and display the debugged target micro application.
In the embodiment of the present disclosure, after the debugging data is obtained, the initial micro application may be debugged according to the debugging data, so as to obtain the debugged target micro application.
In the debugging process, since the number of times of debugging is not fixed, the micro application subjected to the last debugging can be used as the target micro application.
Further, after the target micro application is obtained, the target micro application can be directly displayed on a display interface; or clicking a target key on the display interface and then acquiring the target micro application.
The method comprises the steps of acquiring development source code data aiming at any micro application, wherein the development source code data are in any format; analyzing the development source code data to generate code prompt information; acquiring development data obtained by updating development source code data according to the code prompt information, and developing any micro application according to the development data to obtain and display an initial micro application after development; acquiring a debugging request aiming at the initial micro application and debugging data corresponding to the debugging request; and debugging the initial micro application according to the debugging data to obtain and display the debugged target micro application. Therefore, the method and the device can customize and develop the interface of the integrated development environment IDE, improve the efficiency and flexibility of micro application development, and simultaneously ensure the accuracy and reliability of the micro application development.
FIG. 2 is a flow diagram illustrating another method of resource management in accordance with an example embodiment.
As shown in fig. 2, the resource management method proposed in this embodiment includes the following steps:
in step 201, development source code data for any one of the micro applications is obtained, wherein the development source code data is in any format.
As a possible implementation manner, as shown in fig. 3, on the basis of the foregoing embodiment, the specific process of acquiring development source code data for any micro application in step S201 includes the following steps:
in step 301, a first operation for developing any of the micro applications is detected.
Since the first operation developed for any of the micro applications is to be detected in real time, the first operation developed for any of the micro applications may optionally be detected by a file listener.
In step 302, development source code data for any of the micro applications is obtained according to a first operation.
Wherein, the first operation refers to the operation executed for developing the code data of the source. Such as input, addition, deletion, modification, etc., of development source code data.
In step 202, the development source code data is parsed to generate code hint information.
As a possible implementation manner, as shown in fig. 4, on the basis of the foregoing embodiment, the specific process of parsing the development source code data in step S202 to generate the code hint information includes the following steps:
in step 401, lexical parsing is performed on the development source code data to generate a syntax tree for the development source code data.
In the embodiment of the disclosure, when the development source code data is edited and saved, the development source code prompt processing program is started, and the development source code is subjected to syntax semantic analysis to generate a syntax tree for the development source code data.
The syntax tree refers to a graphical representation of a sentence structure, represents a derivation result of a sentence, and is beneficial to understanding the hierarchy of the sentence syntax structure.
For example, when the development source code data is lexically parsed, an syntax parser (ANTLR) may be used to perform lexical parsing so as to generate a syntax tree for the development source code data.
In step 402, a code hint information type is determined based on the syntax tree.
It should be noted that after the syntax tree is obtained, the syntax tree is added to the code hint processor for the next code hint processing, so as to determine the type of the code hint information.
For example, if the development source code data belongs to bank a, after lexical syntax analysis, the structured syntax tree a corresponding to bank a may be obtained, and after the structured syntax tree a is obtained, the structured syntax tree a may be added to the code prompt processor to perform the next code prompt processing, so as to determine the code prompt information type corresponding to bank a.
In step 403, corresponding code prompt information is generated according to the code prompt information type.
It should be noted that different code prompt information types may correspond to different code prompt information, and thus, optionally, the corresponding code prompt information may be generated according to the code prompt information type.
It should be noted that after the corresponding code prompt information is generated, only the relevant code prompt may be displayed according to the corresponding code prompt information type, which is beneficial for the developer to quickly find the required code prompt.
As a possible implementation manner, as shown in fig. 5, on the basis of the foregoing embodiment, the specific process of generating the corresponding code hint information according to the type of the code hint information in step S403 includes the following steps:
in step 501, code hint tag information is determined based on the type of code hint information.
In the embodiment of the present disclosure, after the type of the code hint information is obtained, the code hint tag information may be further determined. The code hint tag information may include, but is not limited to, component tags, attribute tag values, and the like.
In step 502, a trigger position corresponding to the first operation is obtained, and whether the trigger position meets a code prompt information generation condition is judged according to the code prompt tag information.
And the trigger position corresponding to the first operation refers to the row position where the first operation is located.
It should be noted that after the trigger position corresponding to the first operation is acquired, whether the trigger position meets the code prompt information generation condition or not can be determined according to the code prompt tag information, that is, whether the trigger position meets the tag specification or not is determined.
In step 503, in response to the trigger position satisfying the code hint information generation condition, code hint information is generated according to the code hint tag information.
In the embodiment of the present disclosure, in response to the trigger position satisfying the code prompt information generation condition, that is, the trigger position satisfying the tag specification, the code prompt information may be generated according to the code prompt tag information.
Correspondingly, after the code prompt information is generated, the code prompt information can be displayed in a code prompt box in the display area.
Further, after the corresponding code prompt information is generated, the code prompt information can be displayed and stored in a storage area in the editor.
In step 203, development data obtained by updating the originating code data according to the code prompt information is obtained, and any micro application is developed according to the development data to obtain an initial micro application after development and display the initial micro application.
As a possible implementation manner, as shown in fig. 6, on the basis of the foregoing embodiment, the specific process of developing any micro application according to the development data in step S203 to obtain an initial micro application after development includes the following steps:
in step 601, the development data is compiled in real time, and the file type of the compiled development data is determined.
Optionally, after the development data is obtained, the development data can be compiled in real time by using the lightweight server webpack-dev-server.
After the development data is acquired, the file type of the compiled development data needs to be determined, so that the compiled development data can be subjected to processes such as synthesis, conversion, copy migration and the like in the following process. The file type may be a first file type and a second file type.
In step 602, in response to the file type being the first file type, the compiled development data is synthesized into a file of a target type and stored in the source code directory.
In the embodiment of the present disclosure, when the file type is the first file type, the compiled development data is synthesized into a file of the target type and stored in the source code directory. The first file type includes, but is not limited to, Page/Component (ccbml, ccbss, js, json), etc.
For example, when the file type is json, the compiled development data is synthesized into the vue file type and is stored in a source code directory, namely, a src directory to be compiled.
In step 603, in response to the file type being the second file type, the compiled development data is directly stored in the source code directory.
In the embodiment of the present disclosure, when the file type is the second file type, the compiled development data is directly stored in the source code directory. The second file type includes, but is not limited to, a single js file, a picture file (png/jpg/gif), a font file (ttf/otf/eot), a media file (mp3/wav/mp4), and the like.
For example, when the file type is jpg, the compiled development data is directly stored in a source code directory, that is, a src directory to be compiled.
In step 204, a debug request for the initial micro application and debug data corresponding to the debug request are obtained.
It should be noted that step 204 is identical to step 104 of the above embodiment, and is not described herein again.
In step 205, the initial micro application is debugged according to the debugging data to obtain and display the debugged target micro application.
It should be noted that step 205 is identical to step 105 of the above embodiment, and is not described herein again.
Further, steps 206-207 can be executed in the present disclosure to detect the second operation and update data according to the second operation.
In step 206, in response to detecting a second operation for changing the display component of the display area, update data of the display component is obtained according to the second operation.
It should be noted that the display area may provide the developer with the implementation of the native interface in the front-end framework, and similar to the mobile phone client, when the second operation for changing the display component in the display area is detected, the update data of the display component may be obtained according to the second operation.
It should be noted that the second operation may be setting the title content of the presentation component in the presentation area, setting the font color of the presentation component in the presentation area, hiding and displaying the title bar of the presentation component in the presentation area, displaying and hiding the return key of the presentation component in the presentation area, and supporting that clicking the return key supports returning to the last page, and the like.
For example, when the second operation is to set the title content of the display element in the display area, the update data of the display element may be obtained according to the second operation.
In step 207, the display components of the display area are updated according to the display component update data.
It should be noted that, after obtaining the update data of the presentation component, the target interface may be called, and data transmission is performed with the first terminal device and/or the second terminal device through the target interface, where the first terminal device and the second terminal device include, but are not limited to, H5, Native, and so on.
Optionally, data transmission may be performed with the first terminal device through the target interface; optionally, data transmission may be performed with the second terminal device through the target interface; optionally, data transmission between the first terminal device and the second terminal device may be implemented through the target interface.
For example, jsbridge (javascript bridge) can be used as a bridge for H5 and/or Native communication, so as to implement bidirectional communication between H5 and Native, and further implement data transmission.
In the embodiment of the application, after the update data of the display component is acquired, the display component in the display area can be updated.
Further, after the display component of the display area is updated, in response to detecting a third operation for returning to the previous display page, the previous display page is called according to the third operation.
For example, when a return key of a presentation component of the presentation area is detected to be clicked, the return key can be clicked to return to the last page of the page.
The resource management method proposed by the present disclosure is explained below with reference to the resource management system shown in fig. 7.
It should be noted that the resource management system proposed by the present disclosure is equivalent to a development tool, and is also a graphical interface software. In order to meet the development function interface requirements of multiple functions, save development cost, shorten development period and ensure development performance, a set of graphical interfaces can be selected as a basic interface, and the basic interface is customized and developed.
For example, desktop application software developed by using Java language based Eclipse RCP rich client development platform can be used as a basic interface to provide rich interface graphics library SWT (standard Widget toolkit), wherein SWT directly calls graphics library of the operating system, so that appearance and feeling of Java application program are completely consistent with habit of the operating system, and advantages of the plug-in system are fully exerted, and the platform is used as guidance for best practice of building the plug-in system based on osgi (open Service Gateway initiative).
Wherein the resource management system comprises a visualization front-end and a data processing end (back-end), the visualization front-end is shown in fig. 7, and the data processing end is not shown in fig. 7.
As shown in fig. 7, the visualization front end mainly includes: navigation views, editors, simulators, toolbars, menu bars, debugging panels, etc.; the data processing end mainly comprises: a compiler, etc.
The navigation view can display project engineering files in a tree form. Furthermore, different file types can be displayed through different icons, so that developers can know the file condition of the project engineering at a glance. Meanwhile, the functions of rapidly searching files in the project, supporting files in the associated editor, and supporting right-key directory/file creation, directory name/file name modification, directory/file deletion, file location opening and the like are supported.
The editor has rich code prompts, label attribute prompts, api prompts, grammar highlighting, keyword coloring, content formatting and the like related to micro applications, and the type selection of the editor can be any one of the following editors: ccbml editor, ccbss editor, js editor, json editor, etc.
In the case that a user starts a code prompt processing program when the code editor edits and stores the code, the source code undergoes ANTLR-entered syntactic semantic analysis, then a CCBML structured syntax tree is output, and the output structured syntax tree is added to the code prompt processor to perform next code prompt processing.
Alternatively, the code hint processor can read a profile of custom tags. Furthermore, after a series of configuration files are read, a cache structure can be constructed, a keyboard monitoring event is added into the code editor, a user triggers a key event and then carries out event processing, the source of event triggering is judged, and the line position of the event triggering is judged.
It should be noted that the compiler may integrate webpack as a construction tool, compile and package micro application items in real time, debug a panel, support to examine simulator page elements, support debug debugging, view Console printing information, support resource query, support network request query, and the like, where the simulator is a display area of the micro application provided by the present disclosure.
Therefore, the resource management system provided by the present disclosure enables a developer to edit codes on the right code editor and preview effects on the left simulator in real time by compiling and packaging project codes in a suitable format in real time for use by a browser.
Further, in order to realize bidirectional data transmission and improve data transmission efficiency, the first terminal device (H5) and the second terminal device (Native) can be realized by using JSBridge in an integrated development environment for data transmission. The simulator acts as a mobile phone client, and provides the developer with the implementation of a Native interface in a front-end framework, for example, the developer needs to obtain user information of a current login user, or invokes the front-end framework to initiate a network request, and the like, and JSBridge is a bridge for communication between H5 and Native, and is used for implementing two-way communication between H5 and Native. Among them, the communication process of H5 with IDE (resource management system) is shown in fig. 8.
The working process of JSBridge is explained below.
As shown in fig. 8, optionally, a CCBML page writing style may be performed, and a JS writing trigger behavior corresponding to the CCBML page calls a front-end framework API (where ccb is an object provided by the front-end framework).
Furthermore, monitoring can be added in a CefBrowserclient, addMessageRouter and other modes, a callback of the JS file is obtained through onQuery and other methods, and a Native method is called in the callback method to realize registration monitoring and response monitoring.
Furthermore, the specified class method can be dynamically called through a Java reflection mechanism according to the class name and the method name in the communication protocol, and data is returned to the front end H5 through CefBrowserclient.
Therefore, the method and the system can be customized and developed based on the development request of any micro application, and get rid of the constraint of a general system on the aspects of language, functions, authentication modes and the like. Meanwhile, the user-defined syntax semantics can be analyzed, so that functions such as code prompting, user-defined label detection and the like are performed, the development efficiency is improved, and the effect of editing and previewing is realized through the simulator and the debugging panel of the embedded component. Further, developers of different platforms can cooperatively develop the same set of codes based on the characteristics of the cross-platform.
FIG. 9 is a block diagram illustrating a resource management apparatus in accordance with an example embodiment.
As shown in fig. 9, the resource management apparatus 900 includes: a first acquiring unit 901, a generating unit 902, a first presenting unit 903, a second acquiring unit 904, and a second presenting unit 905.
The first obtaining unit 901 is configured to perform obtaining development source code data for any micro application, wherein the development source code data is in any format;
the generating unit 902 is configured to perform parsing of the development source code data to generate code hint information;
the first display unit 903 is configured to perform acquiring development data obtained by updating the development source code data according to the code prompt information, and develop any one of the micro applications according to the development data to obtain and display an initial micro application after development;
the second obtaining unit 904 is configured to perform obtaining a debugging request for the initial micro application and debugging data corresponding to the debugging request;
the second display unit 905 is configured to debug the initial micro application according to the debugging data, so as to obtain a debugged target micro application and display the target micro application.
The method comprises the steps of acquiring development source code data aiming at any micro application, analyzing the development source code data in any format to generate code prompt information; acquiring development data obtained by updating development source code data according to the code prompt information, and developing any micro application according to the development data to obtain and display an initial micro application after development; and acquiring a debugging request aiming at the initial micro application and debugging data corresponding to the debugging request, and debugging the initial micro application according to the debugging data to obtain and display the debugged target micro application. Therefore, the method and the device can be used for carrying out customized development based on any micro application development request, improve the efficiency and flexibility of micro application development, and simultaneously ensure the accuracy and reliability of micro application development.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
FIG. 10 is a block diagram illustrating another resource management apparatus in accordance with an example embodiment.
As shown in fig. 10, the data management apparatus 1000 includes: a first acquiring unit 1001, a generating unit 1002, a first presenting unit 1003, a second acquiring unit 1004, a second presenting unit 1005, a first updating unit 1006, and a second updating unit 1007.
The first acquiring unit 1001 is configured to perform acquisition of development source code data for any one of the micro applications, wherein the development source code data is in any one of the formats;
the generating unit 1002 is configured to perform parsing of the development source code data to generate code hint information;
the first display unit 1003 is configured to perform acquiring development data obtained by updating the development source code data according to the code prompt information, and develop any one of the micro applications according to the development data to obtain and display an initial micro application after development;
the second obtaining unit 1004 is configured to obtain a debugging request for the initial micro application and debugging data corresponding to the debugging request;
the second presentation unit 1005 is configured to perform debugging on the initial micro application according to the debugging data, so as to obtain a debugged target micro application and perform presentation.
The first updating unit 1006 is configured to execute, in response to detecting a second operation for changing the display component of the display area, obtaining display component update data according to the second operation;
the second updating unit 1007 is configured to update the display components of the display area according to the display component update data.
The method comprises the steps of obtaining development source code data aiming at any micro application, analyzing the development source code data to generate code prompt information, obtaining development data obtained after updating the development source code data according to the code prompt information, developing any micro application according to the development data to obtain and display an initial micro application after development, obtaining a debugging request aiming at the initial micro application and debugging data corresponding to the debugging request, debugging the initial micro application according to the debugging data to obtain and display a target micro application after debugging, and finally obtaining and updating display component updating data according to a second operation when a second operation of changing the display component in a display area is detected, and updating the display component in the display area according to the display component updating data. Therefore, the method and the device can be customized and developed based on the development request of any micro application, can support the instant update of data, and ensure the accuracy, flexibility and reliability in the micro application development process.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
In order to implement the above embodiments, the present disclosure further provides an electronic device, as shown in fig. 11, where the electronic device 1100 includes: a processor 1101; one or more memories 1102 for storing instructions executable by the processor 1101; wherein the processor 1101 is configured to execute the data management method of the above embodiment. The processor 1101 and the memory 1102 are connected by a communication bus.
In an exemplary embodiment, the present disclosure also provides a computer-readable storage medium comprising instructions, such as the memory 1102 comprising instructions, executable by the processor 1101 of the data management device to perform the above-described method. Alternatively, the computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
In an exemplary embodiment, there is also provided a computer program product comprising a computer program, characterized in that the computer program, when executed by a processor, implements the resource management method of the above-described embodiment.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims (21)
1. A method for resource management, comprising:
acquiring development source code data aiming at any micro application, wherein the development source code data is in any format;
analyzing the development source code data to generate code prompt information;
acquiring development data obtained by updating the development source code data according to the code prompt information, and developing any micro application according to the development data to obtain and display an initial micro application after development;
acquiring a debugging request aiming at the initial micro application and debugging data corresponding to the debugging request;
and debugging the initial micro application according to the debugging data to obtain and display a debugged target micro application.
2. The resource management method of claim 1, wherein the obtaining development source code data for any one of the micro applications comprises:
in response to detecting a first operation for developing the any one of the micro applications, acquiring the development source code data for the any one of the micro applications according to the first operation.
3. The resource management method of claim 1, wherein parsing the development source code data to generate code hint information comprises:
performing lexical syntax analysis on the development source code data to generate a syntax tree for the development source code data;
determining the type of code prompt information according to the syntax tree;
and generating the corresponding code prompt information according to the code prompt information type.
4. The method according to claim 3, wherein the generating the corresponding code hint information according to the code hint information type comprises:
determining code prompt label information according to the code prompt information type;
acquiring a trigger position corresponding to the first operation, and judging whether the trigger position meets a code prompt information generation condition or not according to the code prompt tag information;
and responding to the trigger position meeting the code prompt information generation condition, and generating the code prompt information according to the code prompt label information.
5. The resource management method according to any one of claims 1 to 4, further comprising, after the generating the code hint information:
and displaying the code prompt information, and storing the code prompt information into a storage area in an editor.
6. The method according to claim 1, wherein the developing any one of the micro applications according to the development data to obtain an initial micro application after development comprises:
compiling the development data in real time, and determining the file type of the compiled development data;
responding to the file type being the first file type, synthesizing the compiled development data into a file of a target type, and storing the file of the target type in a source code directory;
and in response to the file type being the second file type, directly storing the compiled development data in the source code directory.
7. The method of resource management according to claim 1, wherein the method further comprises:
in response to detecting a second operation for changing the display component of the display area, obtaining display component update data according to the second operation;
and updating the display components in the display area according to the display component updating data.
8. The method for resource management according to claim 7, wherein after the updating the display component of the display area, further comprising:
and in response to detecting a third operation for returning to the last display page, calling the last display page according to the third operation.
9. The method of resource management according to claim 7, wherein the method further comprises:
and calling a target interface, and carrying out data transmission with the first terminal equipment and/or the second terminal equipment through the target interface.
10. A resource management apparatus, comprising:
a first obtaining module configured to perform obtaining development source code data for any one of the micro applications, wherein the development source code data is in any one of the formats;
a generation module configured to perform parsing of the development source code data to generate code hint information;
the first display module is configured to execute the steps of obtaining development data obtained by updating the development source code data according to the code prompt information, and developing any micro application according to the development data to obtain and display an initial micro application after development;
the second acquisition module is configured to execute the acquisition of the debugging request aiming at the initial micro application and the debugging data corresponding to the debugging request;
and the second display module is configured to debug the initial micro application according to the debugging data so as to obtain a debugged target micro application and display the debugged target micro application.
11. The resource management apparatus of claim 10, wherein the first obtaining module is further configured to:
in response to detecting a first operation for developing the any one of the micro applications, acquiring development source code data for the any one of the micro applications according to the first operation.
12. The resource management apparatus of claim 10, wherein the generating module is further configured to:
performing lexical syntax analysis on the development source code data to generate a syntax tree for the development source code data;
determining the type of code prompt information according to the syntax tree;
and generating the corresponding code prompt information according to the code prompt information type.
13. The resource management apparatus of claim 12, wherein the first obtaining module is further configured to:
determining code prompt label information according to the code prompt information type;
acquiring a trigger position corresponding to the first operation, and judging whether the trigger position meets a code prompt information generation condition or not according to the code prompt tag information;
and responding to the trigger position meeting the code prompt information generation condition, and generating the code prompt information according to the code prompt label information.
14. The resource management apparatus as in any of claims 11-13, further comprising:
and the storage module is used for displaying the code prompt information and storing the code prompt information into a storage area in an editor.
15. The asset management device of claim 10, wherein the first presentation module is further configured to:
compiling the development data in real time, and determining the file type of the compiled development data;
responding to the file type being the first file type, synthesizing the compiled development data into a file of a target type, and storing the file of the target type in a source code directory;
and in response to the file type being the second file type, directly storing the compiled development data in the source code directory.
16. The resource management apparatus of claim 10, further comprising:
the display device comprises a first updating module, a second updating module and a display module, wherein the first updating module is used for responding to the detection of a second operation for changing a display component in a display area, and then acquiring display component updating data according to the second operation;
and the second updating module is used for updating the display component in the display area according to the display component updating data.
17. The resource management apparatus of claim 16, wherein the second update module is further configured to:
and in response to detecting a third operation for returning to the last display page, calling the last display page according to the third operation.
18. The resource management apparatus of claim 16 further comprising:
and the calling module is used for calling the target interface and carrying out data transmission with the first terminal equipment and/or the second terminal equipment through the target interface.
19. An electronic device, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the resource management method of any one of claims 1-9.
20. A computer-readable storage medium, whose instructions, when executed by a processor of a data management apparatus/electronic device/server, enable the data management apparatus/electronic device/server to perform the resource management method of any one of claims 1-9.
21. A computer program product comprising computer programs/instructions, characterized in that the computer programs/instructions, when executed by a processor, implement the resource management method of any of claims 1-9.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202111357802.4A CN114217813A (en) | 2021-11-16 | 2021-11-16 | Resource management method and device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202111357802.4A CN114217813A (en) | 2021-11-16 | 2021-11-16 | Resource management method and device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN114217813A true CN114217813A (en) | 2022-03-22 |
Family
ID=80697326
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202111357802.4A Pending CN114217813A (en) | 2021-11-16 | 2021-11-16 | Resource management method and device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN114217813A (en) |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20090178031A1 (en) * | 2008-01-09 | 2009-07-09 | Kan Zhao | Method and System for presenting and analyzing software source code through intermediate representation |
| CN110659021A (en) * | 2019-11-29 | 2020-01-07 | 南京百敖软件有限公司 | Development and test system for micro application in mobile terminal |
| CN111176629A (en) * | 2019-12-24 | 2020-05-19 | 中国建设银行股份有限公司 | Application development method and device |
-
2021
- 2021-11-16 CN CN202111357802.4A patent/CN114217813A/en active Pending
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20090178031A1 (en) * | 2008-01-09 | 2009-07-09 | Kan Zhao | Method and System for presenting and analyzing software source code through intermediate representation |
| CN110659021A (en) * | 2019-11-29 | 2020-01-07 | 南京百敖软件有限公司 | Development and test system for micro application in mobile terminal |
| CN111176629A (en) * | 2019-12-24 | 2020-05-19 | 中国建设银行股份有限公司 | Application development method and device |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US12086535B2 (en) | Systems and methods of a script generation engine | |
| JP5911594B2 (en) | Providing translation support for application localization | |
| US9170782B2 (en) | Extensible mechanism for providing suggestions in a source code editor | |
| JP5086183B2 (en) | Enhanced widget composition platform | |
| US8065667B2 (en) | Injecting content into third party documents for document processing | |
| EP1526448A1 (en) | Method and computer system for document authoring | |
| US10666744B2 (en) | Managing discovery and selection of service interface specifications | |
| CN114153459A (en) | Interface document generation method and device | |
| CN114217789A (en) | Function component expansion method, device, equipment, storage medium and program product | |
| CN113051514B (en) | Element positioning method and device, electronic equipment and storage medium | |
| CN115599386A (en) | Code generation method, device, equipment and storage medium | |
| CN112328219A (en) | Service access processing method, device and system and computer equipment | |
| CN113032273A (en) | Application program debugging method and device, computer equipment and storage medium | |
| CN112506854A (en) | Method, device, equipment and medium for storing page template file and generating page | |
| CN109857462A (en) | Background Docker task mapping method of remote sensing image visual editor | |
| CN121008828A (en) | Permission configuration methods and devices | |
| CN119149060B (en) | Artificial intelligence assistant injection method, device, equipment and computer readable medium | |
| CN112947984B (en) | Application program development method and device | |
| US20080016488A1 (en) | Output styling in an IDE console | |
| WO2025161303A1 (en) | Browser-side web interface analysis method and apparatus | |
| CN114217813A (en) | Resource management method and device | |
| CN113687880B (en) | Method, device, equipment and medium for calling component | |
| US7900191B1 (en) | System and method of using an active link in a state programming environment to locate an element in a graphical programming environment | |
| CN115061835A (en) | Method and device for determining method call relation | |
| KR100948472B1 (en) | Automatic updating of variables in the data language |
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 |