CN109800020B - Automatic code adjusting method, device, equipment and medium for program development - Google Patents
Automatic code adjusting method, device, equipment and medium for program development Download PDFInfo
- Publication number
- CN109800020B CN109800020B CN201910107623.1A CN201910107623A CN109800020B CN 109800020 B CN109800020 B CN 109800020B CN 201910107623 A CN201910107623 A CN 201910107623A CN 109800020 B CN109800020 B CN 109800020B
- Authority
- CN
- China
- Prior art keywords
- program
- development tool
- program development
- processing
- adjustment
- 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.)
- Active
Links
Images
Landscapes
- Stored Programmes (AREA)
Abstract
The embodiment of the disclosure discloses a code automatic adjustment method and device for program development, a terminal device and a storage medium. The method comprises the steps of determining an adjustment strategy of a program development tool according to a preset rule in the development process of the small program, and processing the developed program by adopting the program development tool according to the adjustment strategy so that the environment program supports the small program processed by the program development tool. In the small program development process, the program developed by the small program is processed by the program development tool according to the adjustment strategy, so that the environment program supports the small program processed by the program switch tool, and meanwhile, the small program can use the program development tool, the complexity in the small program development process is reduced, the operation difficulty of a program developer is reduced, and the development efficiency of the small program is improved.
Description
Technical Field
The disclosed embodiments relate to computer software technologies, and in particular, to a method, an apparatus, a device, and a medium for automatically adjusting a code for program development.
Background
With the popularization of intelligent terminals, application software (APP) with various functions is gradually increased, and the functions of the APP are also in continuous upgrade and update. The APP client typically requires the user to download software to the terminal, install it, and then run it. In order to adapt to different functional requirements, applets are also currently emerging. The applet is characterized by the capability of implementing certain business functions, but the applet does not require the user to download separate software locally, install and reuse. The applet is usually implemented by using some application software in some APP client or terminal as an operating platform, and the application software supporting the applet to operate is recorded as an environment program. For example, the applet of the WeChat is realized by taking a WeChat client as an operation platform, and the WeChat client is an environment program of the applet of the WeChat. And the small program developer completes development by developing each page required to be displayed by the small program.
Because the small program is supported and operated by the environment program, the environment program restricts the development of the small program, and particularly, some software tools cannot be used and cannot use mature development tools, so that the operation of a program developer is limited, and the program development efficiency is also reduced.
Disclosure of Invention
The embodiment of the disclosure provides a code automatic adjustment method, a device, equipment and a medium for program development, so that an applet can use some program development tools, is still compatible with an environmental program and can normally run.
In a first aspect, an embodiment of the present disclosure provides an automatic code adjustment method for program development, where the method includes:
in the small program development process, determining an adjustment strategy of a program development tool according to a preset rule;
and processing the developed program by adopting a program development tool according to the adjustment strategy so that the environmental program supports the small program processed by the program development tool.
In a second aspect, an embodiment of the present disclosure further provides an automatic code adjustment apparatus for program development, including:
the adjustment strategy determining module is used for determining an adjustment strategy of a program development tool according to a preset rule in the small program development process;
and the processing module is used for processing the developed program by adopting a program development tool according to the adjustment strategy so as to enable the environmental program to support the small program processed by the program development tool.
In a third aspect, an embodiment of the present disclosure further provides a terminal device, including:
one or more processors;
a memory for storing one or more programs;
when the one or more programs are executed by the one or more processors, the one or more processors are enabled to implement the code automatic adjustment method for program development according to any of the first aspect of the embodiments of the present disclosure.
In a fourth aspect, the disclosed embodiments also provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a code automatic adjustment method of program development according to any of the first aspect of the disclosed embodiments.
According to the technical scheme provided by the embodiment of the disclosure, in the development process of the small program, the developed program of the small program is processed through the program development tool according to the adjustment strategy, so that the environment program supports the small program processed by the program switch tool, and meanwhile, the small program can use the program development tool, the complexity in the development process of the small program is reduced, the operation difficulty of a program developer is reduced, and the development efficiency of the small program is improved.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, a brief description will be given below to the drawings required for the embodiments or the technical solutions in the prior art, and it is obvious that the drawings in the following description are some embodiments of the present disclosure, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic flowchart of a method for automatically adjusting code for program development according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of a method for automatically adjusting codes of program development according to a second embodiment of the present disclosure;
fig. 3 is a schematic flowchart of another method for automatically adjusting codes of program development according to a second embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of an automatic code adjustment apparatus for program development according to a fourth embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a terminal device according to a fifth embodiment of the present disclosure.
Detailed Description
To make the objects, technical solutions and advantages of the present disclosure clearer, the technical solutions of the present disclosure will be clearly and completely described below through embodiments with reference to the accompanying drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are some, but not all embodiments of the present disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
In the following embodiments, optional features and examples are provided in each embodiment, and various features described in the embodiments may be combined to form a plurality of alternatives, and each numbered embodiment should not be regarded as only one technical solution.
The embodiment of the disclosure provides a code automatic adjustment method and device for program development, a terminal device and a storage medium, which can realize that in the development process of an applet, the applet is adjusted by a program development tool according to an adjustment strategy, so that the applet can use the program development tool while an environment program supports the applet processed by a program switching tool, the complexity in the development process of the applet is reduced, the operation difficulty of a program developer is reduced, and the development efficiency of the applet is improved.
Example one
Fig. 1 is a schematic flowchart of a method for automatically adjusting a code of program development according to an embodiment of the present disclosure. The method disclosed by the embodiment of the disclosure is mainly suitable for the condition that a program development tool is not suitable in the small program development process. Specifically, the method may be implemented by a code automatic adjustment device developed by a program. As shown in fig. 1, the method specifically includes the following steps:
and S110, determining an adjustment strategy of the program development tool according to a preset rule in the small program development process.
Specifically, an applet is a program that enables a certain business function without requiring the user to download separate software to the local site and install it for reuse. Generally, an applet can serve as an operation platform through an APP, for example, the applet can be an applet, the operation platform can be a wechat APP, and the applet realizes the operation of the applet by taking a wechat client as the operation platform. Thus, the running platform of the applet is different from that of the APP and the web page. The running platform of the APP can be an operating system of the terminal device, the running platform of the webpage can be a browser, and the running platform of the applet can be a certain APP. Due to different running platforms, the interaction between the running program and the corresponding running platform is also different. For example, the APP and the operating system interact through a pre-configured protocol, and when the APP runs, the operating system analyzes the request of the APP according to the protocol to configure resources for the running of the APP, so that the running of the APP is realized. And the applet and the APP of the running platform realize interaction through another pre-configured protocol, and in the running process of the applet, the APP analyzes the request of the applet according to the protocol and configures resources which can be controlled by the applet for the applet, thereby realizing the running of the applet. Therefore, the interaction between the APP and the operating system is different from the interaction between the APP and the applet, and the corresponding program statements and the like are also different.
In the process of developing APP and webpage programs, mature program development tools can be used, so that the difficulty of developers in the development process is reduced, and the development efficiency is improved. Applets typically complete development by developing the individual pages that the applet needs to expose. Because the program statements of the APP, the program statements of the webpage and the program statements of the applet are different, some program development tools used in the process of developing the APP and the webpage programs cannot be compatible with the program statements of the applet, so that an adjustment strategy for the program development tools can be determined according to a certain preset rule, the program statements of the applet can be adjusted in the development process of the applet, and the program development tools can be compatible with the applet. That is, the function development tool can be applied to development of an applet, a program statement of the applet processed by the program development tool can be run in an environment program, and the environment program can support the applet using the program development tool.
The preset rule is a preset rule for setting a corresponding relationship between the situation of a program statement developed by an applet and an adjustment policy during automatic adjustment. For example, the preset rule may be an adjustment policy corresponding to different conditions when the program development tool processes a program statement of the applet. The adjustment policy may adjust a specific adjustment rule of a program statement of the applet for the program development tool so that the environment program supports the applet processed by the program development tool. For example, when the program statement of the applet includes a code that is not compatible with the environment program, the corresponding adjustment policy may be a replacement policy, so that the code that is not compatible with the environment program in the program statement of the applet is replaced with a code that is compatible with the environment program without affecting the function of the program statement.
Generally, a function may include a web page version, an APP version, and an applet version. When different versions of a function implement the same function, the corresponding program statements are different. Illustratively, the syntax and timing rules in the program statements may be different. For example, code representing a suffix name and a variable name of the same variable may differ in program statements of different versions of the same program depending on syntax. The adjustment strategy may be to fill characters recognized by one protocol in a program statement with characters recognized by another protocol. For example, it is possible to replace code such as a suffix name and a variable name of a program statement with code such as a suffix name and a variable name compatible with an environment program. And the program development tool adjusts the program statements of the small program through the adjustment strategy, so that the developed program processed by the program development tool can be supported by the environment program.
It should be noted that the adjustment policy of the program development tool is determined by a preset rule. When the preset rule changes, the adjustment strategy also changes correspondingly.
And S120, processing the developed program by adopting a program development tool according to the adjustment strategy so that the environmental program supports the small program processed by the program development tool.
In particular, the environment program may be an APP. In the running process of the small program, the environment program analyzes the request of the small program according to the protocol and configures the resources which can be controlled by the environment program for the small program, thereby realizing the running of the small program. The program development tool is a tool used in the program development process, can process the developed program and improve the efficiency of program development. For example, webpack is a program development tool of a modern JavaScript application static module packer, and can be used for packing and compressing a modern JavaScript application, so that the program loading speed is increased, and the flow is saved. When the webpack is directly applied to program development, the development of the webpack function during program development can be reduced, and the efficiency of program development is further improved.
After the adjustment strategy is determined according to the preset rule, the program development tool processes the program statement of the developed program of the applet according to the adjustment strategy, so that the environment program supports the applet processed by the program development tool, and therefore the program development tool can be applied to the applet, the difficulty of developers in the development process is reduced, and the development efficiency of the applet is improved.
According to the technical scheme of the embodiment of the disclosure, in the development process of the small program, the developed program of the small program is processed through the program development tool according to the adjustment strategy, so that the environment program supports the small program processed by the program switching tool, and meanwhile, the small program can use the program development tool, the complexity in the development process of the small program is reduced, the operation difficulty of a program developer is reduced, and the development efficiency of the small program is improved.
Example two
On the basis of the first embodiment, the second embodiment exemplarily shows a case where an adjustment policy is determined according to a preset rule. The adjustment strategy is that the program development tool performs adjustment after preprocessing the developed program. Fig. 2 is a schematic flowchart of a code automatic adjustment method for program development according to a second embodiment of the present disclosure. As shown in fig. 2, specifically, step S120 in fig. 1 may include:
and S121, processing the developed program by adopting a program development tool in advance according to the adjustment strategy.
Specifically, the program development tool preprocesses a developed program in the applet, and in the preprocessing process, the program development tool processes the developed program of the applet, so that the program development efficiency is improved. For example, the program development tool is webpack, and the webpack packs and compresses programs developed by applets, so that the loading speed of the applets is increased, and meanwhile, the flow is saved.
And S122, monitoring and acquiring the changed data in the processing process of the program development tool.
Specifically, after determining the tuning strategy, the program development tool may listen to the programs that the applet has developed according to the tuning strategy. That is, the program development tool responds to the program developed by the applet according to the adjustment strategy to determine the data that the program development tool needs to change. For example, the adjustment policy is a replacement policy, and in the process of specifically processing the developed program of the applet by the program development tool, the developed program of the applet needs to be monitored according to the replacement policy to obtain data that needs to be changed.
In general, the data to be changed may include various types. Illustratively, the change data may be a run variable. For example, the run variable height representing the same semantic meaning is Windows height in a web version of the program and global height in an applet. The semantics of the operating variables of the two are the same, and the operating variables are different in program statements of different versions. In order to replace the running variables of the web page version with the running variables which can be identified to be compatible by the applet, windows needs to be replaced with global, so the running variable height is the changed data.
For example, when the program development tool is webpack, the monitoring and acquiring the change data in the process of the program development tool may include:
and receiving the changed data information reported in the webpack processing process, and determining changed data according to the changed data information.
Specifically, in the webpack processing process, the webpack monitors the program and reports the changed data information. The webpack can determine changed data according to the changed data information reported in the webpack processing process. For example, the changed data information reported in the webpack processing process may be data information that cannot be supported by the environment program in the developed applet, and the data where the changed data information is located is changed data. Or, the changed data information reported in the webpack processing process may also be information of changed data in the adjustment policy, and the changed data is determined according to the information of changed data in the adjustment policy.
And S123, adjusting the changed data according to the adjustment strategy.
And after the changed data is determined, adjusting the changed data according to the adjusting strategy. For example, the adjustment policy is a replacement policy, and after the changed data that needs to be replaced is determined, the changed data is replaced, so that the changed data after replacement enables the developed program processed by the program development tool to be supported by the environment program.
Exemplarily, fig. 3 is a schematic flowchart of another method for automatically adjusting code for program development according to a second embodiment of the present disclosure. As shown in fig. 3, when the program development tool is webpack, the step S123 in fig. 2 may include the following steps:
and S1231, identifying an operation variable in the changed data, wherein the operation variable is a variable required when the environment program operates the page of the applet.
Specifically, when the environment program runs the page of the applet, the applet needs to be analyzed and identified, so that the applet can run normally. In the process, the variable which the environment program needs to identify is the running variable.
And S1232, replacing the operation variables which are not supported by the environment program with the operation variables which are supported by the environment program.
Specifically, the unsupported running variable is a web page object variable, and the supported running variable is an object variable supported when the application software is used as an environment program. The object may be a control handle or a pointer for allocating resources when the computing device is running. The object name is used for uniformly managing resources, such as a cache space, a process and the like, which are distributed to the small program by the computing equipment.
According to the technical scheme of the embodiment, in the development process of the small program, the developed program is preprocessed through the program development tool, the change data in the preprocessing process is monitored and obtained, the change data is adjusted according to the adjustment strategy, so that the small program can use the program development tool while the environment program supports the small program adjusted according to the adjustment strategy, the complexity in the development process of the small program is reduced, the operation difficulty of a program developer is reduced, and the development efficiency of the small program is improved.
EXAMPLE III
On the basis of the first embodiment, the third embodiment exemplarily shows a case where another adjustment policy is determined according to a preset rule. The adjustment strategy is that the program development tool firstly determines target processing data and then carries out post-processing. Specifically, step S120 in fig. 1 may include:
and determining target processing data in the developed program according to the adjustment strategy, and processing the target processing data by adopting a program development tool.
Specifically, the applet generally includes at least one page, each page may be configured as a folder, and the storage path of the pagefile corresponding to each pagefolder is different. During the running process of the applet, the page files in each page folder need to be processed. The storage paths of at least one file in one page folder are the same, so that one target processing data can be at least one file corresponding to one page. And after the target processing data is determined in the developed program, the program development tool processes the target processing data according to the adjustment strategy.
Illustratively, when the program development tool is webpack, the webpack obtains a file storage path of at least one page from a page folder of the applet, and obtains at least one file corresponding to the page as the target processing data according to the file storage path of the page. Wherein, the corresponding file in a page folder is used as a target processing data. And packaging each target processing data corresponding to each page by adopting webpack to form a packaged file. After determining the packaged files, the webpack processes the data in each packaged file according to the adjustment policy, so that the environment program supports the applet processed by the program development tool. After the webpack processes the target processing data, the webpack needs to perform processes such as packing and compressing on the small programs, so that the program loading speed is increased, and the flow is saved.
It should be noted that one page folder may correspond to multiple files, and is not limited herein.
Example four
The embodiment of the disclosure also provides an automatic code adjusting device for program development. Fig. 4 is a schematic structural diagram of an automatic code adjustment device for program development according to a fourth embodiment of the present disclosure. As shown in fig. 4, the apparatus includes:
and the adjustment strategy determining module 11 is configured to determine an adjustment strategy of the program development tool according to a preset rule in the applet development process.
And the processing module 12 is configured to process the developed program by using a program development tool according to the adjustment policy, so that the environment program supports the applet processed by the program development tool.
Optionally, the processing module 12 may use a program development tool to process the developed program in advance according to the adjustment policy, and monitor and obtain the change data in the processing process of the program development tool during the processing process, and adjust the change data according to a preset rule. When the program development tool is webpack, in the process of adjusting the changed data according to a preset rule, the operation variables in the changed data need to be identified, wherein the operation variables are variables required when the environment program runs the page of the applet, and the operation variables which are not supported by the environment program are replaced by the operation variables which are supported by the environment program. The unsupported running variable is a web page object variable, and the supported running variable is an object variable supported when the application software is used as an environment program.
Optionally, the processing module 12 may further determine target processing data in the developed program according to the adjustment policy, and process the target processing data by using a program development tool. In the process of determining target processing data, a file storage path of at least one page is obtained from a page folder of the applet, and at least one file corresponding to the page is obtained according to the file storage path of the page and serves as the target processing data. And packaging the target processing data by using the program development tool to form a packaged file. After the packaged files are determined, the program development tool processes the data in each packaged file according to the adjustment strategy, so that the environment program supports the small programs processed by the program development tool.
The code automatic adjusting device for program development provided by the embodiment of the disclosure can execute the steps executed by the program development tool in the code automatic adjusting method for program development provided by the embodiment of the disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
EXAMPLE five
Fig. 5 is a schematic structural diagram of a terminal device according to a fifth embodiment of the present disclosure. There is shown a schematic block diagram of a terminal device 500 suitable for use in implementing embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a smart phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a fixed terminal such as a digital TV, a desktop computer, and the like. The terminal device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the use range of the embodiment of the present disclosure.
As shown in fig. 5, the terminal device 500 may include a processing means (e.g., a central processing unit, a graphic processor, etc.) 501 that may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 502 or a program loaded from a storage means 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data necessary for the operation of the electronic apparatus 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other through a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
Generally, the following devices may be connected to the I/O interface 505: input devices 506 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 507 including, for example, a Liquid Crystal Display (LCD), speakers, vibrators, and the like; storage devices 508 including, for example, magnetic tape, hard disk, etc.; and a communication device 509. The communication means 509 may allow the terminal device 500 to perform wireless or wired communication with other devices to exchange data. While fig. 5 illustrates a terminal apparatus 500 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer-readable medium, the computer program comprising program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 509, or installed from the storage means 508, or installed from the ROM 502. The computer program performs the above-described functions defined in the methods of the embodiments of the present disclosure when executed by the processing device 501.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: in the small program development process, determining an adjustment strategy of a program development tool according to a preset rule; and processing the developed program by adopting a program development tool according to the adjustment strategy so that the environmental program supports the small program processed by the program development tool.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present disclosure may be implemented by software or hardware. The name of the module does not constitute a limitation to the module itself in some cases, for example, the adjustment policy determination module may also be described as "determining an adjustment policy of a program development tool according to a preset rule during the development of an applet".
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Claims (8)
1. An automatic code adjustment method for program development, the method comprising:
in the small program development process, determining an adjustment strategy of a program development tool according to a preset rule, wherein the preset rule is that different conditions correspond to different adjustment strategies when the program development tool processes program statements of the small program;
processing the developed program by adopting a program development tool according to the adjustment strategy so as to enable the environmental program to support the small program processed by the program development tool;
the processing the developed program by adopting a program development tool according to the adjustment strategy comprises the following steps:
according to the adjustment strategy, processing the developed program by adopting a program development tool in advance;
monitoring and acquiring change data in the processing process of a program development tool;
adjusting the changed data according to the adjustment strategy;
the processing the developed program by using the program development tool according to the adjustment strategy further comprises:
determining target processing data in a developed program according to the adjustment strategy, and processing the target processing data by adopting the program development tool;
the program development tool can be used in APP development and webpage program development;
determining target processing data in a developed program according to the adjustment strategy, and processing the target processing data by adopting the program development tool comprises the following steps:
acquiring a file storage path of at least one page from a page folder of the applet;
acquiring at least one file corresponding to the page according to the file storage path of the page, and using the file as target processing data;
and packaging each target processing data corresponding to each page by adopting webpack to form a packaged file.
2. The method of claim 1, wherein the program development tool is a webpack.
3. The method of claim 2, wherein adjusting the change data in accordance with the adjustment policy comprises:
identifying an operation variable in the changed data, wherein the operation variable is a variable required by an environment program when the environment program operates a page of the small program;
and replacing the running variable which is not supported by the environment program with the running variable which is supported by the environment program.
4. The method of claim 2, wherein intercepting acquisition of change data during a process of a program development tool comprises:
and receiving the changed data information reported in the webpack processing process, and determining changed data according to the changed data information.
5. The method of claim 3, wherein the unsupported run variables are web page object variables and the supported run variables are object variables supported by the application as an environment program.
6. An automatic code adjustment device for program development, comprising:
the system comprises an adjustment strategy determining module, a program development tool and a program execution module, wherein the adjustment strategy determining module is used for determining an adjustment strategy of the program development tool according to a preset rule in the small program development process, and the preset rule corresponds to different adjustment strategies under different conditions when the program development tool processes program statements of the small program;
the processing module is used for processing the developed program by adopting a program development tool according to the adjustment strategy so as to enable the environmental program to support the small program processed by the program development tool;
the processing module is used for processing the developed program by adopting a program development tool in advance according to the adjustment strategy, monitoring and acquiring changed data in the processing process of the program development tool in the processing process, and adjusting the changed data according to a preset rule;
the processing module is also used for determining target processing data in the developed program according to the adjustment strategy and processing the target processing data by adopting a program development tool;
the program development tool can be used in APP development and webpage program development;
the processing module is further configured to: acquiring a file storage path of at least one page from a page folder of the applet;
acquiring at least one file corresponding to the page according to the file storage path of the page, and using the file as target processing data;
and packaging each target processing data corresponding to each page by adopting webpack to form a packaged file.
7. A terminal device, comprising:
one or more processors;
a memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement a method for code auto-tuning as developed by a program as claimed in any one of claims 1-5.
8. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements a code automatic adjustment method developed by a program according to any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910107623.1A CN109800020B (en) | 2019-02-02 | 2019-02-02 | Automatic code adjusting method, device, equipment and medium for program development |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910107623.1A CN109800020B (en) | 2019-02-02 | 2019-02-02 | Automatic code adjusting method, device, equipment and medium for program development |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109800020A CN109800020A (en) | 2019-05-24 |
CN109800020B true CN109800020B (en) | 2023-02-10 |
Family
ID=66561901
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910107623.1A Active CN109800020B (en) | 2019-02-02 | 2019-02-02 | Automatic code adjusting method, device, equipment and medium for program development |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109800020B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110347403A (en) * | 2019-06-28 | 2019-10-18 | 北京你财富计算机科技有限公司 | A kind of program switch control method, device, electronic equipment |
CN113282295B (en) * | 2021-05-25 | 2024-02-23 | 青岛海尔科技有限公司 | Blocking processing method and device, storage medium and electronic device |
CN113791988B (en) * | 2021-11-17 | 2022-02-18 | 畅捷通信息技术股份有限公司 | Rendering method and device for reducing volume of small program package and storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107590385A (en) * | 2017-09-15 | 2018-01-16 | 湖南大学 | A kind of hardware aids in anti-code reuse attack defending system and method |
CN109191605A (en) * | 2018-08-17 | 2019-01-11 | 华南理工大学 | A kind of highway charging rate accuracy evaluating method considering charge path |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5666758B1 (en) * | 2014-06-25 | 2015-02-12 | 楽天株式会社 | Information processing apparatus, information processing method, program, and storage medium |
CN107239318B (en) * | 2017-06-13 | 2018-09-04 | 腾讯科技(深圳)有限公司 | Using conversion method, device and equipment |
CN108664248A (en) * | 2018-05-14 | 2018-10-16 | 北京汉能光伏投资有限公司 | A kind of generation method and device of wechat small routine |
-
2019
- 2019-02-02 CN CN201910107623.1A patent/CN109800020B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107590385A (en) * | 2017-09-15 | 2018-01-16 | 湖南大学 | A kind of hardware aids in anti-code reuse attack defending system and method |
CN109191605A (en) * | 2018-08-17 | 2019-01-11 | 华南理工大学 | A kind of highway charging rate accuracy evaluating method considering charge path |
Also Published As
Publication number | Publication date |
---|---|
CN109800020A (en) | 2019-05-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109918166B (en) | Applet processing method and device and electronic equipment | |
CN111367516B (en) | Application interface generation method and device and electronic equipment | |
CN111581563A (en) | Page response method and device, storage medium and electronic equipment | |
CN109800020B (en) | Automatic code adjusting method, device, equipment and medium for program development | |
CN109857506B (en) | Method and device for realizing guide information, electronic equipment and storage medium | |
CN110633205A (en) | Method and device for detecting embedded point event, terminal equipment and medium | |
CN110960855B (en) | Communication protocol code updating method and device, electronic equipment and storage medium | |
CN114595065A (en) | Data acquisition method and device, storage medium and electronic equipment | |
CN111400068B (en) | Interface control method and device, readable medium and electronic equipment | |
CN110990038B (en) | Method, apparatus, electronic device and medium for applying local update | |
CN109840109B (en) | Method and apparatus for generating software development toolkit | |
CN109343970B (en) | Application program-based operation method and device, electronic equipment and computer medium | |
CN111324376A (en) | Function configuration method and device, electronic equipment and computer readable medium | |
CN113590174A (en) | Application registration method, device, equipment, computer readable storage medium and product | |
CN106033364B (en) | Web application program upgrading method and system | |
CN112817701B (en) | Timer processing method, device, electronic equipment and computer readable medium | |
CN111381898B (en) | Interface calling method and device, mobile terminal and storage medium | |
CN110086880B (en) | Method and apparatus for creating instances of network requests | |
CN110069417B (en) | A/B test method and device | |
CN110908711A (en) | Control development method and device of application program and electronic equipment | |
CN113835528A (en) | Multi-platform interaction method and device of wearable device, intelligent terminal and storage medium | |
CN111625326A (en) | Task pipeline execution method and device and electronic equipment | |
CN111381897B (en) | Interface calling method and device, mobile terminal and storage medium | |
CN112306516B (en) | Method and apparatus for updating code | |
CN111241852A (en) | File translation method, device, terminal 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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |