CN117908930B - Method, device, equipment, medium and product for synchronizing codes and code documents - Google Patents

Method, device, equipment, medium and product for synchronizing codes and code documents Download PDF

Info

Publication number
CN117908930B
CN117908930B CN202410316472.1A CN202410316472A CN117908930B CN 117908930 B CN117908930 B CN 117908930B CN 202410316472 A CN202410316472 A CN 202410316472A CN 117908930 B CN117908930 B CN 117908930B
Authority
CN
China
Prior art keywords
target
code
information
document
content
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202410316472.1A
Other languages
Chinese (zh)
Other versions
CN117908930A (en
Inventor
钟浩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Innoda Chengdu Electronic Technology Co ltd
Original Assignee
Innoda Chengdu Electronic Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Innoda Chengdu Electronic Technology Co ltd filed Critical Innoda Chengdu Electronic Technology Co ltd
Priority to CN202410316472.1A priority Critical patent/CN117908930B/en
Publication of CN117908930A publication Critical patent/CN117908930A/en
Application granted granted Critical
Publication of CN117908930B publication Critical patent/CN117908930B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application relates to the technical field of integrated circuits and the field of software development, and provides a method, a device, equipment, a medium and a product for synchronizing codes and code documents, wherein the method for synchronizing the codes and the code documents comprises the following steps: updating target content to a synchronization file preset for target codes and target code documents under a target tool, wherein the target codes correspond to the target code documents; based on the updated synchronization file, at least one of the object code and the object code document is updated to synchronize the object content between the object code and the object code document. According to the method, the device, the equipment, the medium and the product for synchronizing the codes and the code documents, the problem that the information modification process of the codes and the documents is complicated can be solved, the synchronization process can be automatically completed, the problem processing flow is simplified, the time consumption for processing the problems is reduced, and the working efficiency is improved.

Description

Method, device, equipment, medium and product for synchronizing codes and code documents
Technical Field
The present application relates to the field of integrated circuit technology and the field of software development, and in particular, to a method, apparatus, device, medium and product for synchronizing codes and code documents.
Background
Integrated circuit electronic design automation (Electronic design automation, EDA) software is electronic design automation software commonly used by integrated circuit designers. EDA software can be further subdivided into products such as low power design static verification tools (Low Power Checker, LPC), gate-level power analysis tools (Gate-level Power Analyzer, GPA), etc.
In the development and maintenance of these tools, code and a document corresponding to the code (hereinafter also referred to as "code document") often need to be kept synchronized. Here, the code may be written and developed by a software developer based on a framework or a data structure, and each tool may have its own technical manual and document to normalize the functions for different functions and behaviors, so that the developer needs to adapt the code according to different requirements, and meanwhile needs to ensure that information related to the code in the document is consistent, and writing or revising of the document content is usually maintained by a special document engineer.
In the related art, when a document engineer finds that a problem exists in the content of a document, the document engineer needs to notify a research and development engineer corresponding to the code to modify the related problem, and the whole processing flow comprises a plurality of steps of problem submission, solution, verification, closing and the like, and the modification of the content of the document can be realized after all the flows are completed.
However, such a procedure may cause a very complex processing procedure of the problem, and even for some simple format, spelling and other problems, a complete procedure is required, which takes a long time, and this results in complicated information modification and editing of codes and documents, and requires coordination between personnel, which is not beneficial to improving the working efficiency.
Disclosure of Invention
The application provides a method, a device, equipment, a medium and a product for synchronizing codes and code documents, which at least solve the problems that the information modification process of the codes and the documents in the related technology is complicated and is not beneficial to improving the working efficiency. The technical scheme of the application is as follows:
According to a first aspect of the present application, there is provided a method of synchronizing a code with a code document, the method of synchronizing a code with a code document being applied to a tool in integrated circuit electronic design automation software, the method of synchronizing a code with a code document comprising: updating target content to a synchronization file preset for target codes and target code documents under a target tool, wherein the target codes correspond to the target code documents; based on the updated synchronization file, at least one of the object code and the object code document is updated to synchronize the object content between the object code and the object code document.
Optionally, the method for synchronizing the code and the code document further comprises: comparing the target content with target information in the synchronous file to obtain a comparison result, wherein the target information represents information shared by the target code and the target code document; and the step of updating the target content to a synchronous file preset for target codes and target code documents under a target tool is executed in response to the comparison result indicating that the target content is matched with the target information, and the synchronous file is kept unchanged in response to the comparison result indicating that the target content is not matched with the target information.
Optionally, the target information is determined by: determining information to be written into the target code document in the target code as the target information based on the target code; and/or determining information, which needs to be realized through the target code, in the target code document as the target information based on the target code document.
Optionally, the target tool is a plurality of the synchronous files are a plurality of, wherein the synchronous files are created by: determining common information common to each target information corresponding to each target tool and proprietary information of each target information based on the target information corresponding to each target tool; creating a public synchronous file based on the public information; based on the proprietary information, a proprietary synchronization file corresponding to each target tool is created.
Optionally, the creating a common synchronization file based on the common information includes: creating a tool-level public synchronization file based on the tool-level public information in the public information; and/or creating a code-level public synchronization file based on code-level public information in the public information, wherein the tool-level public information refers to public information among tool behaviors of all target tools, and the code-level public information refers to public information among target codes of all target tools.
Optionally, the proprietary information is determined by: determining the performance behavior of each target information in each target tool; responsive to the target information having different performance behaviors in different target tools, determining the performance behavior of the target information as proprietary information of the corresponding target tool; and in response to the target information having the same performance behavior in different target tools, determining the performance behavior of the target information as the proprietary information of the called target tool according to the calling relation of the target information in the different target tools.
Optionally, the updating at least one of the object code and the object code document based on the updated synchronization file includes: extracting content to be updated from the synchronous file before invoking or running the at least one or in response to reaching a preset timing, wherein the content to be updated is: synchronizing to target content in the synchronization file between a time of last updating the at least one and a current time, or to all content related to the at least one in the synchronization file; updating the at least one based on the content to be updated.
Optionally, the updating the at least one based on the content to be updated includes: serializing the content to be updated into an information format of the at least one based on a preset serialization rule, and determining an embedding position of the content to be updated in the at least one; and updating the serialized content to be updated into the embedded position.
Optionally, the method for synchronizing the code and the code document is implemented in the target tool, the synchronization file is a JSON format file or an XML format file, and the target information includes at least one of the following: the object code or the help information of the command option, the command or option, the interaction of the command or option, the parameters accepted by the command or option and the effective time of the function in the object code document.
According to a second aspect of the present application, there is provided a code-to-code document synchronization apparatus for use in tools in integrated circuit electronic design automation software, the code-to-code document synchronization apparatus comprising: an updating unit configured to update target content to a synchronization file preset for a target code and a target code document under a target tool, wherein the target code corresponds to the target code document; and a synchronization unit configured to update at least one of the object code and the object code document based on the updated synchronization file so that the object content is synchronized between the object code and the object code document.
According to a third aspect of the present application, there is provided an electronic device comprising: a processor; a memory for storing the processor-executable instructions, wherein the processor-executable instructions, when executed by the processor, cause the processor to perform a method of synchronizing code and code documents according to the present application.
According to a fourth aspect of the present application, there is provided a computer readable storage medium, which when executed by a processor of an electronic device, causes the electronic device to perform a method of synchronizing a code and a code document according to the present application.
According to a fifth aspect of the present application there is provided a computer program product comprising computer instructions which when executed by a processor implement a method of synchronizing code and code documents according to the present application.
The technical scheme provided by the application has at least the following beneficial effects:
According to the technical scheme, the target content can be updated to the synchronization file preset for the target code and the target code document, so that the target content can exist in the updated synchronization file, the target code and/or the target code document can be updated based on the synchronization file, and the target content can be synchronized between the target code and the target code document.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application and do not constitute a undue limitation on the application.
Fig. 1 is a schematic diagram of a code modification flow according to the related art.
Fig. 2 is a schematic flow chart of a method of synchronizing code with a code document according to an exemplary embodiment of the application.
Fig. 3 is a schematic flow chart showing steps of comparing target content with target information in a synchronization method of a code and a code document according to an exemplary embodiment of the present application.
Fig. 4 is a schematic diagram showing updating of contents to be updated in a synchronization method of a code and a code document according to an exemplary embodiment of the present application.
Fig. 5 is a schematic diagram showing an example of a document fragment of a synchronization method of a code and a code document according to an exemplary embodiment of the present application.
Fig. 6 is a schematic flow chart showing steps of creating a synchronization file in a method of synchronizing a code with a code document according to an exemplary embodiment of the present application.
Fig. 7 is a schematic flow chart showing steps of determining proprietary information in a method of synchronizing a code with a code document according to an exemplary embodiment of the present application.
FIG. 8 is a block diagram illustrating a code and code document synchronization apparatus according to an example embodiment.
Fig. 9 is a block diagram of an electronic device, according to an example embodiment.
Detailed Description
In order to make the technical solution of the present application better understood by those skilled in the art, the technical solution of the embodiments of the present application will be clearly and completely described with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the application described herein may be implemented in sequences other than those illustrated or otherwise described herein. The implementations described in the following exemplary examples do not represent all implementations consistent with the application. Rather, they are merely examples of apparatus and methods consistent with aspects of the application as detailed in the accompanying claims.
Here, "at least one of items" appearing in the present application means three cases in parallel including "any one of the items", "a combination of any of the items", "an entirety of the items". For example, "including at least one of a and B" includes three cases side by side as follows: (1) comprises A; (2) comprising B; (3) includes A and B. For example, "at least one of the first and second steps is executed", that is, three cases are juxtaposed as follows: (1) performing step one; (2) executing the second step; (3) executing the first step and the second step.
As described above, the document engineer has a very complex processing procedure when discovering the code problem, and even if the document engineer modifies some problems such as simple format and spelling, the document engineer needs to go through a complete process, which takes a long time, and this results in complicated information modification and editing of the code and document, and requires coordination between personnel, which is not beneficial to improving the working efficiency.
In particular, when a developer performs code development based on an architecture, a situation that core business architecture behaviors need to be compatible is often encountered, and when the developer performs compatibility and adaptation on the core business architecture behaviors, a code structure is further complicated. Therefore, when a document manager such as a document engineer finds out that there is an out-of-specification behavior in the software, in order to avoid an additional error, the code cannot be directly changed, but needs to be notified to a development engineer of the corresponding function, and the modification is performed by submitting a problem report flow (file issue).
Here, the conventional submit problem report flow includes a plurality of steps of problem submission, resolution, verification, shutdown, and the like. Fig. 1 shows an example of a standard code modification flow in the related art, as shown in fig. 1, after a document engineer discovers a problem, the document engineer needs to submit a problem report to a research and development engineer for processing, the research and development engineer submits the problem report to a test engineer for verification and testing after the processing is completed, and finally returns the result to the document engineer until the whole flow is completed, and the modification of the code related content in the document can not be realized. If there is a problem in that the modification is not in place in this process, the above-mentioned procedure needs to be executed again.
In such a scheme, the code is separated from the document, and the document is slightly changed, so that the whole modification process becomes extremely complex, and even if the most common problems of help information, format, punctuation marks or misspelling are modified, the document engineer cannot directly modify the code, but needs to implement the modification process through a series of complex processes.
In actual software development, modifications to documents are mostly complex logic that does not involve code, such as help information for a certain command or changes to the version number of a certain product, etc. In this case, if the process shown in fig. 1 is performed completely for each modification, not only the efficiency is greatly reduced, but also for the software product, the key information cannot be updated timely, which may cause that the product is not matched with the technical manual as a document for a plurality of times in short term or long term, which is easy to cause confusion and has adverse effects on the research and development of the whole product.
In view of the foregoing, exemplary embodiments of the present application provide a method of synchronizing a code with a code document, a device for synchronizing a code with a code document, an electronic device, a computer-readable storage medium and a computer program product, which can solve or at least alleviate the foregoing problems.
In a first aspect of exemplary embodiments of the present application, a method of synchronizing a code with a code document is provided, and will be described with reference to fig. 2 to 7.
The method for synchronizing the code and the code document according to the exemplary embodiments of the present application may be applied to tools in integrated circuit power electronic design automation software, for example, one or more tools in integrated circuit power electronic design automation software may be loaded on a user terminal, and the tools may implement the method for synchronizing the code and the code document according to the embodiments of the present application.
In particular, tools in integrated circuit power electronics design automation software may update target content to synchronization files preset for target code and target code documents under the target tool, where the target code corresponds to the target code document.
Tools in the integrated circuit power electronics design automation software may also update at least one of the object code and the object code document based on the updated synchronization file to synchronize the object content between the object code and the object code document.
According to the method for synchronizing the code and the code document, which is disclosed by the embodiment of the application, the synchronization update of the target code and the target code document can be realized through the synchronization file, so that the synchronization process can be automatically completed, the problem processing flow is simplified, the time consumption for processing the problem is reduced, and the working efficiency is improved.
The above user terminal may be, for example, a tablet computer, a notebook computer, a digital assistant, a wearable device, etc., however, the implementation scenario of the above method for synchronizing a code and a code document is only an example scenario, and the method for synchronizing a code and a code document according to an exemplary embodiment of the present application may also be applied to other application scenarios, for example, a user may request synchronization from a tool loaded in a server through a network at a user terminal (for example, a mobile phone, a desktop computer, a tablet computer, etc.), and may send target content to a server, where the server may perform synchronization between a target code and a target code document by performing the method for synchronizing a code and a code document according to an exemplary embodiment of the present application, and may be a stand-alone server, a server cluster, a cloud computing platform, or a virtualization center.
Specific steps of a method for synchronizing a code with a code document according to an exemplary embodiment will be described below with reference to fig. 2. The method for synchronizing the codes and the code documents can be applied to tools in integrated circuit electronic design automation software. Here, the tools in the integrated circuit electronic design automation software may be, for example, but not limited to, different products of EDA software, including, for example, UPF (low power design static verification tool, low Power Checker, LPC), PWR (Gate-level power analysis tool, gate-level Power Analyzer, GPA), etc. Furthermore, the method of synchronizing code with code documents can be used in any scenario where code documents and code synchronization is required, such as software development, document writing, data analysis, and the like.
As shown in fig. 2, the method for synchronizing the code with the code document may include the steps of:
in step S210, the target content may be updated to a synchronization file preset for the target code and the target code document under the target tool.
Here, the object code may correspond to an object code document. Code documents may be documents that specify or illustrate the functions and acts in the code, which may record the design principles, functions, modules, etc. of the code.
The target tool may be one or more, which may include any one or more tools in integrated circuit electronic design automation software, the method of synchronizing code with code documents may be implemented in the target tool, for example, the full flow of the method may be embedded in the code, and may be managed using a third party control tool such as a GIT distributed version control system, which may quickly fall back to any version once a problem occurs in the update or synchronization process. In this way, code implementing the method may coexist with object code as part of the tool, and object code documents may be managed synchronously automatically by co-iterative updating with business code using management software, without intervention on synchronization, either manually or in the form of plug-ins. However, embodiments of the present application are not limited thereto, and the method may be implemented by additional software and automatically manage object code and object code documentation synchronously in the execution of the object tool.
As an example, the synchronization file may be a JSON format file or an XML format file, and the synchronization file may be used as a data center to synchronize the code and the code document, specifically, when the content in the synchronization file changes, the corresponding object code and the object code document also automatically change to achieve synchronization.
The synchronization file may be, for example, but not limited to, stored in a database, the location of which may be arbitrary, e.g., may be a separate data server, storing synchronization files for multiple target tools; or may be located on the same terminal as the object code or object document. Here, the creation and editing of the synchronization file may be selected and changed according to codes and documents of different requirements, so that flexibility of the method may be improved, and several exemplary processes of creating the synchronization file will be described in detail below.
The target content may be content that needs to be synchronized between the target code and the target code document. For example, taking the scenario of FIG. 1 above as an example, the target content may be the content that the document engineer modifies after discovering errors present in the code. However, it is not limited thereto, and it may be that an engineer associated with the code finds out that the updated contents need to be synchronized in the code and the document.
In addition, as an example, before updating the synchronization file, the content updated to the synchronization file may be evaluated to determine whether it is information that needs to be synchronized between the object code and the object code document, and if it is information that needs to be synchronized, the content may be updated to the synchronization file; if the information does not need to be synchronized, the information may not be updated to the synchronization file.
As an example, the evaluation process may be performed empirically or in actual need by a research engineer or a document engineer, for example, in case the engineer considers that the target content belongs to the information requiring synchronization, it may be directly switched to the synchronization file and updated into the synchronization file.
Specifically, in the process of writing target information to be synchronized into the synchronization file for the first time, when a development engineer finds the target information in the target code, it is possible to switch to fill in data related to the target information in the synchronization file. In the subsequent modification or maintenance process, when the content which is required to be updated in the object code or the object code document by the research engineer or the document engineer is the target information, the method can switch to the synchronous file, and the corresponding modification or maintenance is carried out in the synchronous file. Here, the target information may characterize information common to the target code and the target code document, specific examples of which will be described in detail below.
As another example, the process of judging the target content may be automatically implemented according to a preset rule.
For example, taking fig. 3 as an example, the method for synchronizing a code and a code document according to an embodiment of the present application may further include the steps of:
In step S310, the target content may be compared with the target information in the synchronization file, to obtain a comparison result.
As described above, the target information may characterize information common to the target code and the target code document. By way of example, the target information may be information in the EDA software document and EDA source code that needs to be updated synchronously, consistent, including but not limited to information in the code that needs to be written into the document, information in the document that needs the code to be implemented.
Further, as an example, the target information is modifiable and changeable information, which can be repeatedly modified, corrected, and changed according to actual development requirements, for example. Specifically, business overlaps of engineers, such as research and development engineers and document engineers, in different departments may be changed along with the life cycle of the software or the requirements of different users, so in an embodiment of the present application, modification, addition or deletion of target information is allowed, and when executing step S310 described herein, the current latest target information may be acquired first for comparison with the target content.
As an example, the target information may be determined by: determining information to be written into a target code document in the target code as target information based on the target code; and/or determining information, which needs to be realized through the target code, in the target code document as target information based on the target code document.
Specifically, according to an embodiment of the present application, in one aspect, target information may be determined from a code side, for example, target information may be determined based on information that needs to be written into a target code document in edited code content in response to editing the target code, for example, when editing the code, if it is recognized that the currently edited code content is related to information to be written into the code document, for example, information related to a command or option (option) in the code, or the like, the target information may be determined based on the code content. However, the example of determining the target information from the code side is not limited thereto, and information to be written to the target code document may be found and extracted from the target code that has been completed, and may be information related to a command or option in the code, for example.
On the other hand, additionally or alternatively, the target information may be determined from the document side, for example, the target information may be determined based on information in the edited document content that needs to be implemented by the target code in response to editing the target code document, for example, when editing the code document, if the currently edited document content is recognized to be repeated with the code, for example, information related to a command or option in the code, or the like, the target information may be determined based on the document content. However, an example of determining target information from the document side is not limited thereto, and information related to a code may be extracted from an already completed target code document as target information.
Through the method, the target information can be flexibly determined, and the target information to be synchronized can be designated by both a document engineer and a research engineer, so that missing of some key information to be synchronized is avoided, and the synchronization process is better realized.
As an example, the target information may include, but is not limited to, at least one of: command options in the object code or object code document, help information for the command or option, interactions of the command or option, parameters accepted by the command or option, and validation time of the function.
Here, interaction of commands or options may include, for example, mutual exclusion, collaboration, and the like; parameters accepted by a command or option may include, for example, multiparameters, single parameters, objects obj in the tool command language (Tool Command Language, TCL), boolean values, integer, floating point, etc.; the effective time of the function may include, for example, a post syn phase, a post pr phase, control of rtl phases in low-power detection, and the like. However, examples of the target information are not limited thereto, any information that can be used as a flag bit or a flag field (also referred to as a "flag bit in a computer language) can be used as the target information, and some information of interest or key information can be customized as the target information according to actual needs, and by setting the target information, great control flexibility can be provided for the synchronized content.
Under the condition that the current target information is acquired, the target content to be updated can be compared with the target information, and whether the target content belongs to the target information or not is judged.
In step S320, the step of updating the target content to the synchronization file may be performed in response to the comparison result indicating that the target content matches the target information.
In step S330, the synchronization file may be kept unchanged in response to the comparison result indicating that the target content does not match the target information.
As an example, a target content matching with target information may mean that the target content belongs to or is related to any one or more target information, while a target content not matching with target information may mean that the target content is not related to target information.
In the case where the target content matches the target information, it may be considered that the target content needs to be synchronized between the target code and the target code document, and at this time, the above-described step S210 may be performed to update the target content to the synchronization file; and under the condition that the target content is not matched with the target information, the target content is considered to be unnecessary to synchronize, and the synchronization file is not required to be updated.
By the method, the current target content to be updated can be automatically judged, so that the accuracy of information identification and synchronization is improved, and the information which needs to be synchronized is avoided from being omitted during manual processing.
Referring back to fig. 2, at step S220, at least one of the object code and the object code document may be updated based on the updated synchronization file to synchronize the object content between the object code and the object code document.
After the target content is updated to the synchronization file, the target content will be synchronized from the synchronization file into the target code and target code document when the target code and target code document are run or invoked to maintain consistency of information in the target code and target code document.
In this step S220, at least one of the object code and the object code document may be updated by, as an example, the following method: extracting content to be updated from the synchronization file in response to at least one of invoking or running the object code and the object code document, or in response to reaching a preset timing; based on the content to be updated, the at least one of the object code and the object code document is updated.
Here, the content to be updated may be: the at least one of the object code and the object code document is last updated to synchronize to the object content in the synchronization file between the time the at least one of the object code and the object code document was last updated to the current time, or to synchronize to all content in the synchronization file that is related to the at least one of the object code and the object code document.
Specifically, the timing of updating the object code and/or the object code document (or the timing of synchronizing the object code and the object code document) may be when the object code and/or the object code document is called or executed, or may be executed at regular intervals.
In one case, upon reaching the synchronization opportunity, the target content in the synchronization file may be automatically identified to synchronize between the time the target code (and/or target code document) was last updated in the synchronization file to the current time. In this case, the content to be updated may include one or more target contents updated to the synchronization file one or more times, specifically, after the last time the target code (and/or the target code document) is updated, the synchronization file may be updated a plurality of times until the current time, the updated target contents of the time will be written into the synchronization file at each time of updating, and the updated target contents of the plurality of times each need to be synchronized into the target code (and/or the target code document), so that the time of each time the target code (and/or the target code document) is updated and the time of each time the synchronization file is updated may be recorded, so that the corresponding contents in the synchronization file may be accurately synchronized into the target code (and/or the target code document), and rapid synchronization may be achieved.
In another case, upon reaching the synchronization opportunity, all of the latest content in the synchronization file that is related to the object code (and/or object code document) may be automatically pulled to update the object code (and/or object code document). In this example, the time at which the synchronization file, object code (and/or object code document) is updated may not need to be recorded, reducing the occupancy of storage resources.
The above-mentioned synchronization process may be implemented by a synchronization engine, which may be a script or a program in any format, etc., and may coexist with the object code and the object code document, for example, the synchronization engine may be provided on the object code side and the object code document side, respectively, and when the synchronization opportunity is reached, the corresponding synchronization engine may update the object code and the object code document to implement synchronization.
As an example, as shown in fig. 4, at least one of the object code and the object code document may be updated by: at step S410, the content to be updated may be serialized into an information format of the at least one of the object code and the object code document based on a preset serialization rule, and an embedding position of the content to be updated in the at least one of the object code and the object code document is determined; in step S420, the serialized content to be updated may be updated into an embedded location.
Here, a serialization rule may be preset, and the serialization rule may include an information correspondence between the object code and the synchronization file and an information correspondence between the object code document and the synchronization file. In particular, the same information may have different manifestations in the object code, the object code document, and the synchronization file, e.g., different storage formats, examples of the object code fragment and the information fragment in the synchronization file are shown below:
Examples of object code fragments may be:
“testComRedirect::testComRedirect(const set<int>&enumSet)
:testCommand(“redirect”/*cmd name*/, “Redirects the output of any command.”/*cmd help*/, enumSet)
{
const char* help = “Name of attribute”;// option help
Add(new StringArg(0, help, “report violation”/*Example*/, “N/A”/*Remarks*/, \
1 /*arg optional*/,1 /*arg exclusive group*/,0 /*arg default*/));
RecordOptionLevel(“0” /*option level*/, LicenseLevel::Level3);”。
examples of pieces of information in a synchronization file may be:
““cmd_name”: “redirect”,
“cmd_help”: “Redirects the output of any command. ”,
“options”: [
{
“option_name”: “cmd arg”,
“option_help”: “Executes the command and gets the output.”,
“arg_type”: “StringArg”,
“arg_optional”: “0”,
“arg_exclusive_group”: “0”,
“arg_default_value”: “0”
},”。
As can be seen from the above examples, the data formats of the object code and the synchronization file may be different, while FIG. 4 illustrates an example of a segment of an object code document, as shown in FIG. 5, which may have a different data format than both the object code and the synchronization file, which may be a more readable format, such as a table or the like. Here, it should be noted that the examples of the object code, the examples of the synchronization file, and the examples of the object code document in fig. 5 given above are illustrative for the purpose of facilitating understanding of the difference in data format between the object code, the synchronization file, and the object code document, the contents of which are not entirely corresponding relationships.
Due to the difference of the data formats between the object code and the synchronous file and the difference of the data formats between the object code document and the synchronous file, the information correspondence relationship between them, namely the serialization rule described above, can be predetermined, so that in the case of extracting the content to be updated from the synchronous file, the content to be updated can be automatically assembled into the formats of the object code and the object code document based on the serialization rule so as to be directly embedded into the object code and the object code document without manual analysis or matching, and when the related personnel opens the object code and the object code document, what can be seen is what is already embedded into the content to be updated.
As an example, the synchronization engine as described above may include a serialization tool that may be used to perform the process of extracting the content to be updated from the synchronization file and updating the object code and object code document based on the content to be updated.
Taking an EDA software tool as an example, when the tool starts or generates codes, a synchronous engine can load a synchronous file such as a JSON file, after the synchronous file is loaded, data needing to be synchronized in the synchronous file can be queried, and a serialization tool can generate required codes or document fragments based on the data, wherein for target codes, during initialization, the codes which are successfully assembled can be filled in corresponding embedded positions to enable the codes to be effective, and the target codes set according to the latest configuration are obtained. And for the target code document, filling the successfully assembled document content into a corresponding embedded position when the document is automatically generated, and replacing key data of the target document to obtain the corresponding target document.
Through the serialization mode, the content to be updated in the synchronous file can be automatically assembled into the format suitable for the target code and the target code document, and can be automatically embedded into the corresponding embedded positions in the target code and the target code document, so that a full-automatic synchronization process is realized, and the updated target content is automatically filled in the correct position when people view the target code and the target code document, and the whole process can be completed without manual participation.
The process of achieving synchronization using a synchronization file in a synchronization method of a code and a code document according to an embodiment of the present application is described above, and an example process of creating a synchronization file will be described below with reference to fig. 6 and 7.
As an example, the target tool may be one or more, a synchronization file may be created corresponding to the target tool, a corresponding one or more synchronization files may be created for each target tool, e.g., the target tool may include a plurality of target codes, each of which may correspond to one synchronization file. In this example, the content stored in each synchronization file is for only one target tool.
However, the embodiments of the present application are not limited thereto, and preferably, in the case where the target tool is plural, plural synchronization files may be created, and these may include: a common synchronization file storing common, reusable information in the target tools; and a proprietary synchronization file storing the respective proprietary information of the corresponding target tool.
For example, as shown in FIG. 6, a synchronization file may be created by:
In step S610, common information common to each target information corresponding to each target tool and individual proprietary information of each target information may be determined based on the target information corresponding to each target tool.
In this step, it is possible to judge whether the target information belongs to public information or private information according to the characteristics of the target information, thereby saving the target information in the corresponding synchronization file.
Here, each target tool may include, for example, a different tool in the EDA software, such as UPF, PWR, etc.
In step S620, a common synchronization file may be created based on the common information.
The common synchronization file may be for a plurality of target tools, which may store common, reusable information for these target tools, e.g., a common synchronization file or a common data center "DataGen" may be created. When each of the target tools reaches a synchronization opportunity, the latest configuration information may be pulled from the common synchronization file to synchronize the corresponding target code or target code document.
Here, the common synchronization file may be one or more, for example, a plurality of common synchronization files storing common information of different dimensions or levels may be created.
As an example, the common information may include tool-level common information, which may refer to common information between tool behaviors of respective target tools, and code-level common information, which may refer to common information between target codes of respective target tools.
In this example, step S620 may include: creating a tool-level public synchronization file based on the tool-level public information in the public information; and/or creating a code-level common synchronization file based on the code-level common information in the common information.
Taking the example of a target tool including UPF and PWR, a tool level common synchronization file "CmdGen. Json" and a code level common synchronization file "Cmdbaseclass. Json" can be created.
As an example, a tool level common synchronization file "cmdgen. Json" may record commands with consistent behavior and options in all tools in all EDA software, e.g., read_design command, read_library command, etc., as shown in table 1 below. The code level common synchronization file "cmdbaseslass. Json" may record class names, base classes, command options, etc. common to the codes of each target tool, for example, the command "get_ nets" belongs to common information, and the command "genComGetNets" has an implementation of an option, such as "default cmd arg", "filter", "all", and "transitive", and thus needs to be recorded in the code level common synchronization file "cmdbaseslass. Json".
TABLE 1
Sequence number UPF command Characteristics of Distributed synchronization files
1 get_nets Inconsistent behavior across tools CmdUPF.json
2 find_objects The options are not exactly the same CmdUPF.json
3 report_library All tools are universal and behaving consistently CmdGen.json
4 read_design All tools are universal and behaving consistently CmdGen.json
By creating a plurality of public synchronous files for storing public information with different dimensions or levels, the public information can be managed in a finer manner, so that the problem that the public information is difficult to search and modify due to the fact that one synchronous file is used for managing the public information when a plurality of target tools exist is avoided, and convenience and efficiency of information maintenance are improved.
Furthermore, although described herein as taking the tool level and the code level as examples, it is not limited thereto and other examples may be included as well as dividing the common information and innovating the dimensions or levels of the corresponding common synchronization files.
In step S630, a proprietary synchronization file corresponding to each target tool may be created based on the proprietary information.
Still taking the example where the target tool includes a UPF and a PWR, a proprietary synchronization file "CmdUPF. Json" or proprietary data center "DataUPF" corresponding to the UPF may be created, and a proprietary synchronization file "Cmdpwr. Json" or proprietary data center "DataPWR" corresponding to the PWR may be created. The proprietary synchronization files "cmdpff. Json" and "cmdpwr. Json" may record commands for the respective independent behavior and options of UPF and PWR, respectively.
As an example, as shown in fig. 7, in step S630, proprietary information may be determined by:
In step S710, the behavior of each target information in each target tool may be determined.
Performance behavior may refer to a tool function to be implemented or associated with target information, which may refer to a function of a certain integrity of the tool, or may refer to a sub-function that performs a partial or partial role in the function of the integrity.
In step S720, the performance behavior of the target information may be determined as the proprietary information of the corresponding target tool in response to the target information having different performance behaviors in different target tools.
In the case where the target information has different behavior in different target tools, it can be considered that the target information performs different functions in different target tools, and thus needs to be managed separately as proprietary information in different synchronization files.
For example, as shown in table 1, the command "get_ nets" as target information has different behavior in the UPF and PWR, and thus the command does not belong to common information, and it is further judged that the command "get_ nets" has proprietary options "canonical" and "redox_ canonical" in the UPF, and thus these two options of the command "get_ nets" need to be recorded as proprietary information in "cmdpff.json" corresponding to the UPF.
In step S730, the behavior of the target information may be determined as the proprietary information of the invoked target tool according to the invoking relationship of the target information in different target tools in response to the target information having the same behavior in different target tools.
In particular, the target information may not belong to common information even though it has the same behavior in different target tools. For example, as shown in table 1, the command "find_objects" as target information has the same behavior in the UPF and PWR, but there is no implementation of options in "genComfindobjects" as common information, whereas all options are implemented in the UPF, and "upfcomfindobjects" of the UPF is directly called in the PWR. Thus, although the command "find_objects" is seemingly identical in the UPF and PWR, it actually belongs to the UPF, and thus the command "find_objects" does not belong to common information, but should be recorded in "cmdpff.json" corresponding to the UPF.
By the above-described manner shown in fig. 7, it is possible to accurately identify which target information is the exclusive information, and even in the case of the same behavior, it is possible to further judge the exclusive information belonging to the individual target tool by further judging the calling relationship between the target tools.
The example of creating the synchronization file is described above with reference to steps S610 to S630, and here, it should be noted that the execution order of steps S620 and S630 may be arbitrary, for example, step S630 may be executed first, step S620 may be executed later, or step S620 and S630 may be executed in parallel.
By means of the method shown in fig. 6, public information and private information can be distinguished to create a plurality of synchronous files, so that individual unique functions of each target tool can be ensured to be managed independently, common features among the target tools can be extracted, management of the common features is simplified, content of the plurality of target tools can be updated together in a synchronous process, synchronous efficiency is further improved, and workload of information modification is reduced.
According to the method for synchronizing the code and the code document, which is disclosed by the embodiment of the application, the problems of complicated information modification and low efficiency caused by the use of the problem report process for synchronizing the code document and the related information of the code in the related technology can be solved. According to the method for synchronizing the code and the code document, which is disclosed by the embodiment of the application, the mode of modifying a data source (namely a synchronous file) commonly used by the code document and the code is adopted to replace the mode of synchronously modifying the document and the code by using a problem report flow in the related technology, a document engineer does not need to modify corresponding information in the code by using a complex flow, and the purpose is achieved by directly modifying the source synchronous file.
In addition, the method for synchronizing code and code documents according to the embodiment of the application can also synchronize code documents and code quickly and accurately, and is applicable to various documents and code formats.
Specifically, the method can realize the real-time synchronization of the codes and the documents, and avoid errors and repeated labor in the manual synchronization process, thereby improving the working efficiency. In addition, since the codes and the code documents are synchronously updated, the data consistency between the codes and the code documents can be ensured, and the inconsistent problem caused by misoperation, time delay and the like is avoided. In some cases, members of the development team can be allowed to edit code documents and codes at the same time, and the other party can be seen to modify in time, so that the modification flow of the codes related to the document parts is greatly simplified, and the efficiency and quality of team cooperation are improved.
In addition, by the method, an administrator of software or tools can conveniently manage and maintain codes and documents and quickly find and solve problems, thereby reducing management and maintenance costs.
An exemplary process of achieving rapid synchronization using the synchronization method of codes and code documents of the embodiments of the present application will be described below in conjunction with a specific application scenario.
In one scenario, when a document engineer runs a certain object code, the following error information is found to be prompted:
“%
% find_objects –obj_type {port net}
ERROR : -obj_type only accept one arg
%”。
From the above error information, the document engineer finds that an option "obj_type" of the command "find_objects" is abnormal, which should accept a plurality of different types (types) as data to be retrieved at the time of design, but in actual operation, only accept a single parameter, such as "find_objects-obj_type port", and when two parameters are input, an error, such as "find_objects-obj_type { port net }, is reported.
In this case, the document engineer can quickly find out whether the option "obj_type" of the related information "find_objects" in the synchronization file accepts a plurality of parameters according to the need, and the result of the finding is as follows:
“{
“option_name”: “object_type”,
“option_help”: “help message”,
“option_level”: “0”,
“arg_type”: “StringArg”,
“arg_optional”: “1”,
“arg_accepts_multiple_string”: “0”,
“arg_default_value”: “0”,”。
From the above results, the information "arg_ accepts _multiple_string" that "0" indicates that the option "obj_type" is not accepting a plurality of parameters, and thus, the document engineer can timely input the target content in the synchronization file, changing the parameter "0" to "1" so that it can accept a plurality of parameters. While the development engineer runs the code, the updated target content, i.e., the parameter "0" is changed to "1", may be first obtained from the synchronization file that has been modified by the document engineer, so that the problem caused by the erroneous operation of the development engineer may be quickly changed by the document engineer and automatically synchronized on the code side.
In another scenario, the development engineer finds that the description information about the command "find objects" in the code document is inaccurate, and in particular, it is described as follows:
“%
% find_objects -help
“find_objects”: Finds objects within a scope
%”。
in practice, the correct description of the command "find objects" should be "Finds logic hierarchy objects within a scope". In the above document snippet, described in error by the document engineer.
In this case, the development engineer may search the synchronization file for the relevant information of the command "find_objects" and correct it, and the corrected synchronization file fragment is as follows:
“{
“cmd_name”: “find_objects”,
“cmd_help”: “Finds logic hierarchy objects within a scope.”,
“cmd_level”: “0”,
“cmd_format”: “NA”,”。
when a document engineer opens a code document, updated target content, i.e., updated correct descriptions, can be obtained from a synchronization file that has been modified by a development engineer, so that erroneous descriptions of the document engineer can be quickly located and corrected by the development engineer and automatic synchronization can be performed on the side of the code document.
According to the synchronization method provided by the embodiment of the application, the information to be synchronized in the codes and the code documents can be decoupled, and the data (such as target information) of the business superposition parts of the codes and the code documents is put into the data center, so that the synchronization function of the key information of the codes and the code documents can be realized. In this way, the related information of the document and the code does not need to be manually modified and synchronized depending on the traditional process, so that the working efficiency and the timeliness of information synchronization are improved.
In addition, the synchronization method according to the embodiment of the application can carry out different adaptations for different code logics and services, and can process the inheritance relationship of complex classes in codes, which is different from the common pure data synchronization software.
FIG. 8 is a block diagram illustrating a code and code document synchronization apparatus according to an example embodiment. Referring to fig. 8, a synchronization apparatus of a code and a code document, which may include an updating unit 100 and a synchronization unit 200, is applied to a tool in integrated circuit electronic design automation software.
The updating unit 100 is configured to update target content to a synchronization file preset for a target code and a target code document under a target tool, wherein the target code corresponds to the target code document.
The synchronization unit 200 is configured to update at least one of the object code and the object code document based on the updated synchronization file to synchronize the object content between the object code and the object code document.
As an example, the code-to-code document synchronization device further comprises a comparison unit configured to compare the target content with target information in the synchronization file, wherein the target information characterizes information common to the target code and the target code document, resulting in a comparison result. The updating unit 100 is configured to: and in response to the comparison result indicating that the target content is matched with the target information, the step of updating the target content to a synchronization file preset for the target code and the target code document under the target tool is executed, and in response to the comparison result indicating that the target content is not matched with the target information, the synchronization file is kept unchanged.
As an example, the target information is determined by: determining information to be written into a target code document in the target code as target information based on the target code; and/or determining information, which needs to be realized through the target code, in the target code document as target information based on the target code document.
As an example, the target tool is plural, the synchronization file is plural, and the synchronization apparatus of the code and the code document further includes a creation unit configured to create the synchronization file by: determining common information common to each target information corresponding to each target tool and proprietary information of each target information based on the target information corresponding to each target tool; creating a public synchronization file based on the public information; based on the proprietary information, a proprietary synchronization file corresponding to each target tool is created.
As an example, the creation unit is further configured to: creating a tool-level public synchronization file based on the tool-level public information in the public information; and/or creating a code-level common synchronization file based on code-level common information in the common information, wherein the tool-level common information refers to common information between tool behaviors of each target tool, and the code-level common information refers to common information between target codes of each target tool.
As an example, the creation unit is further configured to determine the proprietary information by: determining the performance behavior of each target information in each target tool; responsive to the target information having different performance behaviors in different target tools, determining the performance behavior of the target information as proprietary information of the corresponding target tool; and in response to the target information having the same performance behavior in different target tools, determining the performance behavior of the target information as the proprietary information of the called target tool according to the calling relation of the target information in the different target tools.
As an example, the synchronization unit 200 is further configured to: extracting content to be updated from the synchronous file before invoking or running at least one or in response to reaching a preset timing, wherein the content to be updated is: synchronizing to the target content in the synchronization file between the time of last updating the at least one and the current time, or synchronizing to the whole content related to the at least one in the file; updating the at least one based on the content to be updated.
As an example, the synchronization unit 200 is further configured to: serializing the content to be updated into an information format of the at least one based on a preset serialization rule, and determining an embedding position of the content to be updated in the at least one; and updating the serialized content to be updated into the embedded position.
As an example, the method of synchronizing code with code document is implemented in a target tool, the synchronization file is a JSON format file or an XML format file, and the target information includes at least one of the following: command options in the object code or object code document, help information for the command or option, interactions of the command or option, parameters accepted by the command or option, and validation time of the function.
The specific manner in which the individual units perform the operations in relation to the apparatus of the above embodiments has been described in detail in relation to the embodiments of the method and will not be described in detail here.
Fig. 9 is a block diagram of an electronic device, according to an example embodiment. As shown in fig. 9, the electronic device 10 includes a processor 101 and a memory 102 for storing processor-executable instructions. Here, the processor-executable instructions, when executed by the processor, cause the processor to perform the method of synchronizing code and code documents as described in the above exemplary embodiments.
By way of example, the electronic device 10 need not be a single device, but may be any means or collection of circuits capable of executing the above-described instructions (or sets of instructions) alone or in combination. The electronic device 10 may also be part of an integrated control system or system manager, or may be configured as a server that interfaces with either locally or remotely (e.g., via wireless transmission).
In electronic device 10, processor 101 may include a Central Processing Unit (CPU), a Graphics Processor (GPU), a programmable logic device, a special purpose processor system, a microcontroller, or a microprocessor. By way of example and not limitation, processor 101 may also include an analog processor, a digital processor, a microprocessor, a multi-core processor, a processor array, a network processor, and the like.
The processor 101 may execute instructions or code stored in the memory 102, wherein the memory 102 may also store data. The instructions and data may also be transmitted and received over a network via a network interface device, which may employ any known transmission protocol.
The memory 102 may be integrated with the processor 101, for example, RAM or flash memory disposed within an integrated circuit microprocessor or the like. In addition, the memory 102 may include a stand-alone device, such as an external disk drive, a storage array, or any other storage device usable by a database system. The memory 102 and the processor 101 may be operatively coupled or may communicate with each other, for example, through an I/O port, a network connection, etc., such that the processor 101 is able to read files stored in the memory 102.
In addition, the electronic device 10 may also include a video display (such as a liquid crystal display) and a user interaction interface (such as a keyboard, mouse, touch input device, etc.). All components of the electronic device 10 may be connected to each other via a bus and/or a network.
In an exemplary embodiment, a computer readable storage medium may also be provided, which when executed by a processor of a server, enables the server to perform the method of synchronizing code and code documents as described in the above exemplary embodiments. The computer readable storage medium may be, for example, a memory including instructions, alternatively the computer readable storage medium may be: read-only memory (ROM), random-access memory (RAM), random-access programmable read-only memory (PROM), electrically erasable programmable read-only memory (EEPROM), dynamic random-access memory (DRAM), static random-access memory (SRAM), flash memory, nonvolatile memory, CD-ROM, CD-R, CD + R, CD-RW, CD+RW, DVD-ROM, DVD-R, DVD + R, DVD-RW, DVD+RW, DVD-RAM, BD-ROM, BD-R, BD-R LTH, BD-RE, blu-ray or optical disk storage, hard Disk Drives (HDD), solid State Disks (SSD), card memory (such as multimedia cards, secure Digital (SD) cards or ultra-fast digital (XD) cards), magnetic tape, floppy disks, magneto-optical data storage, hard disks, solid state disks, and any other means configured to store computer programs and any associated data, data files and data structures in a non-transitory manner and to provide the computer programs and any associated data, data files and data structures to a processor or computer to enable the processor or computer to execute the programs. The computer programs in the computer readable storage media described above can be run in an environment deployed in a computer device, such as a client, host, proxy device, server, etc., and further, in one example, the computer programs and any associated data, data files, and data structures are distributed across networked computer systems such that the computer programs and any associated data, data files, and data structures are stored, accessed, and executed in a distributed fashion by one or more processors or computers.
In an exemplary embodiment, a computer program product may also be provided, which comprises computer instructions which, when executed by a processor, implement the method of synchronizing code and code documents as described in the above exemplary embodiments.
Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
Furthermore, it should also be noted that although several examples of steps are described above with reference to specific figures, it should be understood that embodiments of the application are not limited to the combinations given in the examples, and that the steps appearing in the different figures may be combined and are not exhaustive herein.
It is to be understood that the application is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (10)

1. A method of synchronizing a code with a code document, wherein the method of synchronizing a code with a code document is applied to a tool in integrated circuit electronic design automation software, the method of synchronizing a code with a code document comprising:
updating target content to a synchronization file preset for target codes and target code documents under a target tool, wherein the target codes correspond to the target code documents;
Updating at least one of the object code and the object code document based on the updated synchronization file to synchronize the object content between the object code and the object code document;
the target content is content which needs to be synchronized between the target code and the target code document;
The method for synchronizing the codes and the code documents further comprises the following steps:
comparing the target content with target information in the synchronous file to obtain a comparison result, wherein the target information represents information shared by the target code and the target code document;
In response to the comparison result indicating that the target content matches the target information, performing the step of updating the target content to a synchronization file preset for the target code and the target code document under the target tool,
Responding to the comparison result to indicate that the target content is not matched with the target information, and keeping the synchronous file unchanged;
the target information is determined by:
determining information to be written into the target code document in the target code as the target information based on the target code; and/or the number of the groups of groups,
Determining information, which needs to be realized through the target code, in the target code document as the target information based on the target code document;
The updating at least one of the object code and the object code document based on the updated synchronization file includes:
Extracting content to be updated from the synchronous file, wherein the content to be updated is: synchronizing to target content in the synchronization file between a time of last updating the at least one and a current time, or to all content related to the at least one in the synchronization file;
Serializing the content to be updated into an information format of the at least one based on a preset serialization rule, and determining an embedding position of the content to be updated in the at least one;
and updating the serialized content to be updated into the embedded position.
2. The method of synchronizing code and code documents according to claim 1, wherein the target tool is a plurality of and the synchronization file is a plurality of, wherein the synchronization file is created by:
Determining common information common to each target information corresponding to each target tool and proprietary information of each target information based on the target information corresponding to each target tool;
creating a public synchronous file based on the public information;
based on the proprietary information, a proprietary synchronization file corresponding to each target tool is created.
3. The method of synchronizing codes and code documents according to claim 2, wherein said creating a common synchronization file based on said common information comprises:
creating a tool-level public synchronization file based on the tool-level public information in the public information; and/or the number of the groups of groups,
Based on the code-level common information in the common information, a code-level common synchronization file is created,
The tool-level common information refers to common information among tool behaviors of all target tools, and the code-level common information refers to common information among target codes of all target tools.
4. A method of synchronizing a code with a code document according to claim 2 or 3, wherein the proprietary information is determined by:
determining the performance behavior of each target information in each target tool;
Responsive to the target information having different performance behaviors in different target tools, determining the performance behavior of the target information as proprietary information of the corresponding target tool;
And in response to the target information having the same performance behavior in different target tools, determining the performance behavior of the target information as the proprietary information of the called target tool according to the calling relation of the target information in the different target tools.
5. The method for synchronizing codes and code documents according to claim 1, wherein said extracting contents to be updated from said synchronization file comprises:
The content to be updated is extracted from the synchronization file in response to the at least one of before invoking or running or in response to reaching a preset timing.
6. The method of claim 1, wherein the method of synchronizing code and code documents is implemented in the target tool, the synchronization file is a JSON format file or an XML format file, and the target information includes at least one of: the object code or the help information of the command option, the command or option, the interaction of the command or option, the parameters accepted by the command or option and the effective time of the function in the object code document.
7. A code and code document synchronization apparatus for use with a tool in integrated circuit electronic design automation software, the code and code document synchronization apparatus comprising:
An updating unit configured to update target content to a synchronization file preset for a target code and a target code document under a target tool, wherein the target code corresponds to the target code document;
A synchronization unit configured to update at least one of the object code and the object code document based on the updated synchronization file to synchronize the object content between the object code and the object code document;
the target content is content which needs to be synchronized between the target code and the target code document;
The synchronization device of the code and the code document further comprises:
A comparison unit configured to compare the target content with target information in the synchronization file to obtain a comparison result, wherein the target information characterizes information common to the target code and the target code document;
The updating unit is configured to perform the step of updating the target content to a synchronization file preset for the target code and the target code document under the target tool in response to the comparison result indicating that the target content matches the target information,
Responding to the comparison result to indicate that the target content is not matched with the target information, and keeping the synchronous file unchanged;
the target information is determined by:
determining information to be written into the target code document in the target code as the target information based on the target code; and/or the number of the groups of groups,
Determining information, which needs to be realized through the target code, in the target code document as the target information based on the target code document;
The synchronization unit is configured to:
Extracting content to be updated from the synchronous file, wherein the content to be updated is: synchronizing to target content in the synchronization file between a time of last updating the at least one and a current time, or to all content related to the at least one in the synchronization file;
Serializing the content to be updated into an information format of the at least one based on a preset serialization rule, and determining an embedding position of the content to be updated in the at least one;
and updating the serialized content to be updated into the embedded position.
8. An electronic device, the electronic device comprising:
a processor;
a memory for storing the processor-executable instructions,
Wherein the processor executable instructions, when executed by the processor, cause the processor to perform the method of synchronizing code and code documents according to any one of claims 1 to 6.
9. A computer readable storage medium, characterized in that instructions in the computer readable storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the method of synchronizing a code and a code document according to any one of claims 1 to 6.
10. A computer program product comprising computer instructions which, when executed by a processor, implement a method of synchronizing code and code documents according to any one of claims 1 to 6.
CN202410316472.1A 2024-03-20 2024-03-20 Method, device, equipment, medium and product for synchronizing codes and code documents Active CN117908930B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410316472.1A CN117908930B (en) 2024-03-20 2024-03-20 Method, device, equipment, medium and product for synchronizing codes and code documents

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410316472.1A CN117908930B (en) 2024-03-20 2024-03-20 Method, device, equipment, medium and product for synchronizing codes and code documents

Publications (2)

Publication Number Publication Date
CN117908930A CN117908930A (en) 2024-04-19
CN117908930B true CN117908930B (en) 2024-06-04

Family

ID=90686194

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410316472.1A Active CN117908930B (en) 2024-03-20 2024-03-20 Method, device, equipment, medium and product for synchronizing codes and code documents

Country Status (1)

Country Link
CN (1) CN117908930B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107256160A (en) * 2017-06-12 2017-10-17 郑州云海信息技术有限公司 A kind of code document generation method in continuous integrating, apparatus and system
CN108268253A (en) * 2017-05-05 2018-07-10 平安科技(深圳)有限公司 Interface code generation method and terminal device
CN109634607A (en) * 2018-12-13 2019-04-16 泰康保险集团股份有限公司 A kind of method and device of Code automatic build
CN110471698A (en) * 2019-07-29 2019-11-19 深圳数位传媒科技有限公司 The generation method and device, storage medium and computer equipment of API document
CN112463210A (en) * 2020-12-04 2021-03-09 上海路人王信息科技有限公司 Interface document generation method, terminal device and computer-readable storage medium
CN113900706A (en) * 2021-10-13 2022-01-07 中国银行股份有限公司 Interface document generation method and device
CN114201207A (en) * 2021-11-22 2022-03-18 北京达佳互联信息技术有限公司 Resource synchronization method and device, electronic equipment and storage medium
CN116339736A (en) * 2023-05-29 2023-06-27 英诺达(成都)电子科技有限公司 Configuration method, device, equipment and storage medium of TCL (TCL) interactive interface

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9372689B2 (en) * 2014-05-28 2016-06-21 International Business Machines Corporation Synchronizing comments in source code with text documents

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108268253A (en) * 2017-05-05 2018-07-10 平安科技(深圳)有限公司 Interface code generation method and terminal device
CN107256160A (en) * 2017-06-12 2017-10-17 郑州云海信息技术有限公司 A kind of code document generation method in continuous integrating, apparatus and system
CN109634607A (en) * 2018-12-13 2019-04-16 泰康保险集团股份有限公司 A kind of method and device of Code automatic build
CN110471698A (en) * 2019-07-29 2019-11-19 深圳数位传媒科技有限公司 The generation method and device, storage medium and computer equipment of API document
CN112463210A (en) * 2020-12-04 2021-03-09 上海路人王信息科技有限公司 Interface document generation method, terminal device and computer-readable storage medium
CN113900706A (en) * 2021-10-13 2022-01-07 中国银行股份有限公司 Interface document generation method and device
CN114201207A (en) * 2021-11-22 2022-03-18 北京达佳互联信息技术有限公司 Resource synchronization method and device, electronic equipment and storage medium
CN116339736A (en) * 2023-05-29 2023-06-27 英诺达(成都)电子科技有限公司 Configuration method, device, equipment and storage medium of TCL (TCL) interactive interface

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Data synchronization protocol in mobile computing environment using SyncML and Huffman coding;Jiao-Long Li等;《2012 International Conference on Wavelet Active Media Technology and Information Processing (ICWAMTIP)》;20130117;第260 - 262页 *
基于关系模型的代码生成器的设计与实现;彭仁夔;《cnki优秀硕士学位论文全文库 信息科技辑》;20150515(第05期);第I138-410页 *

Also Published As

Publication number Publication date
CN117908930A (en) 2024-04-19

Similar Documents

Publication Publication Date Title
US11561956B2 (en) Key pattern management in multi-tenancy database systems
US7676492B2 (en) Migration of database using serialized objects
CN106598612B (en) Operation method and system for data table in database
CN108762743B (en) Data table operation code generation method and device
CN104090776A (en) Software development method and system
BR112015011537B1 (en) STORAGE METHOD AND DEVICE FOR ASSOCIATION OF METADATA WITH SOURCE CODE
CN101996131A (en) Automatic test method and automatic test platform for graphic user interface (GUI) based on x extensive makeup language (XML) packaging key word
US20080250052A1 (en) Repopulating a database with document content
CN111309734B (en) Method and system for automatically generating table data
CN116821437B (en) Data processing method, device, electronic equipment and storage medium
CN111694612A (en) Configuration checking method, device, computer system and storage medium
US8359572B2 (en) Self-describing re-usable software components
CN116383542A (en) Page generation method and device, electronic equipment and storage medium
US11314489B1 (en) Automated authoring of software solutions by first analyzing and resolving anomalies in a data model
CN116467975B (en) Data processing method, device, electronic equipment and storage medium
CN116501415B (en) Command execution method and device, electronic equipment and computer readable storage medium
US8438542B2 (en) Generating a management pack at program build time
KR101552914B1 (en) Web server application framework web application processing method using the framework and computer readable medium processing the method
CN117648257A (en) Web automatic test method and system under Linux operating system
CN117908930B (en) Method, device, equipment, medium and product for synchronizing codes and code documents
CN111813880B (en) Homeland space planning project management method, system and storage medium
EP2972666B1 (en) Visualization interface for information object system
US20210200833A1 (en) Health diagnostics and analytics for object repositories
CN113190463B (en) Code testing method, node and system
JP2020087087A (en) Correction candidate specification program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant