Code management method and system, electronic equipment and storage medium

By adopting code management methods in chip design projects, using preset frequency to obtain and syntax to check the target source code, generate differential data and upload it to the server, the problem of improper code management by designers is solved, and the code management efficiency and overall design quality are improved.

CN119396450AInactive Publication Date: 2025-02-07NIUXIN SEMICON
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411985458.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-02-07
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In complex chip design projects, different working habits of designers lead to improper code management, which may lead to local code loss or syntax errors after uploading to the server, affecting the overall design progress and code quality.

Method used

A code management method is proposed, by confirming the editing status of the development source code on the target device, obtaining the target source code according to the preset frequency, and performing syntax checks on it. The target source code that complies with the syntax check rules generates differential data, which is used to form an editing process, and upload the target source code to the server to replace the corresponding development source code.

Benefits of technology

This method improves the efficiency of code management, avoids the problems of local code loss and server code syntax errors, and ensures the smooth progress of the overall design progress and the improvement of code quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119396450A_ABST
    Figure CN119396450A_ABST
Patent Text Reader

Abstract

The invention provides a code management method and system, electronic equipment and a storage medium. The code management method comprises the steps that when it is confirmed that a target device stores a development source code and the development source code is in an editing state, the target source code is obtained according to a preset frequency, the target source code is the edited version of the development source code, and the development source code is obtained from a server; when the target source code meets a grammar check rule, generating difference data of the target source code and the development source code, the difference data being used for forming an editing process including an editing time node; and uploading the target source code to the server and generating a code uploading notification based on the difference data, wherein the target source code is used for replacing a development source code having a corresponding relationship with the target device in the server. The method and device are used for improving the code management effect when the code items are jointly managed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a code management method, system, electronic device and storage medium. Background Art

[0002] A complex chip design project is usually jointly participated by multiple designers. Each designer is responsible for the functional design of a part of the chip. Developers will store the code on the server, and designers will copy the code from the server to the local computer for modification, and then upload the modified code to the server. However, designers have different working habits. Some people do not upload the latest modified local code to the server or the local code is accidentally lost, which affects the progress of the overall chip design. If the local modification process involves some common modules, uploading the modified code will cause syntax errors in the code stored in the server, affecting the quality of the code. Summary of the invention

[0003] One purpose of the present application is to provide a code management method, system, electronic device and storage medium, which are used to improve the management effect of code when jointly managing code projects.

[0004] According to one aspect of an embodiment of the present application, a code management method is provided, including: When confirming that the target device stores the development source code and the development source code is in an editing state, obtaining the target source code at a preset frequency, wherein the target source code is an edited version of the development source code, and the development source code is obtained from the server; Performing a syntax check on the target source code and if the target source code complies with the syntax check rule, generating difference data between the target source code and the development source code, wherein the difference data is used to form an editing process including an editing time node; The target source code is uploaded to the server and a code upload notification is generated based on the difference data, wherein the target source code is used to replace the development source code in the server that has a corresponding relationship with the target device.

[0005] According to one aspect of an embodiment of the present application, a code management system is provided, including: A server, wherein the server is used to store original source code; A target file module, the target file module is used to store the development source code and edit the development source code to obtain the target source code, the development source code is obtained from the server; A grammar checking module, the grammar checking module is used to copy the target source code from the target file module and perform grammar checking on the target source code, the target source code being the development source code after editing; The file upload module receives the target source code sent by the grammar check module, and uploads the target source code to the server according to the difference data between the development source code and the original source code.

[0006] According to one aspect of an embodiment of the present application, there is provided an electronic device, including: One or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the electronic device implements the methods provided in the above-mentioned various optional implementations.

[0007] According to one aspect of an embodiment of the present application, a computer program medium is provided, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor of a computer, the computer executes the methods provided in the above-mentioned various optional implementations.

[0008] According to one aspect of the embodiments of the present application, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in the above various optional implementations.

[0009] In an embodiment of the present application, a development source code is obtained from a server and edited; a target source code is obtained at a preset frequency, the target source code being an edited version of the development source code; a syntax check is performed on the target source code and if the target source code complies with the syntax check rules, difference data between the target source code and the development source code is generated, the difference data being used to form an editing process including an editing time node; the target source code is uploaded to a server to replace the development source code in the server that has a corresponding relationship with the target device, and a code upload notification is generated based on the difference data; when the server stores all the source codes and the target device edits a portion of the development source code, in order to ensure the editing progress of each portion of the development source code, the target source code is obtained at a preset frequency, and a series of operations are performed to upload the edited target source code to the server to ensure the overall progress; a syntax check is performed on the target source code so that the target source code uploaded to the server does not affect the normal use of the original source code, thereby improving the efficiency of code management to a certain extent.

[0010] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by the practice of the present application.

[0011] It should be understood that the foregoing general description and the following detailed description are exemplary only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The above and other objects, features and advantages of the present application will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings.

[0013] Figure 1 A schematic flow chart of a code management method according to an embodiment of the present application is shown.

[0014] Figure 2 A schematic structural diagram of a code management system according to an embodiment of the present application is shown.

[0015] Figure 3 A schematic structural diagram of an electronic device according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0016] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these example embodiments are provided so that the description of the present application will be more comprehensive and complete and the concepts of the example embodiments will be fully conveyed to those skilled in the art. The accompanying drawings are only schematic illustrations of the present application and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and thus their repeated description will be omitted.

[0017] In addition, the described features, structures or characteristics may be combined in one or more example embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the example embodiments of the present application. However, those skilled in the art will appreciate that the technical solution of the present application may be practiced while omitting one or more of the specific details, or other methods, components, steps, etc. may be adopted. In other cases, known structures, methods, implementations or operations are not shown or described in detail to avoid obscuring the present application and making the various aspects of the present application obscure.

[0018] Some of the blocks shown in the accompanying drawings are functional entities that do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0019] Figure 1 A schematic diagram of a code management method according to an embodiment of the present application is shown, and the method includes the following steps: S100, when it is confirmed that the target device stores the development source code and the development source code is in an editing state, the target source code is obtained at a preset frequency, the target source code is an edited version of the development source code, and the development source code is obtained from a server.

[0020] Specifically, the target device obtains the development source code from the server, performs development based on the development source code, and then edits the development source code.

[0021] The target source code is formed in the process of editing the development source code by the target device. The target source code is the source code version after the development source code is edited, that is, the development result of the development source code by the target device.

[0022] During the editing process, the target source code may change over time. In order to upload the local target source code of the target device to the server in time, the target source code is obtained according to a preset frequency.

[0023] S200, if the target source code complies with the syntax check rules, then difference data between the target source code and the development source code is generated, and the difference data is used to form an editing process including an editing time node.

[0024] Specifically, after the target source code is obtained, a syntax check is performed on the target source code and if the target source code complies with the syntax check rule, difference data between the target source code and the development source code is generated.

[0025] The difference data can indicate the difference between the development source code and the target source code at the editing time node, so the developer can view the modification location and modification content of the development source code based on the difference data.

[0026] The edit time node refers to the time node where the edit operation occurs. Taking the edit time node as the starting point, obtain the edit operation for the development source code, and bind the edit result of the edit operation to the edit time node. When generating the difference data between the development source code and the target source code, obtain the edit time node of each edit process.

[0027] As an optional implementation, based on the editing time node and the editing process of the development source code, a time axis is used to form difference data showing the editing process.

[0028] Developers can visually view the results of their edits.

[0029] The syntax check can be performed by running a syntax check tool, and according to the type of the development source code, using the rules of the corresponding language to check the syntax problems of the target source code. If the target source code meets the syntax check rules, the target source code is uploaded to the server.

[0030] For example, in the field of chip design, the development source code can be Verilog or System Verilog code, both of which are hardware description languages ​​used for hardware description and verification. Verilog is used in digital circuits to describe the structure and behavior of digital circuits, and the behavior and timing of analog circuits to verify the correctness of the design.

[0031] When performing syntax checking on the development source code, the syntax of the target source code is checked according to the syntax rules of Verilog and System Verilog or by building a simulation environment.

[0032] If there is no grammatical problem, it meets the grammar check rules, and then generates the difference data between the target source code and the development source code.

[0033] S300, uploading the target source code to the server and generating a code upload notification based on the difference data, the target source code is used to replace the development source code in the server that has a corresponding relationship with the target device.

[0034] Specifically, the target source code is uploaded to the server, and the target source code is used to replace the development source code in the server that has a corresponding relationship with the target device.

[0035] When the target device obtains the development source code from the server, the server records the device information of the target device and associates the device information with the development source code obtained by the target device.

[0036] After uploading the target source code to the server, a code upload notification is generated based on the difference data. The code upload notification is used to notify the target device of the target source code upload notification. The difference data is used by the developer operating the target device to view the editing points for the development source code.

[0037] In this embodiment, the development source code is obtained from the server and edited; the target source code obtained after editing the development source code is obtained at a preset frequency, the target source code is syntax-checked and the target source code complies with the syntax-checking rules, then difference data between the target source code and the development source code is generated, and the difference data is used to form an editing process including an editing time node; the target source code is uploaded to the server to replace the development source code in the server that has a corresponding relationship with the target device, and a code upload notification is generated based on the difference data. Obtaining the target source code at a preset frequency and uploading it to the server can avoid source code loss and ensure development progress; in addition, the target source code is syntax-checked, and only the target source code that complies with the syntax-checking rules is uploaded to the server, which will not affect the normal function of the source code stored in the server. The code management method provided in this embodiment can improve the efficiency of code management.

[0038] Further, in S100, the target source code after the development source code is edited is obtained according to a preset frequency, including: Set a preset frequency, and obtain the target source code according to the acquisition time node specified by the preset frequency starting from the initial storage time of the development source code stored in the target device.

[0039] Specifically, the initial storage time is the time when the target device first obtains the development source code. Starting from the initial storage time, the target source code is obtained according to the acquisition time node specified by the preset frequency, so as to update the development source code of the server in a timely manner.

[0040] For example, the preset frequency may be set to 30 minutes / time, that is, starting from the initial storage time, the target source code is obtained every 30 minutes.

[0041] As an optional implementation, at the first acquisition time node, the target source code is acquired, and a syntax check is performed on the target source code, and the target source code of this version is temporarily saved; after a preset frequency set time length, that is, at the second acquisition time node, the latest version of the target source code is acquired and a syntax check is performed.

[0042] After a preset number of acquisitions, the target source code that is most recently acquired and complies with the syntax check is uploaded to the server.

[0043] As an optional implementation, after the target source code is syntax-checked and meets the syntax-checking rules, the target source code obtained at the latest acquisition time node is temporarily saved. Before the next acquisition time node, if the editing completion instruction sent by the target device is received, the latest target source code is obtained. If the latest target source code has no syntax problems, the latest target source code is uploaded to the server.

[0044] This method can avoid the loss of target source code due to terminal failure of the target device and increase the reliability of code management.

[0045] As an optional implementation, compare the target source code of the current acquisition time node with the target source code of the last acquisition time node. If the two are the same, update the value of the source code comparison record and wait for the next acquisition time node; if the value of the source code comparison record is greater than or equal to the preset threshold, generate an editing reminder message.

[0046] If the target source code at the current acquisition time node is the same as the target source code at the previous acquisition time node, it means that the editing operation of the target source code has not caused substantial modification to the content of the target source code, and it can be considered that no editing operation has been performed.

[0047] If the value of the source code comparison record is used to record the number of times the target source code of two acquisition time nodes is the same.

[0048] That is, the target source code at the second acquisition time node is the same as the target source code at the first acquisition time node, and the value of the source code comparison record is 1; the target source code at the third acquisition time node is the same as the target source code at the second acquisition time node, and the value of the source code comparison record is 2.

[0049] When the value of the source code comparison record is greater than or equal to the preset threshold, an editing reminder message is generated.

[0050] The editing reminder information is used to remind the developer of the target device to perform the next operation or to remind him to perform the editing operation.

[0051] Further, S200 performs syntax checking on the target source code, including: If the target source code does not conform to the syntax checking rules, a syntax error report is generated.

[0052] A syntax error report is sent to a target device, and a modification result of the target source code by the target device in response to the syntax error report is obtained.

[0053] Specifically, the syntax error report is used to remind the part of the target source code that does not comply with the syntax rules. After receiving the syntax check error report, the target device can adjust the position that does not comply with the syntax check rules prompted in the syntax error report, and receive the modification results for the target source code at the same time.

[0054] After receiving the modification result, the modified target source code can be obtained again and the syntax can be checked. If there is no syntax problem, the modified target source code is uploaded to the server.

[0055] Furthermore, after S200 performs a syntax check on the target source code and the target source code complies with the syntax check rule, the following implementation is also included: The target device is monitored, and if no editing operation is received within a preset time period, difference data between the target source code and the development source code is generated.

[0056] Specifically, the editing behavior of the target device is monitored. After the target source code is obtained once, if there is no editing operation within a preset time period, the difference data between the target source code and the development source code is generated. On the one hand, the target source code that has not been saved can be saved and uploaded to the server to avoid the risk of code loss.

[0057] Furthermore, before uploading the target source code to the server at S300, the following steps are included: Request a code verification request to the server. The code verification request is used to obtain the update status of the source code that has a dependency relationship with the development source code.

[0058] The difference data between the development source code and the original source code stored in the server is determined according to the source code update status.

[0059] Specifically, if the development source code involves some parts that need to be shared with other developers, it is necessary to obtain the source code update status of other source codes that have a dependency relationship with the development source code.

[0060] If the source code update status indicates that other source codes have been replaced, it is necessary to detect whether other source codes conflict with the target source code, thereby causing the original function to fail.

[0061] Therefore, it is necessary to generate difference data between the development source code and the original source code stored in the server. If there is a difference, it means that the original source code stored in the server has been replaced by the source code uploaded by other devices, and it is necessary to detect whether the target source code conflicts with the original source code in the server.

[0062] Generally, the development source code is obtained from the server, which can be achieved by copying the original source code stored in the server to the target device. During the process of editing the development source code on the target device, other devices have already uploaded the source code. In order to avoid code conflicts, code verification is required.

[0063] Further, S300, uploading the target source code to the server includes: If the difference data indicates that the development source code is the same as the original source code, the target source code is uploaded to the server.

[0064] Figure 2 The following is a schematic diagram showing the structure of a code management system provided by this embodiment. This embodiment provides a code management system, including: Server 110, server 110 is used to store original source code.

[0065] The target file module 120 is used to store the development source code and edit the development source code to obtain the target source code. The development source code is obtained from the server.

[0066] The grammar checking module 130 is used to copy the target source code from the target file module 120 and perform a grammar check on the target source code, where the target source code is the edited development source code.

[0067] The file upload module 140 receives the target source code sent by the grammar check module 130 and uploads the target source code to the server 110 according to the difference data between the development source code and the original source code.

[0068] Specifically, the server 110 is used to store the original source code; The target file module 120 may be set on a terminal device, and a developer obtains the original source code from the server 110 and stores it in the target file module 120 as a development source code.

[0069] The development source code is edited in the target file module 120 to obtain the target source code.

[0070] The grammar checking module 130 copies the target source code from the target file module 120 according to a preset frequency, and performs a grammar check on the target source code.

[0071] The grammar checking module 130 may have a built-in grammar checking tool, and the grammar checking tool is used to perform grammar checking on the target source code.

[0072] The file upload module 140 is used to receive the target source code sent by the grammar check module 130 and upload the target source code to the server 110 .

[0073] The code management method provided in this embodiment is applicable to the code management system provided in this embodiment. The code management implementation method of the code management system refers to the implementation process of the code management method provided in the above embodiment.

[0074] Reference below Figure 3 An electronic device 50 according to an embodiment of the present application is described. Figure 3 The electronic device 50 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0075] like Figure 3 As shown, the electronic device 50 is in the form of a general computing device. The components of the electronic device 50 may include but are not limited to: at least one processing unit 510, at least one storage unit 520, and a bus 530 connecting different system components (including the storage unit 520 and the processing unit 510).

[0076] The storage unit stores program codes, which can be executed by the processing unit 510, so that the processing unit 510 executes the steps according to various exemplary embodiments of the present application described in the description of the exemplary method described above in this specification. For example, the processing unit 510 can execute the following steps: Figure 1 The steps shown in .

[0077] The storage unit 520 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 5201 and / or a cache storage unit 5202 , and may further include a read-only storage unit (ROM) 5203 .

[0078] The storage unit 520 may also include a program / utility 5204 having a set (at least one) of program modules 5205, such program modules 5205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0079] Bus 530 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0080] The electronic device 50 may also communicate with one or more external devices 600 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 50, and / or communicate with any device that enables the electronic device 50 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 550. The input / output (I / O) interface 550 is connected to a display unit 540. In addition, the electronic device 50 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 560. As shown, the network adapter 560 communicates with other modules of the electronic device 50 via a bus 530. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 50, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0081] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software, or by combining software with necessary hardware. Therefore, the technical solution according to the implementation method of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a mobile terminal, etc.) to execute the code management method according to the implementation method of the present application.

[0082] In an exemplary embodiment of the present application, a computer-readable storage medium is further provided, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor of a computer, the computer executes the code management method described in the above method embodiment.

[0083] According to one embodiment of the present application, a program product for implementing the method in the above method embodiment is also provided, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present application is not limited thereto, and in this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.

[0084] The program product may adopt any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, a system, device or component of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0085] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0086] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.

[0087] Program code for performing the operations of the present application may be written in any combination of one or more programming languages, including object-oriented programming languages, such as JAVA, C++, etc., and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., using an Internet service provider to connect through the Internet).

[0088] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units. In addition, although the steps of the method in the present application are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.

[0089] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation method of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes a number of instructions to enable a computing device (which can be a personal computer, a mobile terminal, etc.) to execute the method according to the implementation method of the present application.

[0090] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the appended claims.

Claims

1. A code management method, characterized in that: include: When confirming that the target device stores the development source code and the development source code is in an editing state, obtaining the target source code at a preset frequency, the target source code being an edited version of the development source code, and the development source code being obtained from the server; Performing a syntax check on the target source code and if the target source code complies with the syntax check rule, generating difference data between the target source code and the development source code, wherein the difference data is used to form an editing process including an editing time node; The target source code is uploaded to the server and a code upload notification is generated based on the difference data, wherein the target source code is used to replace the development source code in the server that has a corresponding relationship with the target device.

2. The code management method according to claim 1, characterized in that: The step of obtaining the target source code after the development source code is edited according to the preset frequency includes: A preset frequency is set, and the target source code is acquired according to acquisition time nodes specified by the preset frequency starting from the initial storage time of the development source code stored in the target device.

3. The code management method according to claim 2, characterized in that: The step of obtaining the target source code after the development source code is edited according to the preset frequency includes: Compare the target source code of the current acquisition time node with the target source code of the previous acquisition time node. If the two are the same, update the value of the source code comparison record and wait for the next acquisition time node. If the value of the source code comparison record is greater than or equal to the preset threshold, an editing reminder message is generated.

4. The code management method according to claim 1, characterized in that: The grammar checking of the target source code includes: If the target source code does not conform to the syntax checking rules, a syntax error report is generated; The grammatical error report is sent to the target device, and a modification result of the target source code by the target device in response to the grammatical error report is obtained.

5. The code management method according to claim 1, characterized in that: After the target source code is subjected to syntax checking and the target source code complies with the syntax checking rules, the method further includes: The target device is monitored, and if no editing operation is received within a preset time period, difference data between the target source code and the development source code is generated.

6. The code management method according to claim 1, characterized in that: Before uploading the target source code to the server, the method further comprises: Requesting a code verification request from the server, wherein the code verification request is used to obtain update status of source code having a dependency relationship with the development source code; The difference data between the development source code and the original source code stored in the server is determined according to the source code update status.

7. The code management method according to claim 6, characterized in that: The uploading of the target source code to the server includes: If the difference data indicates that the development source code is the same as the original source code, the target source code is uploaded to the server.

8. A code management system, characterized in that: The system comprises: A server, wherein the server is used to store original source code; A target file module, the target file module is used to store the development source code and edit the development source code to obtain the target source code, the development source code is obtained from the server; A grammar checking module, the grammar checking module is used to copy the target source code from the target file module and perform grammar checking on the target source code, the target source code being the development source code after editing; The file upload module receives the target source code sent by the grammar check module, and uploads the target source code to the server according to the difference data between the development source code and the original source code.

9. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, enables the electronic device to implement the code management method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: Computer-readable instructions are stored thereon, and when the computer-readable instructions are executed by a processor of a computer, the computer is caused to execute the code management method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • File evaluation method and device, server and computer-readable storage medium

    CN107688541A

  • A method and server for managing software version information

    CN109086071A

  • Source code file management method, server and computer-readable storage medium

    CN109445836A

  • Static code checking method, device, computer equipment and readable storage medium

    CN112860261A

  • Code checking method and device and electronic equipment

    CN115268923A