Version control method and device of class model, electronic equipment and storage medium

By comparing version identifier data in distributed databases and management tools to perform class model version control, the code coverage problem caused by the inconsistency between the modeling platform and the GitLab repository version was solved, proactively preventing data conflicts and improving development efficiency.

CN121786016APending Publication Date: 2026-04-03SHENZHEN COMTOP INFORMATION TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-02
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

The existing modeling platform is inconsistent with the GitLab repository code version, resulting in the overwriting of code files, which increases the complexity of team collaborative development and affects development efficiency.

Method used

Version control based on a class model is achieved by comparing historical version identifier data stored in a distributed database with real-time version identifier data in a management tool. This includes obtaining historical and real-time version identifier data when an edit operation is detected, and determining and displaying feedback information based on this data, thereby achieving version synchronization and conflict avoidance.

Benefits of technology

It effectively avoids data overwriting and logical conflicts, realizes a paradigm shift from passive remediation to proactive prevention, improves development efficiency, and reduces collaboration risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121786016A_ABST
    Figure CN121786016A_ABST
Patent Text Reader

Abstract

The invention discloses a version control method and device for class models, electronic equipment and a storage medium, and the method comprises the steps: obtaining historical version identification data corresponding to a target class model in a distributed database under the condition of detecting that a target user carries out editing operation on the target class model; acquiring real-time version identification data of the target class model on a target branch through a management tool interface; and feedback information corresponding to the editing operation is determined based on the historical version identification data and the real-time version identification data, and the feedback information is displayed. Based on the technical scheme, version control of the class model is performed by comparing the historical version identification data stored in the distributed database with the real-time version identification data in the management tool, so that data coverage and logic conflicts are effectively avoided, and normal form transformation from passive remedy to active prevention is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of modeling platform technology, and in particular to a method, apparatus, electronic device and storage medium for version control of a type of model. Background Technology

[0002] With the increasing popularity of modeling platforms, many teams are adopting a hybrid development model that combines modeling platforms with manual coding to improve development efficiency.

[0003] However, the existing development model allows both the class modeling code generated by the modeling platform and the offline development tools to be submitted to the GitLab repository. The modeling platform submits directly overwrite code via the GitLab interface, which can lead to code files being overwritten if the code versions of the modeling platform and the GitLab repository are inconsistent during collaborative development. This undoubtedly increases the complexity of collaborative development and impacts the overall development efficiency of the team. Summary of the Invention

[0004] This invention provides a version control method, device, electronic device, and storage medium for class models. By comparing historical version identification data stored in a distributed database with real-time version identification data in a management tool, version control of class models is performed, effectively avoiding data overwriting and logical conflicts, and realizing a paradigm shift from passive remediation to proactive prevention.

[0005] According to one aspect of the present invention, a version control method for a class model is provided, comprising:

[0006] Upon detecting that a target user has edited a target class model, retrieve historical version identifier data corresponding to the target class model from a distributed database;

[0007] Obtain real-time version identification data of the target class model on the target branch through the management tool interface;

[0008] Based on the historical version identifier data and the real-time version identifier data, feedback information corresponding to the editing operation is determined and displayed.

[0009] According to another aspect of the present invention, a version control device for a class model is provided, comprising:

[0010] The historical version data extraction module is used to retrieve historical version identifier data corresponding to the target class model from a distributed database when the target user is detected to have edited the target class model.

[0011] The real-time version data extraction module is used to obtain real-time version identifier data of the target class model on the target branch through the management tool interface;

[0012] The version control module is used to determine the feedback information corresponding to the editing operation based on the historical version identification data and the real-time version identification data, and to display the feedback information.

[0013] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0014] At least one processor; and

[0015] A memory communicatively connected to the at least one processor; wherein,

[0016] The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to execute the version control method for the class model as described in any embodiment of the present invention.

[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the version control method for the class model described in any embodiment of the present invention.

[0018] The technical solution of this invention involves, upon detecting an edit operation performed by a target user on a target class model, retrieving historical version identifier data corresponding to the target class model from a distributed database; retrieving real-time version identifier data of the target class model on a target branch through a management tool interface; determining feedback information corresponding to the edit operation based on the historical version identifier data and the real-time version identifier data; and displaying the feedback information. Based on this technical solution, by comparing the historical version identifier data stored in the distributed database with the real-time version identifier data in the management tool for version control of the class model, data overwriting and logical conflicts are effectively avoided, achieving a paradigm shift from passive remediation to proactive prevention.

[0019] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 This is a flowchart of a version control method for a class model provided in an embodiment of the present invention;

[0022] Figure 2 This is a flowchart of the pre-editing verification and synchronization process for the class model provided in this embodiment of the invention;

[0023] Figure 3 This is a flowchart of a version control method for a class model provided in an embodiment of the present invention;

[0024] Figure 4 This is a flowchart of the class modeling record provided in an embodiment of the present invention;

[0025] Figure 5 A schematic diagram of the structure of a version control device for a class model provided in an embodiment of the present invention;

[0026] Figure 6 This is a schematic diagram of the structure of the electronic device provided in an embodiment of the present invention. Detailed Implementation

[0027] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0028] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0029] Figure 1This is a flowchart illustrating a version control method for a class model according to an embodiment of the present invention. This embodiment is applicable to situations where version control is performed based on version identifier data stored in different storage locations during class model code editing. This method can be executed by a version control device for the class model, which can be implemented in hardware and / or software and can be configured in an electronic device. Figure 1 As shown, the method specifically includes the following steps:

[0030] S110. If the target user is detected to have performed an editing operation on the target class model, retrieve the historical version identifier data corresponding to the target class model from the distributed database.

[0031] The target user can be a developer. The target class model can be a data type that needs to be edited. It should be noted that the class model can be an abstract representation defined in the Java language to describe the structure, attributes, methods, and relationships between classes in the system. It can also be a user-defined data type used to encapsulate data (attributes) and methods for manipulating data. The distributed database can be a pre-configured database for storing version identifier data of the class model, such as a MongoDB sharded cluster. Historical version identifier data is version data stored in the distributed database.

[0032] Specifically, upon detecting an edit operation by a target user on a target class model, the system retrieves historical version identifier data corresponding to the target class model from the distributed database. For example, when an edit operation by a developer on a target type is detected, the system obtains identifier information corresponding to the target class model and retrieves historical version identifier data from the distributed database based on this identifier information. It should be noted that the identifier information corresponding to the target class model can be the path to a code file. This automatically triggers a consistency verification process when a user initiates an edit operation on the class model. The system first retrieves the recorded last synchronized CommitId from MongoDB based on the code file path corresponding to the model.

[0033] S120. Obtain the real-time version identifier data of the target class model on the target branch through the management tool interface.

[0034] The management tool interface can be a pre-defined interface corresponding to a code management tool, such as a pre-defined GitLab API. The target branch is understood as a development branch used for version control, such as the main branch during development. Real-time version identifier data can be the version identifier within the main branch corresponding to the development code of the target class model.

[0035] Specifically, the real-time version identification data of the target class model on the target branch is obtained through the management tool interface. For example, identity authentication can be completed with the management tool through the OAuth2.0 protocol to obtain an access token. Then, query parameters are constructed based on the class model unique identifier (ModelID) and branch name (BranchName) to send a request to the version control interface of the management tool. The management tool returns JSON data containing meta-information such as version number (VersionTag), commit hash (CommitHash), and last update time (LastModified). The real-time version identification data is then obtained by parsing the returned data.

[0036] Based on the above technical solution, the step of obtaining real-time version identification data of the target class model on the target branch through the management tool interface includes: determining the management database corresponding to the management tool, and determining the target branch from the management database according to the preset benchmark branch; and extracting the real-time version identification data corresponding to the target branch from the management database through the management tool interface.

[0037] The management database is a code hosting database used by the management tool to store code. It stores detailed information about each version branch of the class model. This management tool can be GitLab. The preset base branch can be a pre-set branch for version control, or it can be the trunk branch.

[0038] Specifically, a management database corresponding to the management tool is determined, and a target branch is determined from the management database based on a preset baseline branch. Then, real-time version identifier data corresponding to the target branch is extracted from the management database through the management tool interface. For example, first, a management database matching the management tool is determined. After determining the management database, a target branch, such as the main branch, is determined based on a preset baseline branch. Then, a data extraction request is sent to the management database through a standard API interface provided by the management tool (such as GitLab's REST API). After receiving the request, the management database returns the real-time version identifier data corresponding to the target branch.

[0039] S130. Based on the historical version identifier data and the real-time version identifier data, determine the feedback information corresponding to the editing operation, and display the feedback information.

[0040] The feedback information can be used to indicate whether the code of the target class model can be edited.

[0041] Specifically, based on the historical version identifier data and the real-time version identifier data, feedback information corresponding to the editing operation is determined and displayed. For example, by comparing fields such as version number, modification time, and commit records in the historical and real-time version identifier data, if the version number is found to be increasing and the modification time is updated, it can be preliminarily determined that there is a new commit; if there are differences in the commit records, the specific modification content can be identified. Based on the comparison results, combined with a preset rule base (such as conflict detection rules, version compatibility rules, etc.), feedback information corresponding to the editing operation is determined, such as whether the editing was successful, whether there is a version conflict, whether it affects the normal operation of the model, etc., and this feedback information is displayed on the target user's display interface so that the user can complete the editing operation of the target class model according to the feedback information.

[0042] Based on the above technical solution, the step of determining the feedback information corresponding to the editing operation based on the historical version identifier data and the real-time version identifier data includes: when the historical version identifier data and the real-time version identifier data do not match, performing version synchronization on the target class model and generating automatic synchronization feedback information; when the historical version identifier data and the real-time version identifier data match, generating editing permission feedback information.

[0043] The automatic synchronization feedback message is used to notify the target user that version information synchronization is in progress. The edit-allowance feedback message is used to notify the target user that they can edit the code of the target class model.

[0044] Specifically, if the historical version identifier data and the real-time version identifier data do not match, the target model is synchronized, and an automatic synchronization feedback message is generated; if the historical version identifier data and the real-time version identifier data match, an edit-permit feedback message is generated. For example, when a mismatch is detected between the historical version identifier data and the real-time version identifier data, the version synchronization mechanism is automatically triggered. If the historical version identifier data and the real-time version identifier data match, it indicates that the local model version is consistent with the remote version. At this time, an edit-permit feedback message is generated to inform the user that it is safe to perform editing operations, and the operation request is recorded.

[0045] Based on the above technical solution, the version synchronization of the target class model includes: obtaining the model development code corresponding to the target class model through the management tool interface; parsing the model development code to determine the code metadata corresponding to the target class model; and updating the model definition of the target class model based on the code metadata.

[0046] The model development code can be the development code corresponding to the target class model. Code metadata is used to describe the structured information of the code itself and its environment, including the code's attributes, relationships, configuration, and history. The model definition can be the model description data corresponding to the target class model.

[0047] Specifically, a request is sent to the code hosting platform using pre-integrated management tool interfaces, such as the GitLab API and GitHub API. The request includes a unique identifier for the target model, such as the model ID or project path. A code parsing tool then analyzes the acquired model development code to extract metadata related to the target model, including class definitions, method signatures, variable types, and dependencies. Based on this extracted metadata, the model definition of the target model is updated. Finally, a model definition management framework (such as a custom model description language parser) maps the code metadata to the various attributes of the model definition.

[0048] Based on the above technical solution, after updating the model definition of the target class model based on the code metadata, the method further includes: updating the historical version identifier data in the distributed database to the real-time version identifier data, and generating synchronization completion feedback information.

[0049] Specifically, after updating the model definition, the historical version identifier data in the distributed database is updated to the real-time version identifier data to update the version of the target class model. After the update is completed, a synchronization completion feedback message is generated to prompt the target user to edit the code of the target class model.

[0050] Based on the above technical solution, the step of parsing the model development code to determine the code metadata corresponding to the target class model includes: parsing the model development code through an abstract syntax tree parser to determine the abstract syntax tree corresponding to the model development code; and traversing the node structure in the abstract syntax tree to extract the code metadata.

[0051] The code metadata includes structure definitions, attribute characteristics, method signatures, and annotation information. The abstract syntax tree parser can be a pre-configured module for parsing the development code.

[0052] Specifically, based on the language type of the model development code, such as Java or Python, a suitable abstract syntax tree (AST) parser is selected. For example, Eclipse JDT or ANTLR can be used for Java, and the ast module can be used for Python. The model development code is input into the parser, and lexical analysis breaks the code down into a tokenized stream. Then, syntactic analysis constructs an AST that fully corresponds to the code structure. It should be noted that the AST presents the complete syntactic hierarchy of the code in the form of nodes. A depth-first traversal algorithm is used to traverse the AST. During the traversal, extraction rules are designed for different node types: for class definition nodes, structural definition information is extracted; for variable declaration nodes, attribute characteristics are obtained; for method definition nodes, method signatures are collected; and when annotation nodes are encountered, annotation information is recorded. Finally, the extracted structural definitions, attribute characteristics, method signatures, and annotation information, etc., are integrated and stored. For example, Figure 2 As shown, when a user initiates a class model editing operation, a consistency verification process is automatically triggered. The system first retrieves the last synchronized CommitId (A) from MongoDB based on the code file path corresponding to the model, and simultaneously obtains the latest commitId (B) of that file on the main branch via the GitLab API. The modeling platform compares A and B: if they match, editing is allowed directly; if they do not match, the synchronization mechanism is automatically initiated, the latest code is pulled via the GitLab API, and an AST parser is used for lexical and syntactic analysis to construct an abstract syntax tree. Key metadata such as class names, attributes, methods, and annotations are extracted from this tree, and the model definition in the platform is updated accordingly. Simultaneously, the CommitId in MongoDB is updated to B. The above process ensures that all editing operations are performed based on the latest code version, thereby guaranteeing strict consistency between the model and the code in terms of mechanism. That is, before editing the modeling platform of the technical solution of this application, it verifies whether the CommitId of the MongoDB record is consistent with the CommitId of the GitLab repository record. If they are inconsistent, the GitLab interface is called to synchronize the code to the modeling platform. Through AST abstract syntax tree parsing, the class model data is updated in reverse. After updating the class model, the CommitId of the class modeling record in the MongoDB collection is updated to the CommitId of the GitLab commit record of the synchronized code.

[0053] The technical solution of this invention involves, upon detecting an edit operation performed by a target user on a target class model, retrieving historical version identifier data corresponding to the target class model from a distributed database; retrieving real-time version identifier data of the target class model on a target branch through a management tool interface; determining feedback information corresponding to the edit operation based on the historical version identifier data and the real-time version identifier data; and displaying the feedback information. Based on this technical solution, by comparing the historical version identifier data stored in the distributed database with the real-time version identifier data in the management tool for version control of the class model, data overwriting and logical conflicts are effectively avoided, achieving a paradigm shift from passive remediation to proactive prevention.

[0054] In one possible implementation of the present invention Figure 3 A flowchart illustrating a version control method for a class model provided in an embodiment of the present invention is shown below. Figure 3 As shown, this embodiment further includes the following steps before detecting that the target user has performed an editing operation on the target class model:

[0055] S310. If it is detected that the target user has submitted model development code corresponding to the target class model, determine the code file path and version identifier data corresponding to the model development code.

[0056] The code file path can be the storage path for the model development code. The version identifier data can be a unique commit identifier for the model development code.

[0057] Specifically, leveraging the Webhook mechanism provided by code hosting platforms (such as GitLab and GitHub), a custom callback function is triggered when a user submits code. This callback function parses the repository information, branch information, and list of changed files from the commit event, and combines this information with the target model's configuration file to determine the path to the relevant code file. For example, if the configuration file specifies that the model code is stored in the `src / models / ` directory, regular expressions are used to match the list of changed files and filter out file paths that meet the rules. For version identification data, the commit hash is passed to the code hosting platform's API interface to obtain detailed commit information, from which version identification data, such as the version number and commit time, is extracted.

[0058] S320. The code file path and version identifier data are used as a combination key, and the model information set is stored in a distributed database based on the combination key.

[0059] The model information set includes model identifier, model type, code file path, version identifier data, project code, and submission timestamp.

[0060] Specifically, the code file path and version identifier data are concatenated to form a unique key that identifies a specific version of the model. It's important to note that the code file path specifies the storage location of the model code, while the version identifier data reflects the model code's version iteration history. The combination of these two effectively distinguishes models in different locations and with different versions. A distributed database (such as a MongoDB sharded cluster) is used to store the model information set. The model information set includes important information such as model identifier, model type, code file path, version identifier data, project code, and commit timestamp. The constructed key serves as the unique index for each data record, and the model information set is stored in the distributed database. For example,... Figure 4 As shown, after developers submit the code files generated by class modeling via the GitLab interface, the system will automatically parse the file paths and corresponding CommitIds contained in this submission, and persistently store them in a MongoDB database using "file path-CommitId" as the composite key. This operation aims to establish an accurate GitLab version mapping for the class model code files, providing a crucial data foundation for consistency verification before subsequent model editing. A collection

repository_code_commit_record

[0061] The technical solution of this invention records the CommitId of the associated class modeling file and the GitLab repository using MongoDB, and performs precise verification before each edit to ensure that the modeling platform class modeling is consistent with the GitLab code version each time it is edited. Furthermore, it utilizes AST (Abstract Syntax Tree) parsing technology to automatically update the platform class modeling data by reversing code changes, achieving automated synchronization from code to class modeling, replacing tedious manual updates, significantly improving development efficiency. By adopting the above technical solution, it effectively prevents editing conflicts and code overwriting caused by lagging class modeling versions among multiple developers, reduces collaboration risks, and ensures the integrity and correctness of development data.

[0062] Figure 5This is a schematic diagram of a version control device for a class model provided in an embodiment of the present invention. Figure 5 As shown, the device includes: a historical version data extraction module 510, a real-time version data extraction module 520, and a version control module 530.

[0063] The historical version data extraction module 510 is used to obtain historical version identifier data corresponding to the target class model from a distributed database when the target user is detected to have performed an editing operation on the target class model.

[0064] The real-time version data extraction module 520 is used to obtain real-time version identification data of the target class model on the target branch through the management tool interface;

[0065] The version control module 530 is used to determine the feedback information corresponding to the editing operation based on the historical version identification data and the real-time version identification data, and to display the feedback information.

[0066] Based on the above technical solution, the real-time version data extraction module is used to determine the management database corresponding to the management tool, and determine the target branch from the management database according to the preset benchmark branch; and extract the real-time version identifier data corresponding to the target branch from the management database through the management tool interface.

[0067] Based on the above technical solution, the version control module is used to synchronize the target class model and generate automatic synchronization feedback information when the historical version identification data and the real-time version identification data do not match; and to generate editing permission feedback information when the historical version identification data and the real-time version identification data match.

[0068] Based on the above technical solution, the version control module is used to obtain the model development code corresponding to the target class model through the management tool interface; parse the model development code to determine the code metadata corresponding to the target class model; and update the model definition of the target class model based on the code metadata.

[0069] Based on the above technical solution, the version control module is used to parse the model development code through an abstract syntax tree parser to determine the abstract syntax tree corresponding to the model development code; and to traverse the node structure in the abstract syntax tree to extract the code metadata, wherein the code metadata includes structure definition, attribute characteristics, method signature and annotation information.

[0070] Based on the above technical solution, the version control module is used to update the historical version identifier data in the distributed database to the real-time version identifier data after updating the model definition of the target class model based on the code metadata, and generate synchronization completion feedback information.

[0071] Based on the above technical solution, the device further includes: an information recording module, used to determine the code file path and version identifier data corresponding to the model development code before detecting that the target user has performed an editing operation on the target class model, and when detecting that the target user has submitted model development code corresponding to the target class model; using the code file path and version identifier data as a combination key, and storing the model information set in a distributed database based on the combination key, wherein the model information set includes model identifier, model type, code file path, version identifier data, project code, and submission timestamp.

[0072] The technical solution of this invention involves, upon detecting an edit operation performed by a target user on a target class model, retrieving historical version identifier data corresponding to the target class model from a distributed database; retrieving real-time version identifier data of the target class model on a target branch through a management tool interface; determining feedback information corresponding to the edit operation based on the historical version identifier data and the real-time version identifier data; and displaying the feedback information. Based on this technical solution, by comparing the historical version identifier data stored in the distributed database with the real-time version identifier data in the management tool for version control of the class model, data overwriting and logical conflicts are effectively avoided, achieving a paradigm shift from passive remediation to proactive prevention.

[0073] The version control device for class models provided in this embodiment of the invention can execute the version control method for class models provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0074] Figure 6 A schematic diagram of an electronic device 10, which can be used to implement embodiments of the present invention, is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0075] like Figure 6As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded into the RAM 13 from storage unit 18. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0076] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0077] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as version control methods for class models.

[0078] In some embodiments, the class model version control method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the class model version control method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to execute the class model version control method by any other suitable means (e.g., by means of firmware).

[0079] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0080] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0081] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0082] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0083] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0084] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0085] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0086] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A version control method for a class model, characterized in that, include: Upon detecting that a target user has edited a target class model, retrieve historical version identifier data corresponding to the target class model from a distributed database; Obtain real-time version identification data of the target class model on the target branch through the management tool interface; Based on the historical version identifier data and the real-time version identifier data, feedback information corresponding to the editing operation is determined and displayed.

2. The method according to claim 1, characterized in that, The step of obtaining real-time version identifier data of the target class model on the target branch through the management tool interface includes: Determine the management database corresponding to the management tool, and determine the target branch from the management database based on the preset baseline branch; The management tool interface is used to extract real-time version identifier data corresponding to the target branch from the management database.

3. The method according to claim 1, characterized in that, The step of determining the feedback information corresponding to the editing operation based on the historical version identifier data and the real-time version identifier data includes: If the historical version identifier data and the real-time version identifier data do not match, the target class model is synchronized, and automatic synchronization feedback information is generated. If the historical version identifier data and the real-time version identifier data match, an edit-permitted feedback message is generated.

4. The method according to claim 3, characterized in that, The version synchronization of the target class model includes: Obtain the model development code corresponding to the target class model through the management tool interface; The model development code is parsed to determine the code metadata corresponding to the target class model; The model definition of the target class model is updated based on the code metadata.

5. The method according to claim 4, characterized in that, The step of parsing the model development code to determine the code metadata corresponding to the target class model includes: The model development code is parsed using an abstract syntax tree parser to determine the abstract syntax tree corresponding to the model development code; The code metadata is extracted by traversing the node structure in the abstract syntax tree, wherein the code metadata includes structure definition, attribute characteristics, method signature and annotation information.

6. The method according to claim 4, characterized in that, After updating the model definition of the target class model based on the code metadata, the process also includes: Update the historical version identifier data in the distributed database to the real-time version identifier data, and generate a synchronization completion feedback message.

7. The method according to claim 1, characterized in that, Before detecting that the target user has edited the target class model, the following is also included: Upon detecting that a target user has submitted model development code corresponding to the target class model, the code file path and version identifier data corresponding to the model development code are determined; The code file path and version identifier data are used as a composite key. The model information set is stored in a distributed database based on the composite key. The model information set includes model identifier, model type, code file path, version identifier data, project code, and commit timestamp.

8. A version control device for a class model, characterized in that, include: The historical version data extraction module is used to retrieve historical version identifier data corresponding to the target class model from a distributed database when the target user is detected to have edited the target class model. The real-time version data extraction module is used to obtain real-time version identifier data of the target class model on the target branch through the management tool interface; The version control module is used to determine the feedback information corresponding to the editing operation based on the historical version identification data and the real-time version identification data, and to display the feedback information.

9. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the version control method of the class model according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that are used to cause a processor to execute the version control method of the class model according to any one of claims 1-7.