[go: up one dir, main page]

CN116627422A - Data processing method and device, readable storage medium and electronic equipment - Google Patents

Data processing method and device, readable storage medium and electronic equipment Download PDF

Info

Publication number
CN116627422A
CN116627422A CN202310553990.0A CN202310553990A CN116627422A CN 116627422 A CN116627422 A CN 116627422A CN 202310553990 A CN202310553990 A CN 202310553990A CN 116627422 A CN116627422 A CN 116627422A
Authority
CN
China
Prior art keywords
module
target
compiling
project
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
Application number
CN202310553990.0A
Other languages
Chinese (zh)
Inventor
诸革
曾超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Leading Technology Co Ltd
Original Assignee
Nanjing Leading Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing Leading Technology Co Ltd filed Critical Nanjing Leading Technology Co Ltd
Priority to CN202310553990.0A priority Critical patent/CN116627422A/en
Publication of CN116627422A publication Critical patent/CN116627422A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • G06F8/443Optimisation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides a data processing method, a data processing device, a computer readable storage medium and electronic equipment, wherein the method comprises the following steps: in response to monitoring that the code file of the target project changes, determining a target module needing to be recompiled in all project modules of the target project, and recording the current change moment; in response to starting timing at the current change moment, compiling the target module to obtain first precompiled information, wherein the unchanged duration of the code file of the target module reaches a first preset duration; in response to starting timing at the current change moment, compiling each item module based on the first precompiled information to obtain second precompiled information when the unchanged duration of the code file of each item module reaches the second preset duration; and responding to the project operation instruction, and determining a project operation result based on the second pre-compiled information. According to the technical scheme provided by the invention, the precompiled information is obtained through precompiled, so that the compiling efficiency is effectively improved.

Description

Data processing method and device, readable storage medium and electronic equipment
Technical Field
The present invention relates to the field of computer technology, and more particularly, to a data processing method, apparatus, readable storage medium, and electronic device.
Background
Compilation refers to the conversion of an object file in a language into a target program in a binary language so that the target program can be recognized and executed by a machine. With more and more functions supported by engineering projects and more related business contents, the time required for compiling the engineering projects once is continuously increased. At present, in the development process of engineering projects, code files of the projects are often modified, and after the modification is completed, related staff issues project operation instructions to compile the engineering projects again, so that the compiling time is long and the compiling efficiency is low.
Disclosure of Invention
The invention provides a data processing method, a data processing device, a computer readable storage medium and electronic equipment, which are used for solving the technical problem of low compiling efficiency in the prior art.
According to a first aspect of the present invention, there is provided a data processing method comprising:
responding to the change of the code file of the monitored target project, determining a target module needing to be recompiled in each project module of the target project, and recording the current change moment;
in response to starting timing at the current change moment, compiling the target module to obtain first precompiled information, wherein the unchanged duration of the code file of the target module reaches a first preset duration;
in response to starting timing at the current change moment, compiling each item module based on the first precompiled information to obtain second precompiled information, wherein the unchanged duration of the code file of each item module reaches a second preset duration; wherein the second preset time period is longer than the first preset time period;
and responding to an item operation instruction, and determining an item operation result based on the second pre-compiled information.
Optionally, the target modules include a first target module and a second target module, and the determining, in each item module of the target item, the target module that needs to be recompiled in response to monitoring that the code file of the target item changes includes:
responding to the monitored change of the code file of the target project, and determining the first target module, which needs to be recompiled, of the code file change in each project module of the target project;
and determining the second target module which is needed to be recompiled depending on the first target module based on the dependency configuration file.
Optionally, before the step of determining, based on the dependency configuration file, that the second target module needs to be recompiled depending on the first target module, the method further includes:
analyzing the dependency relationship among the project modules of the target project, and generating the dependency relationship configuration file.
Optionally, the responding to starting timing at the current change time, wherein the unchanged duration of the code file of the target module reaches a first preset duration, and compiling the target module to obtain first precompiled information includes:
in response to starting timing at the current change moment, compiling the first target module to obtain third precompiled information, wherein the unchanged duration of the code file of the first target module reaches the first preset duration;
and in response to starting timing at the current change moment, compiling the second target module based on the third precompiled information to obtain the first precompiled information, wherein the unchanged duration of the code file of the second target module reaches the first preset duration.
Optionally, before the step of compiling the first target module to obtain the third pre-compiled information, the method further includes:
and stopping the ongoing compiling task of the first target module under the condition that the first target module corresponds to the ongoing compiling task.
Optionally, before the step of compiling the first target module to obtain the third pre-compiled information, the method further includes:
and deleting the second pre-compiled information obtained before in the case that the second pre-compiled information obtained before exists.
Optionally, compiling each item module based on the first pre-compiled information to obtain second pre-compiled information, including:
compiling each project module based on the first pre-compiling information to obtain a project compiling product;
and operating the project compiling product, and obtaining the second pre-compiling information based on an operation result.
According to a second aspect of the present invention, there is provided a data processing apparatus comprising:
the code file monitoring module is used for responding to the change of the code file of the monitored target project, determining a target module needing to be recompiled in each project module of the target project, and recording the current change moment;
the first compiling processing module is used for responding to the fact that the timing is started at the current change moment, the unchanged duration of the code file of the target module reaches a first preset duration, and the target module is compiled to obtain first pre-compiling information;
the second compiling processing module is used for responding to the fact that the timing is started at the current change moment, the unchanged duration of the code files of each project module reaches a second preset duration, and compiling each project module based on the first precompiled information to obtain second precompiled information; wherein the second preset time period is longer than the first preset time period;
and the operation result determining module is used for responding to the project operation instruction and determining the project operation result based on the second pre-compiling information.
According to a third aspect of the present invention, there is provided a computer-readable storage medium storing a computer program for executing the above-described data processing method.
According to a fourth aspect of the present invention, there is provided an electronic device comprising:
a processor;
a memory for storing the processor-executable instructions;
the processor is configured to read the executable instructions from the memory and execute the instructions to implement the data processing method described above.
Compared with the prior art, the data processing method, the data processing device, the computer readable storage medium and the electronic equipment provided by the invention at least comprise the following beneficial effects:
according to the technical scheme, the code file of the target item is monitored, when the code file of the target item is monitored to change, the target module needing to be recompiled is determined in all item modules of the target item, and the current change moment is recorded. And then starting timing at the current change moment, and indicating that the target module is likely to finish modification when the unchanged time length of the code file of the target module reaches a first preset time length, so that the target module is subjected to pre-compiling processing to obtain first pre-compiling information. After starting timing, when the unchanged duration of the code file of each project module reaches a second preset duration, the target project is indicated to have the possibility of finishing modification, so that the project modules are subjected to pre-compiling processing according to the first pre-compiling information to obtain second pre-compiling information. Therefore, under the condition that the project operation instruction is received, the project operation result can be rapidly determined according to second precompiled information obtained by precompiled, the compiling time after the project operation instruction is received is shortened, and the compiling efficiency is effectively improved.
Drawings
In order to more clearly illustrate the technical solutions of the present invention, the drawings that are needed in the description of the present invention will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort to a person skilled in the art.
FIG. 1 is a flow chart of a data processing method according to an exemplary embodiment of the present invention;
FIG. 2 is a second flow chart of a data processing method according to an exemplary embodiment of the present invention;
FIG. 3 is a schematic diagram of a data processing apparatus according to an exemplary embodiment of the present invention;
fig. 4 is a block diagram of an electronic device according to an exemplary embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made more apparent and fully hereinafter with reference to the accompanying drawings, in which some, but not all embodiments of the invention are shown. All other embodiments, which can be made by one of ordinary skill in the art without creative efforts, based on the embodiments of the present invention are within the protection scope of the present embodiments.
Exemplary method
Fig. 1 is a flow chart of a data processing method according to an exemplary embodiment of the present invention, which at least includes the following steps:
and 11, responding to the change of the code file of the target project, determining a target module needing to be recompiled in each project module of the target project, and recording the current change moment.
The target item refers to an object currently being developed, such as an installation file of an application program.
Changes to code files refer to additions, deletions, and modifications to code files.
The current change time is the time when the code file of the corresponding target item monitored at the current time changes. Aiming at the code file changes monitored at different times, the recorded current change moments are different.
Specifically, code files corresponding to each project module of the target project are obtained, the file monitoring system is utilized to monitor the change of each code file in real time, and when the file monitoring system monitors that the code files of the target project change, the target module needing to be recompiled is determined in each project module.
It should be noted that, the monitoring of the code file of the target item corresponds to the whole development process of the target item, so each time the code file of the target item is monitored, the step 11 is triggered, that is, the step 11 may be repeatedly executed in the data processing method provided in this embodiment.
In an embodiment, the target modules include a first target module and a second target module, and the step 11 includes:
and step 111, in response to monitoring the change of the code file of the target project, determining the first target module, which needs to be recompiled, of the code file change in each project module of the target project.
Step 112, determining, based on the dependency configuration file, the second target module that needs to be recompiled depending on the first target module.
The dependency relationship configuration file describes the dependency relationship among the project modules, such as the project module 1 depends on the project module 2, the project module 3 depends on the project module 2, and the like.
In this embodiment, considering that there is often a dependency relationship between each project module of the target project, for a module having a dependency relationship, if a code file of a dependent module changes, the module and other modules that depend on the module need to be recompiled. For example, if the module B calls the module a, the module B depends on the module a, and if the code file of the module a changes, the module a and the module B need to be recompiled. When the change of the code file of the target project is monitored, a first target module with the changed code file is determined, and further, a second target module depending on the first target module is determined in each project module according to the dependency configuration file describing the dependency among each project module, wherein the first target module and the second target module are target modules needing to be recompiled. And the second target module which depends on the first target module is rapidly and accurately determined through the dependency relationship configuration file, so that the accuracy of the determination of the target module is ensured.
In an embodiment, before the step 112, the method further includes:
and 113, analyzing the dependency relationship among the project modules of the target project, and generating the dependency relationship configuration file.
In this embodiment, the dependency relationship between each item module of the target item is analyzed in advance, so as to form an accurate dependency relationship configuration file. Specifically, the module dependency information analysis tools of different package management tools are utilized to obtain the dependency relationship among different project modules, and the dependency relationship configuration file is obtained. By analyzing the dependency relationship among the project modules, the dependency relationship configuration file is automatically acquired, any content of the target project is not required to be modified, and compiling risks caused by changing the content of the target project are avoided.
It should be noted that, in this embodiment, the number of the second target modules is not specifically limited, and the number of the second target modules may be one or more, and when the number of the second target modules is plural, it indicates that the plural second target modules all depend on the first target module, so that when the code file of the first target module changes, the first target module and the plural second target modules all need to be recompiled. The number of the second target modules may be zero, that is, the second target modules cannot be determined according to the dependency relationship, and the first target modules are target modules at this time.
And step 12, in response to starting timing at the current change moment, compiling the target module to obtain first pre-compiling information when the unchanged duration of the code file of the target module reaches a first preset duration.
The first preset duration is a preset parameter, and the duration of the first preset duration may be set to be shorter, for example, 5s, 8s, 10s, etc., and specific values of the first preset duration are not specifically limited in this embodiment, so that a user may adjust the size of the first preset duration according to actual situations.
Specifically, timing is started from the recorded current change time, the unchanged time length of the code file of the target module is determined, when the unchanged time length of the code file of the target module reaches a first preset time length, the possibility of finishing modification of the target module is indicated, so that the target module is subjected to pre-compiling processing to obtain first pre-compiling information, and the first pre-compiling information can be a compiling product obtained by compiling the target module.
It should be noted that, when the unchanged duration of the code file of the target module does not reach the first preset duration, it indicates that the code file of the target module changes again, and then it is monitored that the code file of the target item changes, so that step 11 is executed.
In an embodiment, the target modules include a first target module and a second target module, the second target module depending on the first target module, step 12 comprising:
and step 121, in response to starting to time with the current change time, compiling the first target module to obtain third pre-compiled information, wherein the unchanged duration of the code file of the first target module reaches the first preset duration.
And step 122, in response to starting to time with the current change time, compiling the second target module based on the third precompiled information to obtain the first precompiled information, wherein the unchanged time length of the code file of the second target module reaches the first preset time length.
In this embodiment, the timing is started at the current change time, and when the unchanged duration of the code file of the first target module reaches the first preset duration, it indicates that there is a possibility that the first target module finishes modification, so that the first target module is pre-compiled to obtain a compiled product corresponding to the first target module, that is, third pre-compiled information.
It should be noted that, if the unchanged duration of the code file of the first target module does not reach the first preset duration, it indicates that the code file of the first target module changes again, and then it is monitored that the code file of the target item changes, so that step 11 is executed, when step 11 is executed again, the same target module is determined because the changed code files are the same, that is, the same first target module and second target module are determined.
Further, after the timing is started at the current change time, the unchanged duration of the code file of the second target module also reaches the first preset duration, and because the second target module depends on the first target module, when the second target module is compiled, a compiling product of the first target module is obtained, that is to say, the second target module is compiled according to the third pre-compiling information obtained by compiling the first target module, a compiling product of the second target module is obtained, and the compiling product of the second target module is determined to be the first pre-compiling information.
It should be noted that, if the unchanged duration of the code file of the second target module does not reach the first preset duration, it indicates that the code file of the second target module is changed, and then it can monitor that the code file of the target item is changed, so that step 11 is executed, when step 11 is executed again, different target modules are determined due to different changed code files, at this time, the second target module with changed code file becomes a new first target module, and other modules depending on the new first target module are new second target modules.
Further, in an application scenario where the second target module does not exist, the number of the target modules is one, at this time, the first target module is the target module, and when the time begins to be counted at the current change moment, and the unchanged time length of the code file of the first target module reaches the first preset time length, the first target module is pre-compiled, and the obtained third pre-compiled information is the first pre-compiled information.
In one embodiment, step 121 includes:
and 1211, in response to starting to time with the current change time, stopping the ongoing compiling task of the first target module and compiling the first target module to obtain third pre-compiling information when the unchanged duration of the code file of the first target module reaches the first preset duration and the first target module corresponds to the ongoing compiling task.
In this embodiment, when the unchanged duration of the code file of the first target module reaches the first preset duration, there may be a compiling task that is compiling the first target module, and because the first target module is about to be recompiled, and the compiling meaning of the ongoing compiling task is lost, the ongoing compiling task of the first target module is stopped, so that the waste of compiling resources is avoided, then the first target module is precompiled according to the code file corresponding to the current change, a new compiling task is started, and after the compiling of the first target module is finished, third precompiled information is obtained.
It should be noted that, the ongoing compiling task corresponding to the first target module is not limited to the ongoing compiling process for the first target module, but includes the ongoing compiling process for the second target module that depends on the first target module, and the compiling process for each project module.
For example, when the related staff modifies the module a, it monitors that the code file of the target item changes, analyzes the changed first target module, i.e., the module a, and starts timing, if the module a does not change within the first preset duration 10S, it starts performing the first compiling process on the module a; if the module a changes again at the 12 th S, the code file of the target item is monitored again to change, and the module a which is the first target module to change is analyzed again, and timing is started again, if the module a does not change within the second preset time length 10S of the new round, the time for compiling the module a may be longer, so that the module a has a compiling task in progress, that is, the first compiling process of the module a is performed, and the module a has changed, so that the second compiling process is required, the first compiling process in progress is stopped, the second compiling process is started, so that compiling resources are effectively saved, and the processing efficiency of pre-compiling is improved.
In one embodiment, step 121 includes:
and step 1212, in response to starting to time with the current change time, deleting the second pre-compiled information obtained before and compiling the first target module to obtain third pre-compiled information when the unchanged duration of the code file of the first target module reaches the first preset duration.
The second pre-compiled information obtained in advance is a result obtained by compiling each item module for the target item last time.
In this embodiment, when the unchanged duration of the code file of the first target module reaches the first preset duration, the first target module is about to be recompiled, so that the second pre-compiled information obtained before is expired, so that the second pre-compiled information obtained before can be deleted, and the expired information is deleted in time, thereby being beneficial to saving system resources.
Step 13, in response to starting timing at the current change moment, compiling each item module based on the first precompiled information to obtain second precompiled information, wherein the unchanged duration of the code file of each item module reaches a second preset duration; wherein the second preset time period is longer than the first preset time period.
The second preset duration is a preset parameter, and the duration of the second preset duration may be set longer than the first preset duration, for example, when the first preset duration is 10s, the second preset duration may be 30s, 1min, 2 min, etc., and specific values of the second preset duration are not specifically limited in this embodiment, and the user may adjust the size of the second preset duration according to actual situations.
Specifically, the timing is started at the current change time, and when the unchanged time length of the code file of each item module reaches the second preset time length, the possibility that the target item is modified is indicated, so that each item module is compiled according to the first precompiled information to obtain the second precompiled information.
In one embodiment, each project module is compiled to obtain a project compilation product, and the project compilation product is used as second precompiled information.
In an embodiment, in step 13, compiling each of the item modules based on the first pre-compiled information to obtain second pre-compiled information includes:
compiling each project module based on the first pre-compiling information to obtain a project compiling product; and operating the project compiling product, and obtaining the second pre-compiling information based on an operation result.
In this embodiment, the first precompiled information is utilized to precompiled each project module to obtain a project compiling product, all operations before operation such as assembly, linking, code signing and the like are completed, then the project compiling product is operated to obtain an operation result, and the operation result is used as second precompiled information.
And step 14, determining the project operation result based on the second pre-compiling information in response to the project operation instruction.
Specifically, when the project operation instruction is received, the fact that the modification of the project is completed at the time is indicated, the project operation result can be determined according to the second pre-compiling information obtained in advance, the fact that when the project operation instruction is received, the target project is recompiled is avoided, compiling efficiency is effectively improved, and determining time of the project operation result is shortened.
In one possible application scenario, under the condition that the project compiling product is taken as second pre-compiling information, after receiving the project running instruction, running the project compiling product to obtain a project running result.
In a possible application scenario, under the condition that the second pre-compiled information is obtained based on the operation result of the project compiling product, after the project operation instruction is received, the second pre-compiled information obtained by performing project compiling product operation in advance can be used as the project operation result at this time, so that the project operation result can be quickly determined.
Fig. 2 exemplarily shows steps of a data processing method in a development process for an application program app, specifically including:
step 201, the file monitoring system is configured to monitor the project file of the target project, namely, the code file of the target project, so as to monitor the project file state in real time in the background, and notify the system when the file changes.
Step 202, a module dependency information analysis tool is set to conduct dependency analysis on project engineering files, and target dependency graph configuration files, namely dependency relation configuration files, are generated.
It should be noted that, step 201 and step 202 may be preparation work performed in advance offline.
In step 203, under the condition that the code file of the target item is monitored to be changed, the corresponding module information is analyzed, the target dependency graph configuration file is utilized to obtain the target module to be recompiled, the target module comprises a module A and other modules depending on the module A, which are marked as a module B, the number of the modules B may be multiple, the current change time is recorded, and step 204 is continuously executed.
And 204, starting timing with the current change time, and judging whether the A module has no new change in the first preset time length 10S. If there is a new change in the a module 10S, corresponding to no branch of the a module in 10S, continuing to execute step 203; if the a module 10S has no new change, that is, the unchanged duration of the code file of the first target module reaches the first preset duration, the corresponding a module in 10S has no new change and is a branch, and step 205 is continuously executed.
In step 205, if there is a current compiling task, that is, an ongoing compiling task, the current compiling task is stopped, and if there is no current compiling task, step 205 is not present, and step 206 is directly continued.
Step 206, determining whether there is a second pre-compiled information, i.e. a product.app, if there is a product.app, deleting the product.app, and continuing to execute step 207, if there is no product.app, continuing to execute step 207.
In step 207, the a module is compiled to obtain third precompiled information, i.e. the product a.frame, and step 208 is continued.
And step 208, starting timing with the current change time, and judging whether the B module has no new change in the first preset time length 10S. If there is a new change in the B module 10S, corresponding to no branch of the B module in 10S without the new change, continuing to execute step 203; if the B module 10S has no new change, that is, the unchanged duration of the code file of the second target module reaches the first preset duration, the corresponding B module in 10S has no new change and is a branch, and step 209 is continuously executed.
Step 209, compiling the B module to obtain the first precompiled information, i.e. the product b.frame, and continuing to execute step 210.
And 210, starting timing with the current change time, and judging that each project module has no file change within the second preset time length of 1 minute. If there is a file change, corresponding to no branch with no file change within 1 minute, continuing to execute step 203; if there is no file change, that is, the unchanged duration of the code files of each project module reaches the second preset duration, and if there is no file change within 1 minute, the process branches to continue to execute step 211.
Step 211, based on the product b.frame work, all operations before running the APP, such as compiling, compiling links, code signing, etc., are completed, so as to obtain the product product.app, and step 212 is continuously executed.
Step 212, directly running the product, app, where the running result is the second pre-compiled information, so that system resources of the development device when editing codes can be reasonably utilized by compiling in advance, when the development effect is required to be checked by the running project, according to the received project running instruction, the compiling running time can be shortened by using the product compiled in advance, and the project running result can be obtained quickly and accurately based on the second pre-compiled information.
In the application scene, the dependency relationship between project modules can be automatically acquired without modifying the content of the original code file, so that the original compiling rule is not modified, and the compiling risk caused by changing the compiling rule is avoided.
In the above embodiment, the code file of the target item is monitored, and when it is monitored that the code file of the target item changes, the target module that needs to be recompiled is determined in each item module of the target item, and the current change time is recorded. And then starting timing at the current change moment, and indicating that the target module is likely to finish modification when the unchanged time length of the code file of the target module reaches a first preset time length, so that the target module is subjected to pre-compiling processing to obtain first pre-compiling information. After starting timing, when the unchanged duration of the code file of each project module reaches a second preset duration, the target project is indicated to have the possibility of finishing modification, so that the project modules are subjected to pre-compiling processing according to the first pre-compiling information to obtain second pre-compiling information. Therefore, under the condition that the project operation instruction is received, the project operation result can be rapidly determined according to second precompiled information obtained by precompiled, the compiling time after the project operation instruction is received is shortened, and the compiling efficiency is effectively improved.
Exemplary apparatus
Based on the same conception as the embodiment of the method, the embodiment of the invention also provides a data processing device.
Fig. 3 shows a schematic structural diagram of a data processing apparatus according to an exemplary embodiment of the present invention, including:
the code file monitoring module 31 is configured to determine, in each item module of a target item, a target module that needs to be recompiled in response to monitoring that a code file of the target item changes, and record a current change time;
a first compiling processing module 32, configured to compile the target module to obtain first precompiled information in response to starting timing at the current change time, where an unchanged duration of the code file of the target module reaches a first preset duration;
a second compiling processing module 33, configured to compile each item module based on the first precompiled information to obtain second precompiled information, in response to starting to time with the current change time, where the unchanged time length of the code file of each item module reaches a second preset time length; wherein the second preset time period is longer than the first preset time period;
the operation result determining module 34 is configured to determine, in response to an item operation instruction, the item operation result based on the second pre-compiled information.
In an exemplary embodiment of the present invention, the target modules include a first target module and a second target module, and the code file listening module includes:
the first target determining unit is used for determining the first target module, which needs to be recompiled, of the code file changes in each project module of the target project in response to monitoring the code file changes of the target project;
and the second target determining unit is used for determining the second target module which is needed to be recompiled depending on the first target module based on the dependency relationship configuration file.
In an exemplary embodiment of the invention, the apparatus further comprises:
and the configuration file generation module is used for analyzing the dependency relationship among the project modules of the target project and generating the dependency relationship configuration file.
In an exemplary embodiment of the present invention, the first compiling processing module includes:
the first compiling processing unit is used for compiling the first target module to obtain third pre-compiling information in response to the fact that the time is started at the current change moment, and the unchanged time length of the code file of the first target module reaches the first preset time length;
and the second compiling processing unit is used for responding to the fact that the timing is started at the current change moment, the unchanged duration of the code file of the second target module reaches the first preset duration, and compiling the second target module based on the third precompiled information to obtain the first precompiled information.
In an exemplary embodiment of the present invention, the first compiling processing module further includes:
and the compiling task stopping unit is used for stopping the ongoing compiling task of the first target module under the condition that the first target module corresponds to the ongoing compiling task.
In an exemplary embodiment of the present invention, the first compiling processing module further includes:
and the compiling information deleting unit is used for deleting the second pre-compiling information obtained before under the condition that the second pre-compiling information obtained before exists.
In an exemplary embodiment of the present invention, the second compiling processing module includes:
the third compiling processing unit is used for compiling each project module based on the first pre-compiling information to obtain project compiling products;
and the compiling product operation unit is used for operating the project compiling product and obtaining the second pre-compiling information based on an operation result.
Exemplary electronic device
Fig. 4 illustrates a block diagram of an electronic device according to an embodiment of the invention.
As shown in fig. 4, the electronic device 40 includes one or more processors 41 and memory 42.
The processor 41 may be a Central Processing Unit (CPU) or other form of processing unit having data processing and/or instruction execution capabilities, and may control other components in the electronic device 40 to perform desired functions.
Memory 42 may include one or more computer program products that may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. The volatile memory may include, for example, random Access Memory (RAM) and/or cache memory (cache), and the like. The non-volatile memory may include, for example, read Only Memory (ROM), hard disk, flash memory, and the like. One or more computer program instructions may be stored on the computer readable storage medium that may be executed by the processor 41 to implement the data processing methods and/or other desired functions of the various embodiments of the present invention described above.
In one example, electronic device 40 may further include: an input device 43 and an output device 44, which are interconnected by a bus system and/or other forms of connection mechanisms (not shown).
Of course, only some of the components of the electronic device 40 that are relevant to the present invention are shown in fig. 4 for simplicity, components such as buses, input/output interfaces, etc. are omitted. In addition, the electronic device 40 may include any other suitable components depending on the particular application.
Exemplary computer program product and computer readable storage Medium
In a sixth aspect, embodiments of the invention may be a computer program product comprising computer program instructions, in addition to the above-described methods and devices, which when run by a processor cause the processor to perform the steps in a data processing method according to the various embodiments of the invention described in the above-described "exemplary methods" section of this specification.
The computer program product may write program code for performing operations of embodiments of the present invention in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like 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 computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server.
Furthermore, embodiments of the present invention may also be a computer-readable storage medium, having stored thereon computer program instructions, which when executed by a processor, cause the processor to perform the steps in a data processing method according to various embodiments of the present invention described in the "exemplary method" section above in the present specification.
The computer readable storage medium may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may include, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The basic principles of the present invention have been described above in connection with specific embodiments, however, it should be noted that the advantages, benefits, effects, etc. mentioned in the present invention are merely examples and not intended to be limiting, and these advantages, benefits, effects, etc. are not to be considered as essential to the various embodiments of the present invention. Furthermore, the specific details of the invention described above are for purposes of illustration and understanding only, and are not intended to be limiting, as the invention may be practiced with the specific details described above.
The block diagrams of the devices, apparatuses, devices, systems referred to in the present invention are only illustrative examples and are not intended to require or imply that the connections, arrangements, configurations must be made in the manner shown in the block diagrams. As will be appreciated by one of skill in the art, the devices, apparatuses, devices, systems may be connected, arranged, configured in any manner. Words such as "including," "comprising," "having," and the like are words of openness and mean "including but not limited to," and are used interchangeably therewith. The terms "or" and "as used herein refer to and are used interchangeably with the term" and/or "unless the context clearly indicates otherwise. The term "such as" as used herein refers to, and is used interchangeably with, the phrase "such as, but not limited to.
It is also noted that in the apparatus, devices and methods of the present invention, the components or steps may be disassembled and/or assembled. Such decomposition and/or recombination should be considered as equivalent aspects of the present invention.
The previous description of the inventive aspects is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these aspects will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other aspects without departing from the scope of the invention. Thus, the present invention is not intended to be limited to the aspects shown herein but is to be accorded the widest scope consistent with the principles and novel features herein.
The foregoing description has been presented for purposes of illustration and description. Furthermore, this description is not intended to limit embodiments of the invention to the form disclosed herein. Although a number of example aspects and embodiments have been discussed above, a person of ordinary skill in the art will recognize certain variations, modifications, alterations, additions, and subcombinations thereof.

Claims (10)

1. A method of data processing, comprising:
responding to the change of the code file of the monitored target project, determining a target module needing to be recompiled in each project module of the target project, and recording the current change moment;
in response to starting timing at the current change moment, compiling the target module to obtain first precompiled information, wherein the unchanged duration of the code file of the target module reaches a first preset duration;
in response to starting timing at the current change moment, compiling each item module based on the first precompiled information to obtain second precompiled information, wherein the unchanged duration of the code file of each item module reaches a second preset duration; wherein the second preset time period is longer than the first preset time period;
and responding to an item operation instruction, and determining an item operation result based on the second pre-compiled information.
2. The method of claim 1, wherein the target modules include a first target module and a second target module, and wherein the determining the target module to be recompiled in each item module of the target item in response to detecting a change in the code file of the target item includes:
responding to the monitored change of the code file of the target project, and determining the first target module, which needs to be recompiled, of the code file change in each project module of the target project;
and determining the second target module which is needed to be recompiled depending on the first target module based on the dependency configuration file.
3. The method of claim 2, wherein prior to the step of determining, based on the dependency configuration file, that the second target module is dependent on the first target module for recompilation, the method further comprises:
analyzing the dependency relationship among the project modules of the target project, and generating the dependency relationship configuration file.
4. The method of claim 2, wherein the compiling the target module to obtain the first precoding information in response to the unchanged duration of the code file of the target module reaching a first preset duration starting from the current change time comprises:
in response to starting timing at the current change moment, compiling the first target module to obtain third precompiled information, wherein the unchanged duration of the code file of the first target module reaches the first preset duration;
and in response to starting timing at the current change moment, compiling the second target module based on the third precompiled information to obtain the first precompiled information, wherein the unchanged duration of the code file of the second target module reaches the first preset duration.
5. The method of claim 4, wherein prior to the step of compiling the first target module to obtain third precompiled information, the method further comprises:
and stopping the ongoing compiling task of the first target module under the condition that the first target module corresponds to the ongoing compiling task.
6. The method of claim 4, wherein prior to the step of compiling the first target module to obtain third precompiled information, the method further comprises:
and deleting the second pre-compiled information obtained before in the case that the second pre-compiled information obtained before exists.
7. The method according to any one of claims 1-6, wherein compiling each of the project modules based on the first pre-compiled information to obtain second pre-compiled information comprises:
compiling each project module based on the first pre-compiling information to obtain a project compiling product;
and operating the project compiling product, and obtaining the second pre-compiling information based on an operation result.
8. A data processing apparatus, comprising:
the code file monitoring module is used for responding to the change of the code file of the monitored target project, determining a target module needing to be recompiled in each project module of the target project, and recording the current change moment;
the first compiling processing module is used for responding to the fact that the timing is started at the current change moment, the unchanged duration of the code file of the target module reaches a first preset duration, and the target module is compiled to obtain first pre-compiling information;
the second compiling processing module is used for responding to the fact that the timing is started at the current change moment, the unchanged duration of the code files of each project module reaches a second preset duration, and compiling each project module based on the first precompiled information to obtain second precompiled information; wherein the second preset time period is longer than the first preset time period;
and the operation result determining module is used for responding to the project operation instruction and determining the project operation result based on the second pre-compiling information.
9. A computer readable storage medium storing a computer program for executing the data processing method according to any one of the preceding claims 1-7.
10. An electronic device, the electronic device comprising:
a processor;
a memory for storing the processor-executable instructions;
the processor being configured to read the executable instructions from the memory and execute the instructions to implement the data processing method of any of the preceding claims 1-7.
CN202310553990.0A 2023-05-16 2023-05-16 Data processing method and device, readable storage medium and electronic equipment Pending CN116627422A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310553990.0A CN116627422A (en) 2023-05-16 2023-05-16 Data processing method and device, readable storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310553990.0A CN116627422A (en) 2023-05-16 2023-05-16 Data processing method and device, readable storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN116627422A true CN116627422A (en) 2023-08-22

Family

ID=87612663

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310553990.0A Pending CN116627422A (en) 2023-05-16 2023-05-16 Data processing method and device, readable storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN116627422A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117648088A (en) * 2023-11-23 2024-03-05 北京度友信息技术有限公司 Code compiling method, device, electronic equipment and readable storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117648088A (en) * 2023-11-23 2024-03-05 北京度友信息技术有限公司 Code compiling method, device, electronic equipment and readable storage medium

Similar Documents

Publication Publication Date Title
CN110990019B (en) Java class analysis method and device, storage medium and electronic equipment
US9111033B2 (en) Compiling source code for debugging with user preferred snapshot locations
CN104281520B (en) Tracking and method, the apparatus and system of debugging
US9952855B2 (en) Software test automation
US8881115B2 (en) Compiling source code for debugging with expanded snapshots
US8819644B2 (en) Selective data flow analysis of bounded regions of computer software applications
CN112100072B (en) Static detection method, device, equipment and medium for application program code
US8910126B2 (en) Compiling source code for debugging with variable value restoration based on debugging user activity
US20110126179A1 (en) Method and System for Dynamic Patching Software Using Source Code
KR20090017598A (en) Method and system for analyzing software
CN111666217A (en) Method and apparatus for testing code
CN112667317A (en) Abnormal time consumption detection method and device, electronic equipment and storage medium
Malm et al. Automated analysis of flakiness-mitigating delays
CN113760290B (en) A program control method, device, computer equipment and storage medium
US20150007150A1 (en) Determining control flow divergence due to variable value difference
CN116627422A (en) Data processing method and device, readable storage medium and electronic equipment
US8489938B2 (en) Diagnostic data capture in a computing environment
WO2015003452A1 (en) Methods and systems for file processing
CN104008046A (en) Method and device for testing programs
CN113901773B (en) Data accounting method, device, electronic equipment and storage medium
US9710360B2 (en) Optimizing error parsing in an integrated development environment
US8799873B2 (en) Collecting tracepoint data
CN112527574B (en) Processor testing method, device, equipment and readable storage medium
US9870257B1 (en) Automation optimization in a command line interface
CN112764730A (en) Business object monitoring method and device

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