Method and apparatus for switching code data, and device and medium
By acquiring and updating the application project's description data and only synchronizing the relevant code data of the switching modules, the synchronization delay problem when switching between binary mode and source code mode is solved, thus improving development efficiency.
Patent Information
- Application Number
- PCT/CN2024/115637
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2026-03-05
AI Technical Summary
In the application development process, existing technologies suffer from synchronization delays when switching code data between binary mode and source code mode, resulting in low development efficiency.
By acquiring the project's description data, identifying the module's reference patterns, and generating new configuration data, only the code data related to the switched modules is updated, without synchronizing the entire project. The project's description data is then updated using the new configuration data.
It improves the efficiency of code data switching, reduces synchronization time delay, and enhances the overall development efficiency of the application.
Smart Images

Figure CN2024115637_05032026_PF_FP_ABST
Abstract
Description
Methods, apparatus, devices, and media for switching code data Technical Field
[0001] The exemplary implementations of this disclosure generally relate to the development of applications, and more particularly to methods, apparatus, devices, and computer-readable storage media for switching code data during software development. Background Technology
[0002] As applications grow in size and include more modules, the amount of code data created for application development increases accordingly. This code data can exist in two modes: binary mode and source code mode, and switching between these modes may be necessary during development. This switching process triggers code data resynchronization, which can result in significant time delays. Therefore, a faster and more efficient way to switch code data is desired to improve the overall development efficiency of the application.
[0003] Summary of the Invention
[0004] In a first aspect of this disclosure, a method for switching code data is provided. In this method, description data of a project is obtained, describing the association between code data of multiple modules in the project and the project itself. The reference mode of the code data of the modules in the multiple modules includes at least one of the following: binary mode and source code mode. In response to determining that the reference mode of first code data of a first module in the multiple modules is switched from binary mode to source code mode, second configuration data of the first module is generated based on first configuration data of the first module. The description data of the project is updated using the second configuration data.
[0005] In a second aspect of this disclosure, an apparatus for switching code data is provided. The apparatus includes: an acquisition module configured to acquire description data of a project, the description data describing the association between code data of multiple modules in the project and the project, the reference mode of the code data of the multiple modules including at least one of the following: binary mode and source code mode; a generation module configured to generate second configuration data of the first module based on first configuration data of the first module in response to determining that the reference mode of first code data of the first module in the multiple modules is switched from binary mode to source code mode; and an update module configured to update the description data of the project using the second configuration data.
[0006] In a third aspect of this disclosure, an electronic device is provided. The electronic device includes: at least one processing unit; and at least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions causing the electronic device to perform the method according to a first aspect of this disclosure when executed by the at least one processing unit.
[0007] In a fourth aspect of this disclosure, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, causes the processor to implement the method according to a first aspect of this disclosure.
[0008] In a fifth aspect of this disclosure, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the method according to a first aspect of this disclosure.
[0009] It should be understood that the content described in this content section is not intended to limit the key or essential features of the implementation of this disclosure, nor is it intended to restrict the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0010] The above and other features, advantages, and aspects of the various implementations of this disclosure will become more apparent in the following detailed description, taken in conjunction with the accompanying drawings. In the drawings, the same or similar reference numerals denote the same or similar elements, wherein:
[0011] Figure 1 shows a block diagram of an application development environment according to an exemplary implementation of the present disclosure;
[0012] Figure 2 shows a block diagram for switching code data according to some implementations of this disclosure;
[0013] Figure 3 shows a block diagram of the directory structure involved in an engineering project according to some implementations of this disclosure;
[0014] Figure 4 shows a block diagram describing the structure of data according to some implementations of this disclosure;
[0015] Figure 5 shows a block diagram of the structure of configuration data according to some implementations of this disclosure;
[0016] Figure 6 shows a flowchart of a method for switching code data according to some implementations of this disclosure;
[0017] Figure 7 shows a block diagram of an apparatus for switching code data according to some implementations of this disclosure; and
[0018] Figure 8 shows a block diagram of a device capable of implementing various implementations of the present disclosure. Detailed Implementation
[0019] Implementations of this disclosure will now be described in more detail with reference to the accompanying drawings. While some implementations of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the implementations set forth herein. Rather, these implementations are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and implementations of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0020] In the description of the implementation methods disclosed herein, the term "comprising" and similar terms should be understood as open inclusion, i.e., "including but not limited to". The term "based on" should be understood as "at least partially based on". The term "one implementation" or "the implementation" should be understood as "at least one implementation". The term "some implementations" should be understood as "at least some implementations". Other explicit and implicit definitions may also be included below. As used herein, the term "model" can represent the relationships between various data. For example, the aforementioned relationships can be obtained based on various currently known and / or future-developed technical solutions.
[0021] It is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and related provisions.
[0022] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure through appropriate means in accordance with relevant laws and regulations, and user authorization should be obtained.
[0023] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.
[0024] As an optional but non-restrictive implementation, in response to a user's active request, a prompt message can be sent to the user, for example, via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose whether to "agree" or "disagree" to provide personal information to the electronic device.
[0025] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.
[0026] The term "in response to" as used herein refers to a state in which a corresponding event occurs or a condition is satisfied. It will be understood that the timing of subsequent actions performed in response to such event or condition is not necessarily strongly correlated with the time when the event occurs or the condition is met. For example, in some cases, subsequent actions may be performed immediately upon the occurrence of the event or the fulfillment of the condition; while in others, they may be performed some time after the occurrence of the event or the fulfillment of the condition.
[0027] Example Environment
[0028] The increasing number of modules included in an application leads to a corresponding increase in the amount of code data in the projects created for application development. Referring to Figure 1, which describes an application environment according to some implementations of this disclosure, Figure 1 shows a block diagram 100 of an application development environment according to an exemplary implementation of this disclosure. As shown in Figure 1, a project 120 can be created to develop an application 110. This project 120 can call multiple modules 130, ..., 140, each of which can implement specific functions to achieve the overall functionality of the application 110.
[0029] Here, the code data used to implement the functionality of a module can exist in two modes: binary mode and source code mode. Specifically, during the development of a module, developers can edit the code data (i.e., code data 134) in source code mode and adjust the corresponding functions of the module. When the functionality of the module has become relatively stable, the code data can be switched to binary mode (i.e., code data 132) to reduce the amount of data involved in the build process. At this time, the source code mode code data 134 can be built into binary mode code data 132. Other modules in the project (e.g., module 140) can call the functions of module 130. Directly calling the binary mode code data can greatly reduce the actual amount of source code involved in the build process, thereby reducing waiting time.
[0030] In large-scale application development projects, pre-building portions of code into binary components (e.g., .aar format, and / or other formats) can reduce the amount of actual source code builds required during development. This pre-built code is typically in "binary mode." Modules already built as binary cannot be directly modified. When developers need to modify the code data in "binary mode," they must switch it to "source code mode" using specific tools. Developers can then modify the code data in "source code mode" and republish it as a binary component for use by other modules.
[0031] Here, switching from binary mode to source code mode refers to pointing the reference of code data in binary mode to the code data in source code mode stored at a certain location, and informing the integrated development environment to regenerate the project structure through synchronization. Currently, various tools have been developed for performing synchronization operations; however, during development, it may be necessary to perform multiple switches between binary mode and source code mode. The switching process will trigger resynchronization of code data, and synchronization may result in significant time delays. Therefore, a faster and more efficient way to switch code data is desired to improve the overall development efficiency of the application.
[0032] Overview of code data management
[0033] To at least partially address the shortcomings of the prior art, a method for switching code data is proposed according to an exemplary implementation of this disclosure. Referring to Figure 2, which describes an overview of an exemplary implementation of this disclosure, Figure 2 illustrates a block diagram 200 for switching code data according to some implementations of this disclosure. As shown in Figure 2, description data 210 of project 120 can be obtained, which can describe the association between the code data of multiple modules (e.g., module 130, ..., and module 140) in project 120 and project 120.
[0034] Specifically, the association can represent that the project includes modules 130, ..., and 140. Here, associations can exist between the modules; for example, code data of module 140 can depend on code data of module 130 (e.g., calling functions defined in the code data of module 130, etc.). The reference mode of the code data of modules in multiple modules can include at least one of the following: binary mode and source code mode, and the description data 210 can reference code data in either binary mode or source code mode. For example, code data of a relatively stable module can be referenced in binary mode, and code data of a module under development can be referenced in source code mode.
[0035] During development, it may be necessary to adjust the functionality of a module in binary mode. In this case, the reference mode needs to be switched from binary mode to source code mode to allow for source code adjustments. Specifically, in response to the determination that the first code data of the first module among multiple modules has been switched from binary mode to source code mode, second configuration data for the first module can be generated based on the first configuration data of the first module. At this point, the second configuration data can be used to update the project's description data. Referring to Figure 2, the reference mode of module 130 can be switched 220 to source code mode. At this time, new configuration data 230' can be generated, thereby updating the description data 210.
[0036] Using the example implementation of this disclosure, a special processing procedure can be performed on the code data of the switched module, and only the relevant code data of the switched module is synchronized, thereby improving development efficiency without having to synchronize the code data of the entire project.
[0037] Detailed process of code data management
[0038] Having described an overview of some implementations according to this disclosure, the following description, with reference to Figure 3, illustrates the storage method of data involved in the development process. Figure 3 shows a block diagram 300 of the directory structure involved in a project according to some implementations of this disclosure. As shown in Figure 3, directory 310 may represent the root directory of the project, and this directory may store various types of data involved in the development process. For example, directory 322 may store data used to control the structure of the project, and directory 320 may store data used to implement other functions. Subdirectories may be set in directory 322; for example, library directory 330 may store data related to the code libraries called by various modules, and module directory 332 may store data related to the various modules called in the project.
[0039] For different integrated development environments (IDEs), the directories can have different naming conventions. For example, in one development environment, directory 322 could be named ".idea", library directory 330 could be named "libraries", module directory 332 could be named "modules", and so on. In other development environments, the directories can be named in other ways. Module directory 332 can include configuration data for each module in the project. Suppose the project includes module A, module B, and module C, etc. In this case, module directory 332 can include configuration data for each module. For example, configuration data 230 can be stored in file "MODULE-A", configuration data 240 can be stored in file "MODULE-B", and configuration data 340 can be stored in file "MODULE-C", and so on.
[0040] It should be understood that configuration data can be stored in different file formats. For example, configuration data can be defined in XML (Extensible Markup Language) format; alternatively and / or additionally, in other application environments, configuration data can be stored in IML format or other custom formats.
[0041] According to some implementations of this disclosure, in order to generate second configuration data, the metadata of the first module can be extracted from the first configuration data, and then the second configuration data can be generated based on the metadata. It should be understood that the switching process will affect the referencing mode of the first module, but will not completely modify the relevant metadata. At this time, new configuration data can be generated based on the current metadata of the first module (i.e., the metadata before the switch).
[0042] Specifically, the metadata includes at least one of the following: dependencies of the first code data, representing the dependencies between various modules involved in the project; an asset directory, representing the storage location of various assets called in the project; a source code directory, representing the storage location of the source code files of the first module (i.e., the first code data in source code mode); a resource directory, representing the storage location of various resources called in the project; and a root directory, representing the storage location of the project on the computing device, such as directory 310 shown in Figure 3. Generally, the above metadata does not change before and after switching reference modes. Using the example implementation of this disclosure, the extracted metadata can be reused to generate new configuration data. In this way, the processing performance of the switching process can be improved, thereby increasing overall development efficiency.
[0043] According to some implementations of this disclosure, the aforementioned metadata can be included in the configuration data of the first module. For example, special fields can be inserted into the configuration data to store the aforementioned metadata. Alternatively and / or additionally, the configuration data may include one or more files. For example, in some integrated development environments, the aforementioned metadata may be stored in a separate Project Object Model (POM) file; or, for example, the aforementioned metadata may be stored in a local and / or remote data repository on the computing device, provided that the data repository is accessible during the switchover phase.
[0044] According to some implementations of this disclosure, after switching to source code mode, developers can edit the source code of the first module, thereby adjusting the functionality of the first module. Using the example implementations of this disclosure, only the code data of the module associated with the mode switch can be resynchronized. In this case, the workload involved in the switching process will be far less than the workload of synchronizing the relevant code data for the entire project, thereby improving development efficiency.
[0045] According to some implementations of this disclosure, in order to update the project's description data, the first configuration data can be replaced with second configuration data to update the association relationships. Referring to Figure 3 for further details, assuming the developer switches the reference mode of module A (corresponding to configuration data 230) from binary mode to source code mode, new configuration data can be generated based on the file "MODULE-A", for example, file "MODULE-A'". Furthermore, file "MODULE-A'" can be used to replace file "MODULE-A". Using the example implementations of this disclosure, the reference modes of modules included in the project can be updated in real time, and the latest code data can be invoked during application development.
[0046] It should be understood that since the description data of the project specifies the various modules involved in the project, it is also necessary to replace the corresponding parts of the description data with code data corresponding to the source code pattern. According to some implementations of this disclosure, in order to update the association, the part corresponding to the first configuration data can be determined in the description data of the project; and the part can be replaced based on the second configuration data. See Figure 4 for more details, which shows a block diagram 400 of the structure of the description data 210 according to some implementations of this disclosure.
[0047] It should be understood that Figure 4 only schematically illustrates a portion of the descriptive data. For example, rows 410, 420, and 430 respectively represent that the project includes module A, module B, and module C, etc. When module A is switched to source code mode, the part corresponding to module A, "MODULE-A", can be replaced with "MODULE-A'". It should be understood that Figure 4 is merely illustrative, and the descriptive data can be stored in other formats. For example, the name of module A can be specified as "MODULE-A", and this name can be used to refer to module A in the project. Furthermore, the address of the code data corresponding to this name can be specified, such as the name and path of the source code file, etc. At this time, the address of the code data corresponding to module A can be found, and the replacement process can be performed.
[0048] Using the example implementation disclosed herein, the project can be updated in real time so that source code mode code data can be invoked to participate in the build process during subsequent development. In this case, during development, binary mode code data will no longer be referenced; instead, source code mode code data will be recompiled, and then the subsequent build process will be executed.
[0049] According to some implementations of this disclosure, the portion of the configuration data corresponding to the first module can be modified so that the project can call the code data of the source code mode. Figure 5 shows a block diagram 500 of the structure of the configuration data according to some implementations of this disclosure. As shown in Figure 5, the content node 510 can, for example, describe the storage location of various related data. At this time, the data of the content node 510 can be updated using the relevant information of the code data of the source code mode (e.g., name, storage location, etc.).
[0050] It should be understood that there may be relationships between the various modules in a project, such as dependencies. In this case, it is necessary to update the corresponding data of the modules that have dependencies on the first module being switched. According to some implementations of this disclosure, during the process of updating the project's description data, a second module among multiple modules can be determined based on the relationships; and in response to determining that there is a relationship between the second code data of the second module and the first code data of the first module, the second configuration data is updated using the second configuration data.
[0051] Specifically, the configuration data of each module in the project can be traversed to find modules that have a dependency relationship with the switched module. Continuing the example above, suppose module B depends on module A, and module A is switched to source code mode. At this time, the corresponding part of the configuration data of module B can be modified. Alternatively and / or additionally, other modules that have a dependency relationship with module A can be found in a similar manner, and the configuration data of these other modules can be modified. Using the example implementation of this disclosure, the dependencies between modules in the project can be updated in real time so that the latest relevant data of the first module can be called.
[0052] According to some implementation methods of this disclosure, the part corresponding to the first configuration data can be determined in the sequential project nodes of the project's description data; and the part to be replaced based on the second configuration data. In this way, it is convenient to find and replace the part in the project corresponding to code switching, thereby reflecting various changes in the project in real time and improving the development efficiency of the application.
[0053] Referring again to Figure 5, the sequential item nodes 520 in configuration data 240 can store the names and / or other identifiers of other modules that have dependencies on the current module. Specifically, assuming configuration data 240 corresponds to module B, the sequential item node 520 indicates that module B depends on module A, and module B depends on module C. If only the reference mode of module A is switched to source code mode, the portion of the sequential item node 520 in configuration data 240 corresponding to module A, i.e., "MODULE-A", can be modified to "MODULE-A'". In this case, module B will call the functions defined in the source code mode code data, instead of calling the functions defined in the previously constructed binary mode code data.
[0054] In a project, you can specify the type of reference relationships between modules. For example, binary mode means that module B calls the binary mode code data of module A. In this case, module B directly calls functions in the constructed binary file. As another example, source code mode means that module B calls the source code mode code data of module A. In this case, module B calls functions in the binary file built based on the source code.
[0055] According to some implementations of this disclosure, in response to determining that the reference mode of the second code data to the first code data is binary mode, the reference mode for the first code data is set to binary mode. Using the example implementations of this disclosure, a specific reference mode can be set according to a specified mode. For example, for modules with relatively stable functionality, binary mode can be set to reduce the amount of code involved in the build process, thereby improving development efficiency.
[0056] According to some implementations of this disclosure, in response to determining that the reference mode of the second code data to the first code data is source code mode, the reference mode to the first code data is set to source code mode. Specifically, for modules under development, source code mode can be set to continuously update and test the functionality of the module, and further, the updated functionality can be reflected in the application in real time, thereby providing overall functional testing.
[0057] According to some implementations of this disclosure, developers can modify the code data in the source code schema to perform debugging and release processes. Specifically, in response to receiving an update request for the first code data in the source code schema, third code data in the source code schema is generated; and based on the third code data in the source code schema, metadata is updated. Using the example implementations of this disclosure, developers can continuously adjust the source code of modules; for example, they can modify the functionality of modules, eliminate potential errors in the source code, and thus make the functionality of each module more in line with design requirements.
[0058] Typically, developers only adjust statements in the source code and do not modify the metadata of the code data; therefore, the metadata is not updated in this case. In some cases, developers may adjust the project's directory structure and / or other configurations, which may result in metadata updates. According to some implementations of this disclosure, second configuration data is determined based on the updated metadata. For example, the updated metadata can be stored in a POM file so that the latest metadata can be directly read from the POM file during subsequent development. Using the example implementations of this disclosure, it can be ensured that the second configuration data always reflects the latest attributes of the module's code data, thereby ensuring that the project can be updated in real time.
[0059] According to some implementations of this disclosure, after the source code development and debugging are completed, developers can execute the build and release process. Specifically, in response to receiving a build request for third code data, fourth code data in binary mode is generated. Using the example implementations of this disclosure, updated binary mode code data can be generated through a build operation even after the source code has been updated. In this way, other modules in the project can call the binary mode code data according to a specified pattern, thereby reducing the amount of code involved in the build process.
[0060] Using the example implementation of this disclosure, a dedicated processing procedure can be performed on the code data of the switched module, and only the relevant code data of the switched module is synchronized, thereby improving development efficiency without having to synchronize the code data of the entire project.
[0061] Example process
[0062] Figure 6 shows a flowchart of a method 600 for switching code data according to some implementations of this disclosure. At block 610, description data of the project is obtained. This description data describes the association between the code data of multiple modules in the project and the project itself. The reference mode of the code data of the modules in the multiple modules includes at least one of the following: binary mode and source code mode. At block 620, in response to determining that the reference mode of the first code data of the first module in the multiple modules has been switched from binary mode to source code mode, second configuration data of the first module is generated based on the first configuration data of the first module. At block 630, the description data of the project is updated using the second configuration data.
[0063] According to some implementations of this disclosure, generating the second configuration data includes: extracting metadata of the first module from the first configuration data, the metadata including at least one of the following: dependencies of the first code data, asset directory, source code directory, resource directory, and root directory; and generating the second configuration data based on the metadata.
[0064] According to some implementations of this disclosure, updating the description data of the project includes: replacing the first configuration data with the second configuration data to update the association relationship.
[0065] According to some implementations of this disclosure, updating the association includes: determining the portion corresponding to the first configuration data in the project's description data; and replacing the portion based on the second configuration data.
[0066] According to some implementations of this disclosure, the method further includes: determining a second module among a plurality of modules based on an association relationship; and updating the second configuration data of the second module using the second configuration data in response to determining that there is an association relationship between the second code data of the second module and the first code data of the first module.
[0067] According to some implementations of this disclosure, updating the second configuration data of the second module using the second configuration data includes: determining the portion corresponding to the first configuration data in the sequential item nodes of the second configuration data; and replacing the portion based on the second configuration data.
[0068] According to some implementations of this disclosure, the method further includes at least one of the following: in response to determining that the reference mode of the second code data to the first code data is binary mode, setting the reference mode of the first code data to binary mode; and in response to determining that the reference mode of the second code data to the first code data is source code mode, setting the reference mode of the first code data to source code mode.
[0069] According to some implementations of this disclosure, the method further includes: generating third code data of the source code mode in response to receiving an update request for first code data of the source code mode; and updating metadata based on the third code data of the source code mode.
[0070] According to some implementations of this disclosure, the method further includes: determining second configuration data based on updated metadata.
[0071] According to some implementations of this disclosure, the method further includes: generating fourth code data in binary mode in response to receiving a build request for third code data.
[0072] Example devices and equipment
[0073] Figure 7 shows a block diagram of an apparatus 700 for switching code data according to some implementations of the present disclosure. The apparatus 700 includes: an acquisition module 710 configured to acquire description data of a project, the description data describing the association between code data of multiple modules in the project and the project, the reference mode of the code data of the multiple modules including at least one of the following: binary mode and source code mode; a generation module 720 configured to generate second configuration data of the first module based on the first configuration data of the first module in response to determining that the reference mode of the first code data of the first module among the multiple modules is switched from binary mode to source code mode; and an update module 730 configured to update the description data of the project using the second configuration data.
[0074] According to some implementations of this disclosure, the 720 generation module includes: an extraction module configured to extract metadata of the first module from the first configuration data, the metadata including at least one of the following: dependencies of the first code data, asset directory, source code directory, resource directory, and root directory; and a data generation module configured to generate second configuration data based on the metadata.
[0075] According to some implementations of this disclosure, the update module 730 includes: a replacement module configured to replace the first configuration data with the second configuration data to update the association relationship.
[0076] According to some implementations of this disclosure, the replacement module includes: a search module configured to determine a portion corresponding to the first configuration data in the description data of the project; and a data replacement module configured to replace the portion based on the second configuration data.
[0077] According to some implementations of this disclosure, the apparatus 700 further includes: a module determination module configured to determine a second module among a plurality of modules based on an association relationship; and a dependency update module configured to update the second configuration data of the second module using the second configuration data in response to determining that there is an association relationship between the second code data of the second module and the first code data of the first module.
[0078] According to some implementations of this disclosure, the dependency update module includes: a search module configured to determine the portion corresponding to the first configuration data in the sequential item nodes of the second configuration data; and a data replacement module configured to replace the portion based on the second configuration data.
[0079] According to some implementations of this disclosure, the device 700 further includes: a first setting module configured to set the reference mode for the first code data to binary mode in response to determining that the reference mode of the second code data for the first code data is binary mode.
[0080] According to some implementations of this disclosure, the device 700 further includes: a second setting module configured to set the reference mode for the first code data to source code mode in response to determining that the reference mode of the second code data for the first code data is source code mode.
[0081] According to some implementations of this disclosure, the apparatus 700 further includes: a source code update module configured to generate third code data of the source code mode in response to receiving an update request for first code data of the source code mode; and a metadata update module configured to update metadata based on the third code data of the source code mode.
[0082] According to some implementations of this disclosure, the apparatus 700 further includes: a configuration data determination module configured to determine second configuration data based on updated metadata.
[0083] According to some implementations of this disclosure, the apparatus 700 further includes: a construction module configured to generate a fourth code data in binary mode in response to receiving a construction request for the third code data.
[0084] Figure 8 shows a block diagram of a device 800 capable of implementing various implementations of the present disclosure. It should be understood that the computing device 800 shown in Figure 8 is merely exemplary and should not constitute any limitation on the functionality and scope of the implementations described herein. The computing device 800 shown in Figure 8 can be used to implement the methods described above.
[0085] As shown in Figure 8, the computing device 800 is in the form of a general-purpose computing device. Components of the computing device 800 may include, but are not limited to, one or more processors or processing units 810, memory 820, storage devices 830, one or more communication units 840, one or more input devices 850, and one or more output devices 860. The processing unit 810 may be a physical or virtual processor and is capable of performing various processes according to programs stored in memory 820. In a multiprocessor system, multiple processing units execute computer-executable instructions in parallel to improve the parallel processing capability of the computing device 800.
[0086] Computing device 800 typically includes multiple computer storage media. Such media can be any available media accessible to computing device 800, including but not limited to volatile and non-volatile media, removable and non-removable media. Memory 820 can be volatile memory (e.g., registers, cache, random access memory (RAM)), non-volatile memory (e.g., read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. Storage device 830 can be removable or non-removable media and can include machine-readable media, such as flash drives, disks, or any other media that can be used to store information and / or data (e.g., training data for training) and can be accessed within computing device 800.
[0087] The computing device 800 may further include additional removable / non-removable, volatile / non-volatile storage media. Although not shown in FIG8, disk drives for reading from or writing to removable, non-volatile disks (e.g., "floppy disks") and optical disk drives for reading from or writing to removable, non-volatile optical disks may be provided. In these cases, each drive may be connected to a bus (not shown) via one or more data media interfaces. The memory 820 may include a computer program product 825 having one or more program modules configured to perform various methods or actions of various implementations of the present disclosure.
[0088] The communication unit 840 enables communication with other computing devices via a communication medium. Additionally, the components of the computing device 800 can function as a single computing cluster or multiple computing machines capable of communicating via communication connections. Therefore, the computing device 800 can operate in a networked environment using logical connections to one or more other servers, networked personal computers (PCs), or another network node.
[0089] Input device 850 can be one or more input devices, such as a mouse, keyboard, trackball, etc. Output device 860 can be one or more output devices, such as a monitor, speaker, printer, etc. Computing device 800 can also communicate as needed with one or more external devices (not shown) via communication unit 840. These external devices, such as storage devices, display devices, etc., can communicate with one or more devices that enable user interaction with computing device 800, or with any device (e.g., network card, modem, etc.) that enables computing device 800 to communicate with one or more other computing devices. Such communication can be performed via input / output (I / O) interfaces (not shown).
[0090] According to exemplary implementations of this disclosure, a computer-readable storage medium is provided that stores computer-executable instructions thereon, wherein the computer-executable instructions are executed by a processor to implement the methods described above. According to exemplary implementations of this disclosure, a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, which are executed by a processor to implement the methods described above. According to exemplary implementations of this disclosure, a computer program product is provided that stores a computer program thereon, which, when executed by a processor, implements the methods described above.
[0091] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatuses, devices, and computer program products implemented according to this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0092] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processing unit of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0093] Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions that execute on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0094] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction, which contains one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0095] Various implementations of this disclosure have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed implementations. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described implementations. The terminology used herein is chosen to best explain the principles, practical applications, or improvements to technology in the market, or to enable others skilled in the art to understand the various implementations disclosed herein.
Claims
1. A method for switching code data, comprising: Obtain the description data of the project, which describes the association between the code data of multiple modules in the project and the project. The reference mode of the code data of the multiple modules includes at least one of the following: binary mode and source code mode. In response to the reference mode of determining the first code data of the first module among the plurality of modules being switched from the binary mode to the source code mode, second configuration data of the first module is generated based on the first configuration data of the first module; as well as The description data of the project is updated using the second configuration data.
2. The method according to claim 1, wherein generating the second configuration data comprises: Extract the metadata of the first module from the first configuration data. The metadata includes at least one of the following: the dependencies of the first code data, the asset directory, the source code directory, the resource directory, and the root directory. as well as The second configuration data is generated based on the aforementioned metadata.
3. The method according to claim 1, wherein updating the description data of the project comprises: The first configuration data is replaced with the second configuration data to update the association.
4. The method of claim 3, wherein updating the association comprises: In the description data of the project, determine the portion corresponding to the first configuration data; as well as The portion is replaced based on the second configuration data.
5. The method of claim 1, further comprising: The second module among the plurality of modules is determined based on the aforementioned relationship; as well as In response to determining that there is an association between the second code data of the second module and the first code data of the first module, the second configuration data of the second module is updated using the second configuration data.
6. The method according to claim 5, wherein updating the second configuration data of the second module using the second configuration data comprises: In the sequential item nodes of the second configuration data, determine the portion corresponding to the first configuration data; as well as The portion is replaced based on the second configuration data.
7. The method of claim 6, further comprising at least one of the following: In response to determining that the reference mode of the second code data to the first code data is the binary mode, the reference mode to the first code data is set to the binary mode; and In response to determining that the reference mode of the second code data to the first code data is the source code mode, the reference mode to the first code data is set to the source code mode.
8. The method of claim 2, further comprising: In response to receiving an update request for the first code data of the source code pattern, third code data of the source code pattern is generated; as well as The metadata is updated based on the third code data of the source code pattern.
9. The method of claim 8, further comprising: The second configuration data is determined based on the updated metadata.
10. The method of claim 8, further comprising: In response to receiving a build request for the third code data, the fourth code data of the binary mode is generated.
11. An apparatus for switching code data, comprising: The acquisition module is configured to acquire the description data of the project, which describes the association between the code data of multiple modules in the project and the project. The reference mode of the code data of the multiple modules includes at least one of the following: binary mode and source code mode. The generation module is configured to switch the reference mode from the binary mode to the source mode in response to the determination of the reference mode of the first code data of the first module among the plurality of modules. The code mode generates the second configuration data of the first module based on the first configuration data of the first module; as well as An update module is configured to update the description data of the project using the second configuration data.
12. An electronic device, comprising: At least one processing unit; as well as At least one memory, coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions causing the electronic device to perform the method according to any one of claims 1 to 10 when executed by the at least one processing unit.
13. A computer-readable storage medium having a computer program stored thereon, the computer program causing the processor to implement the method according to any one of claims 1 to 10 when executed by a processor.
14. A computer program product comprising a computer program, wherein the computer program, when executed by a processor, implements the method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Program debugging method and device, electronic equipment and storage medium
CN110377523A
Binary system and source code switching method based on IOS system modularization development
CN110750310A
Software engineering compiling method and device, equipment and medium
CN114138281A
Binary translation using raw binary code with compiler produced metadata
US20230385041A1