CN113495753A - Project label acquisition method and device, electronic equipment and storage medium - Google Patents

Project label acquisition method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113495753A
CN113495753A CN202110765576.7A CN202110765576A CN113495753A CN 113495753 A CN113495753 A CN 113495753A CN 202110765576 A CN202110765576 A CN 202110765576A CN 113495753 A CN113495753 A CN 113495753A
Authority
CN
China
Prior art keywords
level
annotation information
project
tag
file
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.)
Pending
Application number
CN202110765576.7A
Other languages
Chinese (zh)
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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202110765576.7A priority Critical patent/CN113495753A/en
Publication of CN113495753A publication Critical patent/CN113495753A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/73Program documentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/42Syntactic analysis
    • G06F8/427Parsing

Abstract

The disclosure provides a project label acquisition method and device, electronic equipment and a storage medium, and relates to the field of data management, in particular to the field of project label management. The specific implementation scheme is as follows: analyzing annotation information from a project file, wherein the project file comprises at least one project, and the annotation information is used for describing tag content of the project and is pre-added in the project file; determining a label of at least one item from the annotation information; and recording the label of at least one item according to a preset data format. Since the item file of any computer language type item can allow annotation information to be added, the tag obtaining method can tag any type of item; moreover, the type of the tag content described by the annotation information may not be limited, and thus the above tag obtaining method may mark a plurality of types of tags for the project.

Description

Project label acquisition method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of data management, and more particularly to the field of label management.
Background
Tagging items helps to scientifically manage the items, and in the prior art, the items are generally automatically tagged by a tagging program corresponding to the items. However, the types of labels printed by the existing labeling program are few, and the range of the label types has larger constraint; moreover, some computer language type items do not have corresponding tagging programs, so that some computer language type items cannot be automatically tagged.
Disclosure of Invention
The disclosure provides a project label acquisition method and device, electronic equipment and a storage medium.
According to an aspect of the present disclosure, there is provided a tag obtaining method for an item, including:
parsing annotation information from a project file, wherein the project file comprises at least one project, and the annotation information is used for describing tag content of the project and is pre-added in the project file;
determining a tag of the at least one item from the annotation information;
and recording the label of the at least one item according to a preset data format.
According to another aspect of the present disclosure, there is provided a tag obtaining apparatus for an item, including:
the annotation analysis module is used for analyzing annotation information from a project file, wherein the project file comprises at least one project, and the annotation information is used for describing tag content of the project and is added in the project file in advance;
a tag determination module for determining a tag of the at least one item from the annotation information;
and the label recording module is used for recording the label of the at least one item according to a preset data format. An evaluation value extraction module, configured to extract an evaluation value of each of a plurality of preset evaluable events from a historical resource produced by a resource producer, where the plurality of evaluable events at least include an evaluable event based on a feature of the historical resource and an evaluable event based on a user feedback of the historical resource;
a target evaluation value calculation module, configured to calculate a target evaluation value of the historical resource based on an evaluation value of each of the preset evaluable events;
and the resource quality determination module is used for determining the quality level of the historical resource based on the target evaluation value.
According to another aspect of the present disclosure, there is provided an electronic device including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the tag retrieval method for an item described above.
According to another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the tag obtaining method of the item described above.
According to another aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the tag acquisition method of the item described above.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
The technical scheme provided by the disclosure has the following beneficial effects:
according to the scheme provided by the implementation of the disclosure, the annotation information used for describing the label content of the project is allowed to be added in the project file in advance, and when the project needs to be labeled, the label of each project can be acquired by analyzing the annotation information. Because the annotation information can be allowed to be added to the project file of the project of any computer language type, the tag acquisition method can tag the project of any type, so that the tag acquisition method has higher universality; moreover, the type of the tag content described by the annotation information can be unlimited, so that the tag obtaining method can mark various types of tags for the project, and the tag richness of the project is increased.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
fig. 1 is a flowchart illustrating a tag obtaining method for an item according to an embodiment of the present disclosure;
fig. 2 is a flowchart illustrating another method for acquiring a tag of an item according to an embodiment of the present disclosure;
FIG. 3 is a diagram illustrating a partial content of a project file provided by an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a tag obtaining apparatus for an item according to an embodiment of the present disclosure;
fig. 5 is a second schematic structural diagram of a tag obtaining apparatus for an item according to an embodiment of the present disclosure;
FIG. 6 illustrates a schematic block diagram of an example electronic device that can be used to implement the tag acquisition methods of the embodiments items of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Tagging some items helps to enable scientific management of those items, and in the prior art, items are typically automatically tagged using a tagging program corresponding to the item. However, the types of labels printed by the existing labeling program are few, and the range of the label types has larger constraint; moreover, some computer language type items do not have corresponding tagging programs, so that some computer language type items cannot be automatically tagged.
Taking the example that the item to be labeled is a test case, the prior art generally utilizes a test framework of the test case to automatically label the test case. For example, the test case's pytest framework in python computer language may be tagged with @ pytest. The ginkgo framework of the test case of the golang computer language can label the test case through case parameters. However, the types of the labels printed by the test framework are less, and the range of the label types has larger constraint, for example, part of the test framework can only print the labels at the item level of the test case. Moreover, the test framework of the test cases of the partial computer language type does not have the capability of tagging, so that the test cases of the partial computer language type cannot be automatically tagged.
The embodiment of the present disclosure provides a method and an apparatus for acquiring a tag of an item, an electronic device, and a storage medium, which are used to solve at least one of the above technical problems in the prior art.
Fig. 1 shows a schematic flowchart of a method for acquiring a tag of an item according to an embodiment of the present disclosure, and as shown in fig. 1, the method mainly includes the following steps:
s110: and analyzing the annotation information from the project file.
In the embodiment of the present disclosure, the project file may include at least one project, and the specific number of the projects in the project file may be determined according to actual needs, which is not limited herein. The items described in the embodiments of the present disclosure may be any kind of object that can be stored by a computer, such as data segments, fields, code segments written based on a computer language (e.g., test cases). The annotation information may be pre-added to the project file, for example, related annotation information may be written during the writing of the project in the project file, and the annotation information may be used to describe the tag content of the project. When the annotation information is added, the content of the annotation information can be written according to a preset format, so that the annotation information can be analyzed from the project file according to the preset format in the analyzing process.
Alternatively, the annotation information in the project file may be divided into a plurality of levels, with each level of annotation information being used to describe a tag for the corresponding level of the project. For example, the annotation information in the project file may include at least one of directory-level annotation information, file-level annotation information, category-level annotation information, project-level annotation information. According to the embodiment of the disclosure, the annotation information of multiple hierarchies is set, so that the tags of multiple hierarchies can be recorded, and the richness of the tag types of the project can be improved.
In parsing the annotation information, at least one level of annotation information may be parsed from the project file. After parsing the annotation information of at least one level from the project file, a node tree including parent-child relationships may be generated based on the level information of each annotation information of the annotation information of at least one level.
S120: a tag for at least one item is determined from the annotation information.
As described above, the annotation information in the project file may be divided into a plurality of levels, and the annotation information of each level is used to describe a tag of a corresponding level of the project, so that the tags may be divided into a plurality of hierarchies, for example, the tags may include at least one of a directory-level tag corresponding to directory-level annotation information, a file-level tag corresponding to file-level annotation information, a category-level tag corresponding to category-level annotation information, and a project-level tag corresponding to project-level annotation information. The embodiment of the disclosure sets the labels of various levels, and can improve the richness of the label types of the project. In determining the tags in the annotation information, the tags of at least one level of the at least one item may be parsed from the annotation information of at least one level.
S130: and recording the label of at least one item according to a preset data format.
In the embodiment of the present disclosure, the preset data format may be any data storage form, for example, the label of the at least one item may be recorded in the form of a node tree, or the label of the at least one item may be recorded in the form of a table. In the embodiment of the present disclosure, the label of at least one item may be recorded preferentially in the form of a node tree, so as to clearly represent the hierarchical relationship between the labels of the items. It will be appreciated that where the tags of the items are recorded, the tags may be stored in a preset library.
Optionally, when the tags of the item are labeled, the node corresponding to each tag in the node tree may be determined according to the annotation information corresponding to each tag in the tags of at least one level; and binding each label to a corresponding node in the node tree.
In the embodiment of the present disclosure, after recording the tags of at least one item according to the preset data format, the target tag selected by the user may be further determined in response to the tag selection operation of the user; and determining at least one target item with a target label based on the label of the at least one item recorded by the preset data format.
According to the project tag obtaining method, annotation information used for describing the tag content of the project is allowed to be added in the project file in advance, and when the project needs to be tagged, the tag of each project can be obtained by analyzing the annotation information. Because the annotation information can be allowed to be added to the project file of the project of any computer language type, the tag acquisition method can tag the project of any type, so that the tag acquisition method has higher universality; moreover, the type of the tag content described by the annotation information can be unlimited, so that the tag obtaining method can mark various types of tags for the project, and the tag richness of the project is increased.
Fig. 2 shows a schematic flowchart of a method for acquiring a tag of an item according to an embodiment of the present disclosure, and as shown in fig. 2, the method mainly includes the following steps:
s210: at least one level of annotation information is parsed from the project file.
As previously described, annotation information in a project file may be divided into a plurality of levels, with each level of annotation information being used to describe a tag for the corresponding level of the project. For example, the annotation information in the project file may include at least one of directory-level annotation information, file-level annotation information, category-level annotation information, project-level annotation information.
Alternatively, the directory-level annotation information may describe tagged content associated with a level of a directory in which the item file is located, the file-level annotation information may describe tagged content associated with a level of the item file, the category-level annotation information may describe tagged content associated with a level of a category to which the item belongs, and the item-level annotation information may describe tagged content associated with a level of the item.
Fig. 3 is a schematic diagram illustrating a part of content of a project file provided by an embodiment of the present disclosure, as shown in fig. 3, the content of the box a is file-level annotation information, the content of the box B is category-level annotation information, the content of the box C and the content of the box D are two project-level annotation information, respectively, and the content corresponding to the print in fig. 3 is a project. It will be appreciated that not all levels of annotation information need be contained in a project file, for example, the project file shown in FIG. 3 does not belong to any directory, and so no directory-level annotation information may be contained in the project file.
S220: and generating a node tree containing the parent-child relationship based on the level information of each piece of annotation information in the at least one level of annotation information.
In the disclosed embodiments, the annotation information of different levels corresponds to nodes of different levels in a node tree, wherein the annotation information of the highest level corresponds to a root node in the node tree, and the annotation information of the lowest level corresponds to a leaf node in the node tree. Alternatively, the directory-level annotation information, the file-level annotation information, the category-level annotation information, and the item-level annotation information described above are sequentially lower in level, and generally, the item-level annotation information corresponds to leaf nodes in a node tree.
Assuming that directory-level annotation information, file-level annotation information, category-level annotation information, and item-level annotation information are parsed from a project file, where the directory-level annotation information corresponds to a root node in a node tree, the file-level annotation information corresponds to a second-level node next to the root node in the node tree, the category-level annotation information corresponds to a third-level node next to the second-level node in the node tree, and the item-level annotation information corresponds to leaf nodes in the node tree, a node tree including a parent-child relationship is generated based on correspondence between the above annotation information and the nodes.
S230: tags of at least one level of the at least one item are parsed from the annotation information of the at least one level.
As described above, the annotation information in the project file may be divided into a plurality of levels, and the annotation information of each level is used to describe a tag of a corresponding level of the project, so that the tags may be divided into a plurality of hierarchies, for example, the tags may include at least one of a directory-level tag corresponding to directory-level annotation information, a file-level tag corresponding to file-level annotation information, a category-level tag corresponding to category-level annotation information, and a project-level tag corresponding to project-level annotation information.
Optionally, in the embodiment of the present disclosure, the corresponding tag may be matched according to a certain matching rule (e.g., complete matching and upgrade matching) and the content of the tag may be divided into enumerated content and text content. Alternatively, the enumerated content needs to be in a preset numerical list, and the tag value of the text content can be any data.
It should be noted that at least one tag at the same level can be parsed from one annotation information. Taking fig. 3 as an example, the item to be tagged in fig. 3 is a test case, and the file-level tag parsed from the file-level annotation information may include: the file name label ' a certain function test set ' and the file function label ' are tests of a certain function, including tests of addition, deletion, modification and check; the category-level tags parsed from the category-level annotation information may include: category name label "use case set 1"; the item-level annotation tag parsed from the first item-level annotation information may include: a use case name label "create", a test type label "one test", a priority label "p 1"; the item-level annotation tag parsed from the second item-level annotation information may include: a use case name tag "test _ update", a test type tag "single test", a priority tag "p 0"; the execution mode label "auto".
S240: and determining the node corresponding to each label in the node tree according to the annotation information corresponding to each label in the at least one level of labels.
It can be understood that the node in the node tree corresponding to each label is consistent with the node of the annotation information to which the label belongs. Assuming that directory-level annotation information, file-level annotation information, category-level annotation information, and item-level annotation information are parsed from a project file, where the directory-level annotation information corresponds to a root node in a node tree and a directory-level tag parsed from the directory-level annotation information also corresponds to the root node; the file-level annotation information corresponds to a second-level node next to the root node in the node tree, and a file-level label analyzed from the file-level annotation information also corresponds to the second-level node; the class-level annotation information corresponds to a third-level node at the next level of the second-level node in the node tree, and a class-level label analyzed by the class-level annotation information also corresponds to the third-level node; the item-level annotation information corresponds to a leaf node in the node tree, to which the item-level tag parsed from the item-level annotation information also corresponds.
S250: and binding each label to a corresponding node in the node tree.
For example, for a root node in the node tree corresponding to one directory-level label, the directory-level label may be bound to the root node in the node tree, and the binding manner of other labels is not described herein again. It will be appreciated that after label binding is completed, the node tree and individual labels may be stored in a database. Alternatively, the unique identifier of the project file and the node tree association may be stored in a database, and the unique identifier of each node in the node tree and the corresponding tag association may be stored in the database.
In the disclosed embodiment, after each tag is bound to a corresponding node in the node tree, the item tag may be queried based on the obtained tag, and the items may be reasonably managed based on querying the item tag based on the tag, such as classifying, screening, and filtering the items, for example, a part of the items is accurately screened out by a certain target tag, and then all the items with the target tag are executed. Optionally, querying the specific flow based on the tag may refer to step S260.
S260: responding to the label selection operation of a user, and determining a target label selected by the user; and determining at least one target item with a target label based on the label of the at least one item recorded by the preset data format.
In the embodiment of the present disclosure, a user may select at least one target tag as needed, then determine all target items having the at least one target tag based on the node tree and each tag stored in the database, and call out and display the target items in the item file.
The embodiment of the disclosure may pre-construct a virtual executor to execute corresponding steps in the tag obtaining method of the item. For example, a file distributor, an annotation parser, and a tag parser may be generated in advance.
Optionally, the file type of the project file is determined by the file distributor, the project file is sent to the annotation parser corresponding to the file type, and then the annotation information is parsed from the project file by the annotation parser.
Here, different annotation resolvers may be set according to different file types. When constructing the annotation parser, the word segmentation information of each type of computer language may be defined first, and then the corresponding annotation parser may be written using the word segmentation information of each type of computer language. The annotation information is analyzed by the annotation analyzer matched with the file type of the project file, so that the accuracy of the analyzed annotation information can be improved.
The annotation parser may be compatible with all keywords and syntax of the corresponding type of computer language, and optionally, an Antlr4 may be used to generate a corresponding accessor according to the written code parser, and the accessor may perform traversal parsing on the project file to parse out annotation information. Here, for a specific description of parsing the annotation information, reference may be made to corresponding descriptions in the above steps, which are not described herein again.
After the annotation information is analyzed from the project file by the annotation analyzer, the tag of at least one project can be determined from the annotation information by the tag analyzer, and the tag of at least one project is recorded according to a preset data format. Here, the specific description of determining the tag of the item and recording the tag from the annotation information may refer to the corresponding description in the above step, and is not repeated herein.
The item targeted by the item tag obtaining method provided by the embodiment of the disclosure is an item file containing at least one item. In an actual situation, some project files do not include a project, project-level annotation information does not exist in the project files, and only directory-level tags and/or file-level annotation information exist.
Based on the same principle as the above-mentioned item tag obtaining method, fig. 4 shows one of the schematic structural diagrams of an item tag obtaining apparatus provided by the embodiment of the present disclosure, and fig. 5 shows the second of the schematic structural diagrams of an item tag obtaining apparatus provided by the embodiment of the present disclosure. As shown in fig. 4, the tag acquiring apparatus 400 for an item includes a comment parsing module 410, a tag determination module 420, and a tag recording module 430.
The annotation parsing module 410 is configured to parse annotation information from a project file, where the project file includes at least one project, and the annotation information is used to describe tag content of the project and is pre-added to the project file.
The tag determination module 420 is configured to determine a tag of at least one item from the annotation information.
The tag recording module 430 is configured to record a tag of at least one item according to a preset data format.
The tag acquisition device for the project allows annotation information for describing tag content of the project to be added in a project file in advance, and when the project needs to be tagged, tags of each project can be acquired by analyzing the annotation information. Because the annotation information can be allowed to be added to the project file of the project of any computer language type, the tag acquisition method can tag the project of any type, so that the tag acquisition method has higher universality; moreover, the type of the tag content described by the annotation information can be unlimited, so that the tag obtaining method can mark various types of tags for the project, and the tag richness of the project is increased.
In the embodiment of the present disclosure, when the annotation parsing module 410 is used for parsing out annotation information from a project file, it is specifically configured to: parsing out at least one level of annotation information from the project file, wherein the at least one level of annotation information comprises at least one of directory level annotation information, file level annotation information, category level annotation information, and project level annotation information, and the annotation information of each level is used for describing a tag of a corresponding level of the project.
In an embodiment of the present disclosure, the annotation parsing module 410 is further configured to: and generating a node tree containing the parent-child relationship based on the level information of each piece of annotation information in the at least one level of annotation information.
In an embodiment of the present disclosure, when the tag determining module 420 is configured to determine a tag of at least one item from the annotation information, specifically: parsing out tags of at least one level of at least one item from the annotation information of at least one level; the at least one level of tags includes at least one of a directory level tag corresponding to the directory level annotation information, a file level tag corresponding to the file level annotation information, a category level tag corresponding to the category level annotation information, and a project level tag corresponding to the project level annotation information.
In the embodiment of the present disclosure, when the tag recording module 430 is configured to record a tag of at least one item according to a preset data format, specifically:
determining a node corresponding to each label in the node tree according to the annotation information corresponding to each label in at least one level of labels;
and binding each label to a corresponding node in the node tree.
In the embodiment of the present disclosure, when the annotation parsing module 410 is used for parsing out annotation information from a project file, it is specifically configured to:
determining the file type of the project file by using a file distributor, and sending the project file to an annotation analyzer corresponding to the file type;
and analyzing the annotation information from the project file by using an annotation analyzer.
In the embodiment of the present disclosure, as shown in fig. 5, the tag obtaining apparatus 400 for an item further includes an item querying module 440, where the item querying module 440 is configured to:
responding to the label selection operation of a user, and determining a target label selected by the user;
and determining at least one target item with a target label based on the label of the at least one item recorded by the preset data format.
It can be understood that the modules of the tag obtaining apparatus of the item in the embodiment of the present disclosure have functions of implementing the corresponding steps of the tag obtaining method of the item. The function can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the functions described above. The modules can be software and/or hardware, and each module can be implemented independently or by integrating a plurality of modules. For the functional description of each module of the tag obtaining apparatus of the above item, reference may be made to the corresponding description of the tag obtaining method of the above item, which is not described herein again.
It should be noted that, in the technical solution of the present disclosure, the acquisition, storage, application, and the like of the personal information of the related user all conform to the regulations of the relevant laws and regulations, and do not violate the customs of the public order.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
FIG. 6 illustrates a schematic block diagram of an example electronic device that can be used to implement the tag acquisition methods of the embodiments items of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 6, the apparatus 500 includes a computing unit 501 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM)502 or a computer program loaded from a storage unit 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the device 500 can also be stored. The calculation unit 501, the ROM 502, and the RAM 503 are connected to each other by a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
A number of components in the device 500 are connected to the I/O interface 505, including: an input unit 506 such as a keyboard, a mouse, or the like; an output unit 507 such as various types of displays, speakers, and the like; a storage unit 508, such as a magnetic disk, optical disk, or the like; and a communication unit 509 such as a network card, modem, wireless communication transceiver, etc. The communication unit 509 allows the device 500 to exchange information/data with other devices through a computer network such as the internet and/or various telecommunication networks.
The computing unit 501 may be a variety of general-purpose and/or special-purpose processing components having processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The calculation unit 501 executes the respective methods and processes described above, such as the tag acquisition method of the item. For example, in some embodiments, the tag acquisition method of an item may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 508. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 500 via the ROM 502 and/or the communication unit 509. When the computer program is loaded into the RAM 503 and executed by the computing unit 501, one or more steps of the above described tag obtaining method of an item may be performed. Alternatively, in other embodiments, the computing unit 501 may be configured to perform the tag retrieval method of the item by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programmed computer languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server with a combined blockchain.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel or sequentially or in different orders, and are not limited herein as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.

Claims (17)

1. A method for acquiring a label of an item comprises the following steps:
parsing annotation information from a project file, wherein the project file comprises at least one project, and the annotation information is used for describing tag content of the project and is pre-added in the project file;
determining a tag of the at least one item from the annotation information;
and recording the label of the at least one item according to a preset data format.
2. The method of claim 1, wherein said parsing out annotation information from the project file comprises:
parsing out at least one level of annotation information from the project file, wherein the at least one level of annotation information comprises at least one of directory level annotation information, file level annotation information, category level annotation information, and project level annotation information, and the annotation information of each level is used for describing a tag of a corresponding level of the project.
3. The method of claim 2, further comprising, after said parsing out at least one level of annotation information from the project file:
and generating a node tree containing a parent-child relationship based on the level information of each piece of annotation information in the at least one level of annotation information.
4. The method of claim 3, wherein said determining a tag for said at least one item from said annotation information comprises:
parsing out tags of at least one level of the at least one item from the annotation information of the at least one level;
wherein the at least one level of tags includes at least one of a directory level tag corresponding to the directory level annotation information, a file level tag corresponding to the file level annotation information, a category level tag corresponding to the category level annotation information, and a project level tag corresponding to the project level annotation information.
5. The method of claim 4, wherein the recording the tag of the at least one item in a preset data format comprises:
determining a node corresponding to each label in the node tree according to the annotation information corresponding to each label in the at least one level of labels;
and binding each label to the corresponding node in the node tree.
6. The method of any of claims 1 to 5, wherein the parsing out annotation information from the project file comprises:
determining the file type of a project file by using a file distributor, and sending the project file to an annotation parser corresponding to the file type;
and analyzing annotation information from the project file by using the annotation analyzer.
7. The method of any of claims 1 to 5, further comprising, after said recording the tag of the at least one item in a preset data format:
in response to a tag selection operation by a user, determining that the user selected;
and determining at least one target item with the target label based on the label of the at least one item recorded by the preset data format.
8. A tag acquisition apparatus for an item, comprising:
the annotation analysis module is used for analyzing annotation information from a project file, wherein the project file comprises at least one project, and the annotation information is used for describing tag content of the project and is added in the project file in advance;
a tag determination module for determining a tag of the at least one item from the annotation information;
and the label recording module is used for recording the label of the at least one item according to a preset data format.
9. The apparatus of claim 8, wherein the annotation parsing module, when configured to parse annotation information from a project file, is specifically configured to:
parsing out at least one level of annotation information from the project file, wherein the at least one level of annotation information comprises at least one of directory level annotation information, file level annotation information, category level annotation information, and project level annotation information, and the annotation information of each level is used for describing a tag of a corresponding level of the project.
10. The apparatus of claim 8, the annotation parsing module to further:
and generating a node tree containing a parent-child relationship based on the level information of each piece of annotation information in the at least one level of annotation information.
11. The apparatus according to claim 10, wherein the tag determining module, when configured to determine the tag of the at least one item from the annotation information, is specifically configured to:
parsing out tags of at least one level of the at least one item from the annotation information of the at least one level;
wherein the at least one level of tags includes at least one of a directory level tag corresponding to the directory level annotation information, a file level tag corresponding to the file level annotation information, a category level tag corresponding to the category level annotation information, and a project level tag corresponding to the project level annotation information.
12. The apparatus according to claim 11, wherein the tag recording module, when configured to record the tag of the at least one item according to a preset data format, is specifically configured to:
determining a node corresponding to each label in the node tree according to the annotation information corresponding to each label in the at least one level of labels;
and binding each label to the corresponding node in the node tree.
13. The apparatus according to any one of claims 8 to 12, wherein the annotation parsing module, when configured to parse annotation information from a project file, is specifically configured to:
determining the file type of a project file by using a file distributor, and sending the project file to an annotation parser corresponding to the file type;
and analyzing annotation information from the project file by using the annotation analyzer.
14. The apparatus of any of claims 8 to 12, further comprising an item query module to:
responding to a label selection operation of a user, and determining a target label selected by the user;
and determining at least one target item with the target label based on the label of the at least one item recorded by the preset data format.
15. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.
16. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-7.
17. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-7.
CN202110765576.7A 2021-07-06 2021-07-06 Project label acquisition method and device, electronic equipment and storage medium Pending CN113495753A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110765576.7A CN113495753A (en) 2021-07-06 2021-07-06 Project label acquisition method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110765576.7A CN113495753A (en) 2021-07-06 2021-07-06 Project label acquisition method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113495753A true CN113495753A (en) 2021-10-12

Family

ID=77995840

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110765576.7A Pending CN113495753A (en) 2021-07-06 2021-07-06 Project label acquisition method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113495753A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050010562A1 (en) * 2003-04-30 2005-01-13 Fumio Nagasaka File management method, file management device, annotation information generation method, and annotation information generation device
US10002117B1 (en) * 2013-10-24 2018-06-19 Google Llc Translating annotation tags into suggested markup
CN109753286A (en) * 2018-12-28 2019-05-14 四川新网银行股份有限公司 A method of the code method based on functional label counts its call number
CN110110293A (en) * 2019-03-21 2019-08-09 平安普惠企业管理有限公司 H5 project file illustrates document generation method, device and computer equipment
CN110471694A (en) * 2019-07-11 2019-11-19 平安普惠企业管理有限公司 Annotation information processing method, device, computer equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050010562A1 (en) * 2003-04-30 2005-01-13 Fumio Nagasaka File management method, file management device, annotation information generation method, and annotation information generation device
US10002117B1 (en) * 2013-10-24 2018-06-19 Google Llc Translating annotation tags into suggested markup
CN109753286A (en) * 2018-12-28 2019-05-14 四川新网银行股份有限公司 A method of the code method based on functional label counts its call number
CN110110293A (en) * 2019-03-21 2019-08-09 平安普惠企业管理有限公司 H5 project file illustrates document generation method, device and computer equipment
CN110471694A (en) * 2019-07-11 2019-11-19 平安普惠企业管理有限公司 Annotation information processing method, device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN115061721A (en) Report generation method and device, computer equipment and storage medium
CN106293891B (en) Multidimensional investment index monitoring method
CN110502227B (en) Code complement method and device, storage medium and electronic equipment
US11347619B2 (en) Log record analysis based on log record templates
CN110990403A (en) Business data storage method, system, computer equipment and storage medium
CN111553556A (en) Business data analysis method and device, computer equipment and storage medium
CN111460011A (en) Page data display method and device, server and storage medium
CN114579104A (en) Data analysis scene generation method, device, equipment and storage medium
CN114461644A (en) Data acquisition method and device, electronic equipment and storage medium
CN113760891A (en) Data table generation method, device, equipment and storage medium
CN111061733A (en) Data processing method and device, electronic equipment and computer readable storage medium
CN114168119B (en) Code file editing method, device, electronic equipment and storage medium
CN113051333B (en) Data processing method and device, electronic equipment and storage medium
CN113495753A (en) Project label acquisition method and device, electronic equipment and storage medium
CN111352824B (en) Test method and device and computer equipment
CN113791860A (en) Information conversion method, device and storage medium
CN113434585A (en) Resource saving method and equipment
US9208224B2 (en) Business content hierarchy
CN116483735B (en) Method, device, storage medium and equipment for analyzing influence of code change
CN111177501B (en) Label processing method, device and system
CN113918576B (en) Metadata management platform and management method
CN114168565B (en) Backtracking test method, device and system of business rule model and decision engine
CN115600037A (en) Data acquisition method, device and equipment based on front-end buried point and storage medium
CN115408453A (en) Configured report generation method and device, computer equipment and storage medium
CN113177157A (en) Label separation method, device, equipment and storage medium

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