Method and apparatus for managing code data, device, and medium

WO2026188421A1PCT designated stage Publication Date: 2026-09-17BEIJING ZITIAO NETWORK TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/081949
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-03-11
Publication Date
2026-09-17

Smart Images

  • Figure CN2025081949_17092026_PF_FP_ABST
    Figure CN2025081949_17092026_PF_FP_ABST
Patent Text Reader

Abstract

Provided are a method and apparatus for managing code data, a device, and a medium. The method comprises: in response to receiving a merge request for merging first code data to second code data, determining an application programming interface associated with the merge request; acquiring an interface definition of the application programming interface, the interface definition describing at least one data item specified in the application programming interface; adding annotation data associated with the at least one data item to the interface definition, the annotation data describing the at least one data item in accordance with code specifications of a code management platform; and submitting the second code data to the code management platform on the basis of the interface definition. By means of the implementation of the present disclosure, in a code management platform, at least one data item can be automatically described in accordance with a code specification on the basis of annotation data. In this way, the workload of manual annotation can be reduced, and the potential risk of code data being unavailable due to manual errors can be avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Methods, apparatus, devices, and media for managing code data Technical Field

[0001] Implementations of this disclosure generally relate to software development, and in particular to methods, apparatus, devices, and computer-readable storage media for managing code data. Background Technology

[0002] For example, during application development, developers can continuously add features to the application. Developers can submit application code data to a unified code management platform to check if the code data conforms to predefined code standards. To facilitate code data management, the code management platform requires that the meaning of each data item in the code data be interpreted according to the platform's specified code standards. This leads to a significant amount of manual work, especially since multiple versions may be involved during application development, requiring manual processing of data items from different versions of the code data. Summary of the Invention

[0003] In a first aspect of this disclosure, a method for managing code data is provided. In one method, in response to receiving a merge request for merging first code data into second code data, an application programming interface (API) associated with the merge request is determined. An interface definition of the API is obtained, the interface definition describing at least one data item specified in the API. Annotation data associated with the at least one data item is added to the interface definition, the annotation data describing the at least one data item according to the code specifications of a code management platform. Based on the interface definition, the second code data is submitted to the code management platform.

[0004] In a second aspect of this disclosure, an apparatus for managing code data is provided. The apparatus includes: a determining module configured to, in response to receiving a merge request for merging first code data into second code data, determine an application programming interface (API) associated with the merge request; an obtaining module configured to obtain an interface definition of the API, the interface definition describing at least one data item specified in the API; an adding module configured to add annotation data associated with the at least one data item to the interface definition, the annotation data describing the at least one data item according to the code specifications of a code management platform; and a submitting module configured to submit the second code data to a code management platform based on the interface definition.

[0005] 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.

[0006] 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.

[0007] In a fifth aspect of this disclosure, a computer program product is provided, including a computer program, wherein the computer program, when executed by a processor, implements the method according to a first aspect of this disclosure.

[0008] 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

[0009] In the following detailed description, the above and other features, advantages, and aspects of various implementations of this disclosure will become more apparent, taken in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals denote the same or similar elements, wherein:

[0010] Figure 1 shows a block diagram of an application environment according to one implementation of the present disclosure;

[0011] Figure 2 shows a block diagram for managing code data according to some implementations of this disclosure;

[0012] Figure 3 shows a block diagram of some implementations of this disclosure for submitting code data to a code management platform;

[0013] Figure 4 shows a block diagram of the interface definition according to some implementations of this disclosure;

[0014] Figure 5 shows a block diagram illustrating the specification of attributes of data items in a code management platform according to some implementations of this disclosure;

[0015] Figure 6 shows a flowchart of a method for managing code data according to some implementations of this disclosure;

[0016] Figure 7 shows a block diagram of an apparatus for managing code data according to some implementations of this disclosure; and

[0017] Figure 8 shows a block diagram of a device capable of implementing various implementations of the present disclosure. Detailed Implementation

[0018] 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.

[0019] 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.

[0020] 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.

[0021] 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.

[0022] 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.

[0023] 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.

[0024] 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.

[0025] 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.

[0026] Example Environment

[0027] Software development requires adherence to various standards, and as applications grow in scale, the number of code standards involved increases. For example, during application development, developers continuously complete application functionalities. Developers can submit application code data to a unified code management platform to check whether the code data conforms to predetermined code standards. Figure 1 illustrates an application environment according to some implementations of this disclosure, showing a block diagram 100 of an application environment according to an exemplary implementation of this disclosure. As shown in Figure 1, different versions of code data may exist at different points in time during application development. For example, first code data 110 may exist at time T1, and second code data 120 may exist at time T2. At time T1, developers can submit first code data 110 to the code management platform 130. To facilitate code data management, the code management platform requires the submitter to interpret the meaning of each data item in the code data according to the platform-specified format, for example, determining that a data item corresponds to a certain attribute in the code standard.

[0028] Typically, developers can declare basic information about each data item in the first code data 110 in the interface definition (e.g., written using an Interface Definition Language) and import the interface definition into the code management platform. Furthermore, the meaning of each data item in the code data can be filled in one by one through the interface provided by the code platform. However, this results in a large amount of manual work, especially since the application development process may involve multiple versions, requiring manual processing of each data item in the code data.

[0029] As development progresses, at point T2, a second set of code data (120) may exist, which the developers need to submit to the code management platform (130). At this point, the developers must again manually fill in the meaning of each data item in the second set of code data (120). This process requires switching between multiple interfaces on the software development platform and the code management platform, making it complex and error-prone. Furthermore, manual annotation may result in omissions, making it impossible to verify the existence of risks in the code data on the code management platform, thus rendering the code data unusable. Therefore, a more efficient and reliable method for managing code data is desired.

[0030] Summary of managing code data

[0031] To at least partially address the shortcomings of the prior art, a method for managing code data is proposed according to one implementation of this disclosure. Referring to Figure 2, which describes an overview of one implementation of this disclosure, Figure 2 shows a block diagram 200 for managing code data according to some implementations of this disclosure. As shown in Figure 2, a method for managing code data is proposed. Specifically, a merge request 210 for merging first code data into second code data can be received, and an application programming interface (API) 212 associated with the merge request can be determined. Further, an interface definition 220 of the application programming interface 212 can be obtained. Here, the interface definition 220 can describe at least one data item 222 (e.g., a field defined in the code data) specified in the application programming interface 212.

[0032] Annotation data 224 associated with at least one data item can be added to interface definition 220. Annotation data 224 describes at least one data item according to the code management platform's code specifications. For example, annotation data can specify a label for a data item, which maps the data item to an attribute specified in the code management platform's code specifications. Then, second code data can be submitted to the code management platform 130 based on interface definition 220. Subsequently, in the code management platform 130, at least one data item can be described according to the code specifications based on the annotation data. In this way, the meaning of data items can be automatically described in the code management platform, reducing the workload of manual annotation and avoiding the potential risk of unusable code data due to human error.

[0033] Detailed process of managing code data

[0034] Having described an overview of some implementations according to this disclosure, further details regarding methods for managing code data will be described below. Referring to Figure 3, which illustrates a block diagram 300 for submitting code data to a code management platform according to some implementations of this disclosure, further details regarding code data management are provided. As shown in Figure 3, at block 310, a merge request can be created, which may indicate the merging of second code data at a subsequent time point T2 into first code data from a previous time point T1.

[0035] At box 320, the interface definition associated with the merge request can be edited. According to some implementations of this disclosure, the application programming interface (API) associated with the merge request can be determined first. During this process, difference data between first code data and second code data can be determined; and based on the difference data, the API is determined. Specifically, the first code data is the version at time point T1, and the second code data is the version at time point T2; the first code data and the second code data can be compared to determine the difference data.

[0036] It should be understood that the differences in the data may involve various scenarios. Assuming the first code data includes API1, API2, and API3, the second code data may include API3, the new API4, the updated API1 (e.g., denoted as API1'), and exclude API2 (i.e., API2 has been removed). In this case, the corresponding application programming interfaces (APIs) can be determined based on these differences. Since API3 in the second code data remains unchanged, the API3 interface definition from the previous commit of the first code data can be reused. Because the second code data excludes API2, API2 can be disregarded during this commit; in this case, only comment data can be added to the interface definitions of API4 and API1'.

[0037] It should be understood that the above is merely an example of an interface definition; alternatively and / or additionally, interface definitions may involve more, fewer, or different APIs. Using some implementations of this disclosure, only different parts of the software development process need to be processed, and only annotation data associated with those different parts needs to be added. In this way, the amount of data to be processed can be reduced, thereby reducing the workload related to code data management.

[0038] At box 320, basic information about the API associated with the difference data can be obtained, such as the name, type, etc., of each data item defined in the API. Then, annotation data for each data item can be obtained. According to some implementations of this disclosure, the annotation data is used to map at least one data item specified in the application programming interface to at least one attribute specified in the code specification. It should be understood that the code specification can specify various attributes of the data items in the code data. For example, it can specify the category of the data item, whether the data item is hidden (e.g., it can specify that the data item is automatically hidden when it is not allowed to be used), etc. Suppose the code specification defines the following attributes: att1, att2, ..., attn, then annotation data can be used to map the data items to a certain attribute. For example, when a user enters annotation data according to the annotation format, candidate options corresponding to attributes att1, att2, ..., attn can be automatically provided to support the user in directly selecting the desired attribute. In this way, annotation data can be added to the interface definition automatically, thereby automatically generating tasks that will be executed in the code management platform.

[0039] According to some implementations of this disclosure, during the process of adding annotation data to the interface definition, a annotation format corresponding to the code specification can be provided, and annotation data corresponding to at least one data item can be received according to the annotation format. For example, the attribute corresponding to the current data item can be selected from multiple pop-up candidates. Assuming that the code data includes a data item item1, and this data item belongs to the attribute att1, the attribute att1 can be selected for the data item item1. Furthermore, annotation data can be added at the position corresponding to at least one data item in the interface definition. For example, annotation data can be added after the basic information of the data item item1. Using some implementations of this disclosure, the annotation format can map data items to attributes corresponding to the code specification, thereby making it convenient for users to specify corresponding attributes for data items in the code data.

[0040] According to some implementations of this disclosure, annotation data can include multiple types. For example, annotation data can include annotation statements that map at least one data item to a default attribute in at least one property. In this way, default attributes can be automatically specified for each data item in the code data; for example, the aforementioned annotation statements can be added at the beginning of the interface definition. See Figure 4 for more details. Figure 4 shows a block diagram 400 of an interface definition according to some implementations of this disclosure. As shown in Figure 4, multiple data items can be defined in the application programming interface 212. Basic information about each data item is shown in the interface definition 220: data item 1 is of type string, data item 2 is of type 64-bit integer (int64), and data item 3 is of type string. Alternatively and / or additionally, the application programming interface 212 can include more, fewer, or different data items.

[0041] Comment statement 410 can automatically specify default attributes for each data item in the code data. Specifically, comment statement 410 can map data items item1, item2, ..., item3, etc., to the default attribute "att1". In this way, attributes of multiple data items can be specified by a single comment statement in a simple and efficient manner, thereby avoiding the complex process of specifying attributes for each data item separately. Alternatively and / or additionally, comment statements can map at least one data item to a target attribute in at least one attribute. For example, comment statement 420 can map data item3 to attribute "att2". In this way, it is possible to specify the desired attribute for a single data item, thereby supporting a more flexible way of managing individual data items in the code data.

[0042] According to some implementations of this disclosure, annotation data can support multiple code standards. For example, suppose the application will be released in different regions, and different regions may have their own code standards. In this case, the identifier of the code standard followed by the code statement can be specified in the code statement. For example, the keyword "spec1" in comment statement 420 can specify that the statement maps the data item item3 to the attribute "att2" in the code standard with the identifier "spec1". In this way, the annotation format can support multiple different code standards simultaneously, thereby managing the code data of applications that will be released in different regions in a more convenient and efficient manner.

[0043] Returning to Figure 3, at box 330, a syntax check can be performed on the interface definition 220 shown in Figure 4. This check can verify that each statement in the interface definition 220 conforms to the syntax requirements. It should be understood that since the interface definition 220 includes basic API information and comment data, the syntax check here can include two aspects: checking whether the basic information portion conforms to the syntax of the interface definition language, and checking whether the comment data conforms to the syntax of the comment format.

[0044] According to some implementation methods of this disclosure, syntax checks can be performed on the interface definition. In response to determining that the interface definition fails the syntax check, a prompt message for re-editing the interface definition can be provided. Specifically, it can first be determined whether the identifiers, types, etc., of each data item in the interface definition are consistent with the definition in the API. Further, it can be determined whether the comment data conforms to the syntax of the comment format. For example, it can be determined whether the keywords in comment statements 410 and 420 in Figure 4 are keywords supported by the comment format, and whether the code style identifiers in the comment statements are correct, etc. Using some implementation methods of this disclosure, the accuracy of the interface definition's syntax can be ensured, thereby avoiding anomalies during subsequent code data submission to the code management platform.

[0045] According to some implementations of this disclosure, as shown in Figure 3, if the interface definition fails the syntax check, it can return to box 320 to re-edit the interface definition. In response to determining that the interface definition passes the syntax check, at box 340, the interface definition can be merged into the main version of the interface definition. Here, the main version can refer to a previous version submitted to the code management platform, such as the response interface definition of the first code data described above. At this point, the merged interface definition can include data items defined in all code data, as well as corresponding comment data.

[0046] According to some implementations of this disclosure, semantic checks can be performed on the interface definition, and in response to determining that the interface definition has failed the semantic check, a prompt message for a re-editing and merging request can be provided. At box 350, semantic checks can be performed on the merged interface definition. This semantic check can be used to determine whether the comment data in the interface definition can clearly describe each data item in the interface definition according to the code management platform's code style guidelines.

[0047] Specifically, the process can check whether a data item is missing from the interface definition, whether the attribute labels specified for the data item are the labels defined in the code specification, and whether all the information required by the code specification has been filled in for the data item, etc. If the interface definition successfully passes the semantic check, the workflow can proceed to box 360 to submit the code data to the code management platform. Alternatively and / or additionally, if the interface definition fails the semantic check, the workflow can return to box 310 to modify the merge request. By utilizing some implementation methods of this disclosure, it can be ensured that the interface definition includes all the correct information required by the code management platform, thereby avoiding the potential risk of having to resubmit the code data due to missing information or submitting incorrect information.

[0048] According to some implementations of this disclosure, in the process of submitting second code data to the code management platform based on the interface definition, a submission request can be generated based on annotation data. The submission request is used to submit the second code data to the code management platform and map at least one data item to at least one attribute within the code management platform. Specifically, the submission request can submit the second code data according to a format specified by the code management platform. Furthermore, the submission request can further include an instruction supported by the code management platform. Upon receiving the instruction, the code management platform can automatically invoke the instruction to map at least one data item to at least one attribute within the code management platform. Here, the instruction can be generated according to the work order format of the code management platform.

[0049] According to some implementations of this disclosure, in the process of generating a submission request based on annotation data, at least one attribute corresponding to at least one data item can be extracted from the annotation data in the interface definition; and a submission task can be generated according to the task definition standard of the code management platform. The submission task may include one or more instructions. For example, the default attribute "att1" corresponding to each data item can be extracted from annotation statement 410. Here, "attribute" represents the name of the attribute, and "att1" represents the value of the default attribute. In this case, instructions can be generated according to the task definition standard of the code platform. For example, an example instruction is: all attribute = att1. Alternatively and / or additionally, the attribute "att2" corresponding to data item item3 can be extracted from annotation statement 420. An example instruction is: item3.attribute = att2.

[0050] It should be understood that the instructions in the above-described task submission are merely illustrative. Alternatively and / or additionally, more, fewer, or different instructions can be generated based on the annotation data. Also, the format of the instructions above is illustrative, and instructions with different formats can be generated based on the task definition annotations of the code management platform.

[0051] Furthermore, a commit request can be sent to the code management platform. This commit request can trigger one or more instructions to map data items to corresponding attributes within the code management platform. Using some implementation methods disclosed herein, commit requests can be automatically generated, and upon receiving the commit request, the code management platform can directly invoke various instructions within the commit request, thereby mapping at least one data item to at least one attribute within the code management platform.

[0052] See Figure 5 for further details, which illustrates a block diagram 500 of specifying attributes of data items in a code management platform according to some implementations of this disclosure. As shown in Figure 5, basic information of data items in the code data (e.g., name, type, description, etc.) is imported into the code management platform. Furthermore, a submission task can be automatically executed in the code management platform to specify attributes for each data item. For example, calling an instruction generated based on comment statement 410 in the code management platform can specify the attribute of item1 and item2 as "att1" respectively; calling an instruction generated based on comment statement 420 in the code management platform can specify the attribute of item3 as "att2", and so on. Alternatively and / or additionally, instructions for specifying other attributes (e.g., hidden status, etc.) can be generated in a similar manner. Using some implementations of this disclosure, the user does not need to specify specific numerical values ​​for attributes for each data item individually in the code management platform.

[0053] Using the implementation method disclosed herein, at least one data item can be automatically described according to the annotation data in a code management platform. This reduces the workload of manual processing and avoids the potential risk of code data becoming unusable due to human error.

[0054] Example process

[0055] Figure 6 illustrates a flowchart of a method 600 for managing code data according to some implementations of this disclosure. At block 610, in response to receiving a merge request to merge first code data into second code data, an application programming interface (API) associated with the merge request is determined. At block 620, an interface definition of the API is obtained, describing at least one data item specified in the API. At block 630, annotation data associated with at least one data item is added to the interface definition, the annotation data describing the at least one data item according to the code management platform's code specifications. At block 640, based on the interface definition, the second code data is submitted to the code management platform.

[0056] According to some implementations of this disclosure, determining the application programming interface associated with the merge request includes: determining the difference data between the first code data and the second code data; and determining the application programming interface based on the difference data.

[0057] According to some implementations of this disclosure, adding annotation data to an interface definition includes: providing a annotation format corresponding to the code specification; receiving annotation data corresponding to at least one data item input according to the annotation format; and adding annotation data at the position corresponding to at least one data item in the interface definition.

[0058] According to some implementations of this disclosure, annotation data is used to map at least one data item specified in the application programming interface to at least one attribute specified in the code specification.

[0059] According to some implementations of this disclosure, the annotation data includes at least one of the following: annotation statements that map at least one data item to a default attribute in at least one attribute; or annotation statements that map at least one data item to a target attribute in at least one attribute.

[0060] According to some implementations of this disclosure, the method further includes: performing a syntax check on the interface definition; and providing a prompt message to re-edit the interface definition in response to determining that the interface definition has failed the syntax check.

[0061] According to some implementations of this disclosure, the method further includes: performing a semantic check on the interface definition; and providing a prompt message for a re-editing and merging request in response to determining that the interface definition has failed the semantic check.

[0062] According to some implementations of this disclosure, submitting second code data to a code management platform based on an interface definition includes: generating a submission request based on annotation data, the submission request being used to submit the second code data to the code management platform and mapping at least one data item to at least one attribute in the code management platform; and sending the submission request to the code management platform.

[0063] According to some implementations of this disclosure, generating a submission request based on annotation data includes: extracting at least one attribute corresponding to at least one data item from the annotation data in the interface definition; and generating a submission task according to the task definition standard of the code management platform.

[0064] Example devices and equipment

[0065] Figure 7 shows a block diagram of an apparatus 700 for managing code data according to some implementations of the present disclosure. The apparatus 700 includes: a determining module 710 configured to determine an application programming interface (API) associated with a merge request in response to receiving a merge request for merging first code data into second code data; an obtaining module 720 configured to obtain an interface definition of the API, the interface definition describing at least one data item specified in the API; an adding module 730 configured to add annotation data associated with at least one data item to the interface definition, the annotation data describing the at least one data item according to the code specifications of a code management platform; and a submitting module 740 configured to submit the second code data to a code management platform based on the interface definition.

[0066] According to some implementations of this disclosure, the determining module is further configured to: determine the difference data between the first code data and the second code data; and determine the application programming interface based on the difference data.

[0067] According to some implementations of this disclosure, the adding module is further configured to: provide a comment format corresponding to the code specification; receive comment data corresponding to at least one data item input according to the comment format; and add comment data at the position corresponding to at least one data item in the interface definition.

[0068] According to some implementations of this disclosure, annotation data is used to map at least one data item specified in the application programming interface to at least one attribute specified in the code specification.

[0069] According to some implementations of this disclosure, the annotation data includes at least one of the following: annotation statements that map at least one data item to a default attribute in at least one attribute; or annotation statements that map at least one data item to a target attribute in at least one attribute.

[0070] According to some implementations of this disclosure, a processing module is further included, configured to: perform a syntax check on the interface definition; and, in response to determining that the interface definition has failed the syntax check, provide a prompt message for re-editing the interface definition.

[0071] According to some implementations of this disclosure, it further includes a processing module configured to: perform semantic checks on the interface definition; and, in response to determining that the interface definition has failed the semantic checks, provide a prompt message indicating a request to re-edit and merge.

[0072] According to some implementations of this disclosure, the submission module is further configured to: generate a submission request based on annotation data, the submission request being used to submit second code data to the code management platform and to map at least one data item to at least one attribute in the code management platform; and to send the submission request to the code management platform.

[0073] According to some implementations of this disclosure, the submission module is further configured to: extract at least one attribute corresponding to at least one data item from the annotation data in the interface definition; and generate a submission task according to the task definition standard of the code management platform.

[0074] 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.

[0075] 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.

[0076] 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.

[0077] 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.

[0078] 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.

[0079] 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).

[0080] According to an implementation of this disclosure, a computer-readable storage medium is provided, on which computer-executable instructions are stored, wherein the computer-executable instructions are executed by a processor to implement the method described above. According to an implementation 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 method described above. According to an implementation of this disclosure, a computer program product is provided, on which a computer program is stored, which, when executed by a processor, implements the method described above.

[0081] 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.

[0082] 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.

[0083] 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.

[0084] 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.

[0085] 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 managing code data, comprising: In response to receiving a merge request for merging first code data into second code data, determine the application programming interface associated with the merge request; Obtain the interface definition of the application programming interface, wherein the interface definition describes at least one data item specified in the application programming interface; Add annotation data associated with the at least one data item to the interface definition, wherein the annotation data describes the at least one data item in accordance with the code specifications of the code management platform; as well as Based on the interface definition, the second code data is submitted to the code management platform.

2. The method of claim 1, wherein determining the application programming interface associated with the merge request comprises: Determine the difference data between the first code data and the second code data; as well as Based on the difference data, the application programming interface is determined.

3. The method according to claim 1, wherein adding the annotation data to the interface definition includes: Provide a comment format that corresponds to the aforementioned code style; Receive the annotation data corresponding to the at least one data item, input according to the annotation format; as well as Add the annotation data at the location corresponding to the at least one data item in the interface definition.

4. The method of claim 3, wherein the annotation data is used to map the at least one data item specified in the application programming interface to at least one attribute specified in the code specification.

5. The method of claim 4, wherein the annotation data comprises at least one of the following: Comment statements that map the at least one data item to the default attribute in the at least one attribute; or Comment statements that map the at least one data item to the target attribute in the at least one attribute.

6. The method of claim 1, further comprising: Perform a syntax check on the interface definition; as well as In response to determining that the interface definition has failed the syntax check, a prompt message is provided to re-edit the interface definition.

7. The method of claim 1, further comprising: Perform semantic checks on the interface definition; as well as In response to determining that the interface definition has failed the semantic check, a prompt message is provided to re-edit the merge request.

8. The method according to claim 4, wherein submitting the second code data to the code management platform based on the interface definition includes: A submission request is generated based on the annotation data. The submission request is used to submit the second code data to the code management platform and to map the at least one data item to the at least one attribute in the code management platform. as well as Send the submission request to the code management platform.

9. The method of claim 8, wherein generating the submission request based on the annotation data comprises: Extract the at least one attribute corresponding to the at least one data item from the annotation data in the interface definition; as well as The submission task is generated according to the task definition standards of the code management platform.

10. An apparatus for managing code data, comprising: The determination module is configured to determine the application programming interface associated with the merge request in response to receiving a merge request for merging first code data into second code data. The acquisition module is configured to acquire the interface definition of the application programming interface, the interface definition describing at least one data item specified in the application programming interface; An add module is configured to add annotation data associated with the at least one data item to the interface definition, the annotation data describing the at least one data item in accordance with the code specifications of the code management platform; as well as The submission module is configured to submit the second code data to the code management platform based on the interface definition.

11. 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, which, when executed by the at least one processing unit, cause the electronic device to perform the method according to any one of claims 1 to 9.

12. A computer-readable storage medium having stored thereon computer instructions that, when executed by a processor, cause the processor to perform the method according to any one of claims 1 to 9.

13. A computer program product comprising computer instructions, wherein the computer instructions, when executed by a processor, implement the method according to any one of claims 1 to 9.