CN114090522A - Electronic file identifier definition method, device and equipment - Google Patents

Electronic file identifier definition method, device and equipment Download PDF

Info

Publication number
CN114090522A
CN114090522A CN202210046296.5A CN202210046296A CN114090522A CN 114090522 A CN114090522 A CN 114090522A CN 202210046296 A CN202210046296 A CN 202210046296A CN 114090522 A CN114090522 A CN 114090522A
Authority
CN
China
Prior art keywords
identifier
classification
target
determining
electronic 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.)
Granted
Application number
CN202210046296.5A
Other languages
Chinese (zh)
Other versions
CN114090522B (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.)
Taishan Information Technology Co ltd
Original Assignee
Taishan Information 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 Taishan Information Technology Co ltd filed Critical Taishan Information Technology Co ltd
Priority to CN202210046296.5A priority Critical patent/CN114090522B/en
Publication of CN114090522A publication Critical patent/CN114090522A/en
Application granted granted Critical
Publication of CN114090522B publication Critical patent/CN114090522B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems

Abstract

The invention discloses an identifier definition method, a device and equipment of an electronic file in the technical field of identifier processing, wherein the method comprises the following steps: determining an object needing to be created currently in the electronic file as a target object; determining the object type of the target object, and determining a precursor classification corresponding to the object type of the target object as a target precursor classification; determining an identification sequence for identifying the sequence number of the target object in the electronic file as a target identification sequence; determining an identifier containing the target preamble classification and the target identification sequence as a target identifier of the target object; the electronic file is characterized in that the leader classification and the identification sequences are respectively corresponding character strings, the serial numbers of different objects in the electronic file are different, the identification sequences of different serial numbers are different, and the leader classification of different object types is different. Therefore, the method and the device can enable the identifiers of the objects to be uniform in whole, not easy to repeat and good in readability.

Description

Electronic file identifier definition method, device and equipment
Technical Field
The present invention relates to the field of identifier processing technologies, and in particular, to a method, an apparatus, and a device for defining an identifier of an electronic file.
Background
The generation of the identifiers of the existing electronic files and the like have no unified specification, and each office software manufacturer writes the identifiers according to the needs of each office software manufacturer and even each module engineer according to the understanding of each office software manufacturer; this results in an overall non-uniform identifier, easy repetition and poor readability.
Disclosure of Invention
The invention aims to provide a method, a device and equipment for defining an identifier of an electronic file, and solves the problems of non-uniform identifier, easy repetition and poor readability in the prior art.
In order to achieve the above purpose, the invention provides the following technical scheme:
an identifier definition method of an electronic file, comprising:
determining an object needing to be created currently in the electronic file as a target object;
determining the object type of the target object, and determining a precursor classification corresponding to the object type of the target object as a target precursor classification; wherein the leading classification is a corresponding character string, and the leading classifications of different object types are different;
determining an identification sequence for identifying the sequence number of the target object in the electronic file as a target identification sequence; the identification sequences are corresponding character strings, the serial numbers of different objects in the electronic file are different, and the identification sequences with different serial numbers are different;
and determining the identifier containing the target precursor classification and the target identification sequence as the target identifier of the target object.
Preferably, after determining that the object to be created currently in the electronic file is the target object, the method further includes:
inquiring an identifier key value pair corresponding to the target object in a preset identifier management device, if the inquiry is successful, determining that an identifier contained in the inquired identifier key value pair is a target identifier of the target object, otherwise, executing a step of determining an object type to which the target object belongs, and after determining the target identifier of the target object, adding the target object and the key value pair of the target identifier into the identifier management device as corresponding identifier key value pairs; and the single identifier key value pair comprises a single object and a corresponding identifier.
Preferably, the method further comprises the following steps:
if the identifier key value pair corresponding to the target object is not inquired in a preset identifier management device, inquiring a front classification key value pair corresponding to the target object in a preset front classification management device, if the inquiry is successful, determining that the front classification contained in the inquired front classification key value pair is the target front classification of the target object, otherwise, executing the step of determining the object type of the target object, and after the target front classification of the target object is determined, adding the target object and the key value pair of the target front classification into the front classification management device as the corresponding front classification key value pair; and the single precursor classification key value pair comprises a single object and a corresponding precursor classification.
Preferably, the method further comprises the following steps:
if the lead classification management device needs to be restored, reading all object types and corresponding lead classifications from the electronic file, and adding the read key value pairs of all object types and corresponding lead classifications into the lead classification management device as lead classification key value pairs;
and if the identifier management device needs to be restored, reading all the objects and the corresponding identifiers from the electronic file, and adding the read key value pairs of the objects and the corresponding identifiers into the identifier management device as identifier key value pairs.
Preferably, before determining that the object to be created currently in the electronic file is the target object, the method further includes:
and judging whether the object which needs to be created currently in the electronic file has a reference relationship with other objects, if so, executing a step of determining the object which needs to be created currently in the electronic file as a target object, and otherwise, determining that the identifier of the object which needs to be created currently in the electronic file does not need to be acquired.
Preferably, after determining that the object to be created currently in the electronic file is the target object, the method further includes:
and determining identifiers of other objects having reference relations with the target object as designated identifiers, inquiring an identifier key value pair corresponding to the designated identifiers from the identifier management device, if the inquiry is successful, establishing the reference relations between the objects in the inquired identifier key value pair and the target object, and otherwise, determining that the reference relations are established to cause problems.
Preferably, the preamble classification comprises at least one capital letter, the identification sequence comprises at least one number, and the preamble classification and the identification sequence of the identifier are divided by a preset separator.
An identifier definition apparatus of an electronic file, comprising:
an object determination module to: determining an object needing to be created currently in the electronic file as a target object;
a preamble classification determination module to: determining the object type of the target object, and determining a precursor classification corresponding to the object type of the target object as a target precursor classification; wherein the leading classification is a corresponding character string, and the leading classifications of different object types are different;
an identification sequence determination module to: determining an identification sequence for identifying the sequence number of the target object in the electronic file as a target identification sequence; the identification sequences are corresponding character strings, the serial numbers of different objects in the electronic file are different, and the identification sequences with different serial numbers are different;
an identifier determination module to: and determining the identifier containing the target precursor classification and the target identification sequence as the target identifier of the target object.
An identifier definition device of an electronic file, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the identifier definition method for an electronic file as defined in any one of the above when said computer program is executed.
The invention provides an identifier definition method, a device and equipment of an electronic file, wherein the method comprises the following steps: determining an object needing to be created currently in the electronic file as a target object; determining the object type of the target object, and determining a precursor classification corresponding to the object type of the target object as a target precursor classification; determining an identification sequence for identifying the sequence number of the target object in the electronic file as a target identification sequence; determining an identifier containing the target preamble classification and the target identification sequence as a target identifier of the target object; the electronic file is characterized in that the leader classification and the identification sequences are respectively corresponding character strings, the serial numbers of different objects in the electronic file are different, the identification sequences of different serial numbers are different, and the leader classification of different object types is different. For any object needing to be created in an electronic file, determining a leading classification corresponding to the object type of the any object as the leading classification of the any object, then determining an identification sequence for identifying the serial number of the any object in the electronic file as the identification sequence of the any object, and further obtaining an identifier comprising the leading classification and the identification sequence of the any object as the identifier of the any object, wherein the leading classification and the identification sequence are respectively corresponding character strings, the serial numbers of different objects in the electronic file are different, the identification sequences of different serial numbers are different, and the leading classifications of different object types are different. Therefore, the uniform definition of the object identifiers in the electronic file can be realized through the method, each object has the unique identifier, and the identifiers of the objects are uniform and not easy to repeat and have good readability.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of an identifier definition method for an electronic file according to an embodiment of the present invention;
fig. 2 is an exemplary diagram of a key-value pair list in an identifier management apparatus in an identifier definition method for an electronic file according to an embodiment of the present invention;
fig. 3 is a diagram illustrating an exemplary key value pair list in a leading classification management device in an identifier definition method for an electronic file according to an embodiment of the present invention;
fig. 4 is a structural diagram of an identifier definition apparatus of an electronic file according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, a flowchart of an identifier definition method for an electronic file according to an embodiment of the present invention is shown, where the method includes:
s11: and determining the object needing to be created currently in the electronic file as a target object.
The electronic file is a word material formed by people in social activities and taking chemical magnetic materials such as computer discs, magnetic discs, optical discs and the like as carriers, is accessed by a computer system and can be transmitted on a communication network; the electronic document and the electronic mail mainly comprise an electronic document, an electronic mail, an electronic report, an electronic drawing and the like; the electronic file in the embodiment of the present application refers to information stored in a computer storage device or a database for storing office software document data, and includes data generated by office software applications such as word processing, spreadsheets, presentations, reading applications, and the like. The object type refers to a data type with the same attribute field, is abstract and is used for describing the characteristics of a certain module in a certain concrete application of office software; each object type has unique characteristics, such as object type description, medium (such as class path) for defining object type, etc.; typically through object type specification, class path, etc., the user can know the specific properties, uses, etc. of this object type. The object is a specific instance of the object type and has a specific attribute value, and the objects are different when the attribute values are different; if the object type is color, the object may be red, green, etc., and if the object type is transparency, the object may be fifty percent, one hundred percent, etc. The identifier is a symbol for identifying an entity, has different meanings under different application environments, and is a name used in user programming in a computer programming language, and is used for naming variables, constants, functions, statement blocks and the like so as to establish a relationship between the name and the use, and the relationship is generally formed by letters, numbers and other characters; an identifier in the embodiments of the present application refers to a symbol in an electronic file that identifies a data set of an object to which other objects may refer via the identifier. In addition, in the embodiment of the application, when an object is created, a corresponding identifier needs to be defined for the object, so that subsequent operations such as reference to the object are facilitated, and therefore any object needing to be created in an electronic file can be determined as a target object, and identifier definition is further achieved for the target object.
S12: determining an object type to which the target object belongs, and determining a leading classification corresponding to the object type of the target object as a target leading classification; wherein the leading classification is a corresponding character string, and the leading classifications of different object types are different.
The method and the device for determining the target object type can determine the object type of the target object, and then determine the precursor classification corresponding to the object type as the target precursor classification based on the preset corresponding relation; specifically, according to the embodiment of the application, each object type with actual physical significance can be determined in advance, then different character strings are set for different object types to serve as corresponding front classification (the front classification of different object types is different), so that when the front classification of the target object is determined, the front classification of the object type to which the target object belongs can be determined to serve as the front classification of the target object, and for the problems that identifiers are not uniform, are easy to repeat and are poor in readability, a relationship between the front classification and the object type with the actual physical significance is established first, the definitions of the identifiers in the electronic file are unified and normalized, readability is effectively improved, and the problems that the identifiers are not uniform and are easy to repeat are avoided.
S13: determining an identification sequence for identifying the sequence number of the target object in the electronic file as a target identification sequence; the identification sequences are corresponding character strings, the serial numbers of different objects in the electronic file are different, and the identification sequences with different serial numbers are different.
In order to further implement the unique definition of the object identifier, different character strings may also be set as identification sequences of different objects in the embodiment of the present application, where the identification sequences of different objects are different; specifically, a serial number that uniquely represents the identity of an arbitrary object may be assigned to the arbitrary object according to the creation order of the arbitrary object in the electronic file, and then an identification sequence of the serial number that can uniquely identify the arbitrary object may be obtained as a target identification sequence of the arbitrary object, so as to finally obtain an identifier that includes a preamble classification and the identification sequence of the arbitrary object as an identifier that can uniquely identify the arbitrary object. The serial numbers of different objects in the electronic file are different, and identification sequences for identifying different serial numbers are also different, so that the uniqueness of the identifier for identifying the object is ensured; that is, the identification sequence in the same electronic file identifies the objects uniquely and unrepeatedly, and the ascending sequence of the identification sequence under the same preamble classification can indicate that the objects can be operated in the ascending sequence as required during writing, reading and restoring in the electronic file.
S14: and determining the identifier containing the target precursor classification and the target identification sequence as the target identifier of the target object.
For any object to be created in an electronic file, determining a leading classification corresponding to the object type to which the any object belongs as the leading classification of the any object, then determining an identification sequence (the identification sequence can be the same as the corresponding serial number, or can be other character strings for identifying the corresponding serial number set according to actual needs) for identifying the serial number of the any object in the electronic file (the identification sequence can be the same as the corresponding serial number, or can be other character strings for identifying the corresponding serial number set according to actual needs), and further obtaining an identifier comprising the leading classification and the identification sequence of the any object as an identifier of the any object, wherein the leading classification and the identification sequence are respectively corresponding character strings, and the serial numbers of different objects in the electronic file are different, the identification sequences of different sequence numbers are different, and the leading classifications of different object types are different. Therefore, the uniform definition of the object identifiers in the electronic file can be realized through the method, each object has the unique identifier, and the identifiers of the objects are uniform and not easy to repeat and have good readability.
In the method for defining an identifier of an electronic document according to an embodiment of the present invention, the preamble classification includes at least one capital letter, the identifier sequence includes at least one number, and the preamble classification and the identifier sequence of the identifier are divided by a preset separator.
It should be noted that in the embodiment of the present application, the preamble classification may specifically be at least one capital letter, the identification sequence may be at least one number, and the two are divided by a preset separator, so that a uniform specification definition of the identifier can be implemented. Specifically, the embodiment of the present application may define the identifier as a character string, which is composed of two parts, i.e., an identifier in the form of "a-1", the former part is composed of 1 to n capital letters, which is called "preamble classification", the latter part is composed of 1 to n numbers, which is called "identification sequence", and the middle is separated by a preset separator (e.g., "-"). Wherein, the leading classification represents the classification of the object (object type), and is composed of 1 to n capital letters (realized by the representation of twenty-six system capital alphabet), and n represents the length of the character string, starting from 1; whereas the twenty-six upper case alphabet notation refers to a method of converting a number to an upper case letter, such as numeral 1 being represented by the upper case letter "a", numerals 1-26 being represented by the upper case letters "a" - "Z", numeral 27 being represented by "AA", numeral 52, … … being represented by "AZ", and so on; this preamble classification does not have any physical meaning per se, and is only used for identifier classification. The identification sequence identifies the serial number of the corresponding object in the electronic file, the identification sequence is unique and not repeated in the same electronic file, and the ascending sequence of the identification sequence under the same leading classification indicates that the objects can be operated according to the ascending sequence when writing out, reading and restoring in the electronic file. The preamble is then classified and the identification sequence is segmented with the middle key character "-". It should be noted that the number after the leading classification conversion of any object may be an arrangement position of the leading classification key value pair of the any object in the leading classification management device (that is, the leading classification key value pair of the any object is the first leading classification key value pair in the leading classification management device, and then the number after the corresponding leading classification conversion is several), and the number corresponding to the identification sequence of the any object may be an arrangement position of the identifier key value pair of the any object in the identifier management device (that is, the identifier key value pair of the any object is the second leading classification key value pair in the identifier management device, then the number corresponding to the corresponding identification sequence is several, and at this time, the serial number and the identification sequence of the any object are the same); the identifier definition is realized in the following manner, and the detailed description of the corresponding technical scheme is carried out.
The method for defining an identifier of an electronic file according to an embodiment of the present invention may further include, after determining that an object that needs to be created currently in the electronic file is a target object:
inquiring an identifier key value pair corresponding to a target object in a preset identifier management device, if the inquiry is successful, determining that an identifier contained in the inquired identifier key value pair is the target identifier of the target object, otherwise, executing a step of determining the object type of the target object, and after determining the target identifier of the target object, adding the target object and the key value pair of the target identifier into the identifier management device as corresponding identifier key value pairs; wherein, the single identifier key value pair contains a single object and a corresponding identifier.
In the embodiment of the application, the identifier management device can be configured to store the corresponding relation between the object and the identifier in a key-value pair manner, so as to realize efficient management of the corresponding relation between the object and the identifier based on the identifier management device. Specifically, the identifier management apparatus stores a key-value pair list (as shown in fig. 2) of identifier-key-value pairs whose objects are keys and whose identifiers are values; when the identifier of the target object needs to be acquired, the identifier of the target object may be queried in the identifier management device, if the query is successful (that is, the identifier of the target object exists in the identifier management device), the identifier of the target object existing in the identifier management device may be directly returned without redefining the identifier according to the sequence of the leading classification, the identification sequence and the identifier, and if the query is failed (that is, the identifier of the target object does not exist in the identifier management device), the definition of the identifier needs to be realized through the sequence of object type acquisition, leading classification determination, identification sequence determination and the like, and the target object and the identifier obtained by the definition are recorded in the identifier management device as a new identifier key value pair (with the target object as a key and the identifier of the target object as a value).
In a specific implementation manner, the process of implementing identifier management based on the identifier management apparatus may specifically include: initializing an identifier management device; creating an identifier key-value pair of an object identifier in an identifier management apparatus; an identifier of an object is acquired from an identifier management apparatus. The process of initializing the identifier management apparatus may specifically include: and judging whether the identifier management device exists or not, if not, initializing, otherwise, determining that the initialization is not needed, and returning to the identifier management device after the initialization is finished.
The process of determining the respective identifier based on the object may include: judging whether the key value pair of the object identifier exists in the identifier management device, if so, returning the corresponding identifier, otherwise, realizing the definition of the identifier; in the identifier definition, object leading classification is acquired, an identification sequence is calculated (the number is added with 1 according to the number of identifier key value pairs in the identifier management device and then converted into a numeric character string), the leading classification character string and the identification sequence character string are spliced by using a character '-' as a separator, the object is used as a key and the identifier is used as a value to generate an identifier key value pair, and the identifier key value pair is added into the identifier management device. When obtaining the corresponding identifier based on the object, whether the identifier management device is initialized can be judged first, if not, the initialization is carried out, otherwise, the step of judging whether the key value pair of the object identifier exists in the identifier management device can be carried out.
The method for defining the identifier of the electronic file provided by the embodiment of the invention can further comprise the following steps:
if the identifier key value pair corresponding to the target object is not inquired in the preset identifier management device, inquiring a front classification key value pair corresponding to the target object in the preset front classification management device, if the inquiry is successful, determining that the front classification contained in the inquired front classification key value pair is the target front classification of the target object, otherwise, executing the step of determining the object type of the target object, and after the target front classification of the target object is determined, adding the target object and the key value pair of the target front classification into the front classification management device as the corresponding front classification key value pair; wherein, the single precursor classification key value pair comprises a single object and a corresponding precursor classification.
The embodiment of the application can set the leading classification management device to store the corresponding relation between the object type and the leading classification in a key value pair mode, so that the high-efficiency management of the corresponding relation between the object type and the leading classification is realized based on the leading classification management device. Specifically, the leading classification management device is a key-value pair list (as shown in fig. 3) of leading classification key-value pairs, where the key represents an object type and the value is an uppercase leading classification represented by a twenty-six system, for example, the 1 st record in the classification leading management device is "object type 1", the corresponding leading classification is "a", the 26 th record is "object type 26", the leading classification is "Z", the 52 th record is "object type 52", the leading classification is "AZ", and the like; the method comprises the steps that a leading classification management device can obtain a leading classification of an existing object type, when any object type and corresponding leading classification do not exist in the leading classification management device, 1 is added to the serial number of the object type in the leading classification management device to serve as a key of the any object type, capital letters of numbers represented by the leading classification after the 1 are added to the digits serve as values of the any object type, if only one record that the object type is 'object type 1' and the corresponding leading classification is 'A' exists in the leading classification management device, a new leading classification key value pair is 'object type 2' and the corresponding leading classification is 'B', so that a new leading classification key value pair is obtained and recorded into the leading classification management device. Therefore, the method and the device realize the high-efficiency management of the corresponding relation between the object type and the front classification through the management of the front classification management device, and provide an interface for acquiring the front classification through the object type, so that the specific object type and meaning represented by the identifier can be accurately identified and easily understood through the front classification management device, and the readability is improved.
In a specific implementation manner, the process of implementing preamble classification management based on the preamble classification management device may include: initializing a preamble classification management device; adding a leader classification key value pair in the leader classification management device; a leading classification of the object type is obtained. And the initialization process of the preamble classification management device may include: judging whether the preamble classification management device exists, if the preamble classification management device exists, directly finishing, if the preamble classification management device does not exist, initializing the preamble classification management device, and returning to the preamble classification management device after the initialization is finished.
Implementing the preamble classification determination based on the preamble classification management means may include: and determining the object type through retrieval, judging whether the object type exists in the front guiding classification management device, if so, directly returning the corresponding front guiding classification, otherwise, adding 1 to the front guiding classification number in the front guiding classification management device, converting the front guiding classification number into a corresponding twenty-six system capital letter character string as a new front guiding classification, generating a key value pair by the retrieved object type and the new front guiding classification, and adding the key value pair as a front guiding classification key value pair into the front guiding classification management device.
The method for defining the identifier of the electronic file provided by the embodiment of the invention can further comprise the following steps:
if the leader classification management device needs to be restored, reading all object types and corresponding leader classifications from the electronic file, and adding the read key value pairs of all object types and corresponding leader classifications into the leader classification management device as leader classification key value pairs;
and if the identifier management device needs to be restored, reading all the objects and the corresponding identifiers from the electronic file, and adding the read key value pairs of the objects and the corresponding identifiers into the identifier management device as identifier key value pairs.
The embodiment of the present application may specifically implement a restoration process of the preamble classification management apparatus, including: initializing a preamble classification management device; reading file data in the electronic file, wherein the file data comprises object type data and leading classification data; creating an object type according to the read object type data, and determining a corresponding preamble classification according to the read preamble classification data; classifying the object type and the precursor to generate a precursor classification key value pair; adding the generated leader classification key value pair into a leader classification management device; and judging whether the data of the leader classification management device in the electronic file is completely read, if not, continuing to read the file data, returning to the step of establishing the object type according to the read object type data, and if so, finishing the restoration of the leader classification management device.
The implementation of the restoration process of the identifier management apparatus in the embodiment of the present application may specifically include: judging whether the identifier management device is initialized or not; if the identifier management device is not initialized, initializing, and if the identifier management device is initialized, reading file data in the electronic file; reproducing the object by using the read data, judging whether the read data contains an identifier, and if the read data contains the identifier, indicating that the corresponding object is quoted by other objects in an identifier mode, generating a corresponding identifier key value and adding the identifier key value into an identifier management device for management, otherwise, not needing to be managed by the identifier management device; and judging whether the file data in the electronic file is completely read, if not, continuing to read, returning to the step of reproducing the object by using the read data, and otherwise, ending the restoration of the identifier management device.
According to the embodiment of the application, the identifier management device and the leading classification management device can be effectively restored by reading the file data in the electronic file when needed, and therefore corresponding identifier management and leading classification management can be conveniently achieved.
The method for defining an identifier of an electronic file according to an embodiment of the present invention may further include, before determining that an object that needs to be created in the electronic file is a target object:
judging whether the object which needs to be created currently in the electronic file has a reference relation with other objects, if so, executing a step of determining the object which needs to be created currently in the electronic file as a target object, otherwise, determining that the identifier of the object which needs to be created currently in the electronic file does not need to be acquired.
After determining that the object currently required to be created in the electronic file is the target object, the method may further include:
and determining identifiers of other objects having reference relations with the target object as designated identifiers, inquiring an identifier key value pair corresponding to the designated identifiers from the identifier management device, if the inquiry is successful, establishing the reference relations between the objects in the inquired identifier key value pair and the target object, and otherwise, determining that the reference relations are established to cause problems.
It should be noted that, in the embodiment of the present application, only for an object having a reference relationship with another object, an identifier of the object needs to be defined to facilitate creation of the reference relationship. Specifically, if any object needs to be created in the electronic file, whether a reference relationship exists between the any object and other objects is judged, if so, a corresponding identifier is defined for the any object, otherwise, the corresponding identifier is determined not to need to be defined for the any object; after the corresponding identifier is defined, the establishment of the corresponding application relation can be realized based on the defined identifier; the method specifically comprises the following steps: reading file data; creating an object A, wherein the object may refer to other objects in an identifier mode or may not refer to other objects, so that whether the referenced identifier exists in the object A or not is judged, if not, whether file data are read completely is judged, and if yes, an object acquisition flow of an identifier management device is called through the identifier to obtain an object B; and establishing a reference relation between the object A and the object B, judging whether the file data is completely read, continuing to read the file data if the file data is not completely read, and determining to end if the file data is not completely read.
In a specific implementation manner, when an object corresponding to an identifier is acquired, traversing all identifier key value pairs in an identifier management apparatus, comparing whether identifiers in the identifier key value pairs are equal to identifiers of objects to be acquired, if so, returning the objects in the corresponding identifier key value pairs, if not, continuing traversing until all identifier key value pairs have an traversal result, and if not, returning an empty object if a result that the comparison result is equal when identifiers in the identifier key value pairs are equal to identifiers of objects to be acquired does not occur yet, which may include: judging whether a next key-value pair exists in the identifier management device; if the identifier management device does not have the next key value pair, returning a null object; if the next key value pair exists in the identifier management device, taking the next key value pair as the current one, taking the identifier in the current key value pair, comparing whether the identifier of the object needing to be obtained is equal to the identifier in the current key value pair, if not, continuously judging whether the next key value pair exists, otherwise, returning the object in the current key value pair. When the two objects are compared to determine whether the two objects are equal, the objects with the same hash value or the objects pointing to the same memory address can be determined to be the same object through comparison of the hash values of the object instances or the object references, the same object has only one record in the identifier management device, and the corresponding value is the identifier of the object when the object is a key.
The identifier definition scheme provided by the application is globally unique and is rapidly classified; describing the specific meaning and the corresponding object type represented by each identifier front classification through a front classification management device; the identifier management device is used for generating and acquiring the identifier, generating the identifier through the object and acquiring the object through the identifier; therefore, each object in the electronic file is ensured to have the unique identifier during the storage operation, and the object can be accurately restored through the unique identifier during the reading operation, and the reference relation is established.
An embodiment of the present invention further provides an identifier definition apparatus for an electronic file, as shown in fig. 4, which may include:
an object determination module 11 configured to: determining an object needing to be created currently in the electronic file as a target object;
a preamble classification determining module 12 for: determining an object type to which the target object belongs, and determining a leading classification corresponding to the object type of the target object as a target leading classification; wherein, the front classification is corresponding character string, and the front classification of different object types is different;
an identification sequence determination module 13 configured to: determining an identification sequence for identifying the sequence number of the target object in the electronic file as a target identification sequence; the identification sequences are corresponding character strings, the serial numbers of different objects in the electronic file are different, and the identification sequences with different serial numbers are different;
an identifier determination module 14 configured to: and determining the identifier containing the target precursor classification and the target identification sequence as the target identifier of the target object.
An embodiment of the present invention further provides an identifier definition device for an electronic file, which may include:
a memory for storing a computer program;
a processor for implementing the steps of the identifier definition method for an electronic file as claimed in any one of the above when executing a computer program.
It should be noted that, for the description of the relevant parts in the identifier definition apparatus and the device of the electronic file provided in the embodiment of the present invention, reference is made to the detailed description of the corresponding parts in the identifier definition of the electronic file provided in the embodiment of the present invention, and details are not repeated here. In addition, parts of the technical solutions provided in the embodiments of the present invention that are consistent with the implementation principles of the corresponding technical solutions in the prior art are not described in detail, so as to avoid redundant description.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (8)

1. An identifier definition method for an electronic file, comprising:
determining an object needing to be created currently in the electronic file as a target object;
determining the object type of the target object, and determining a precursor classification corresponding to the object type of the target object as a target precursor classification; wherein the leading classification is a corresponding character string, and the leading classifications of different object types are different;
determining an identification sequence for identifying the sequence number of the target object in the electronic file as a target identification sequence; the identification sequences are corresponding character strings, the serial numbers of different objects in the electronic file are different, and the identification sequences with different serial numbers are different;
determining an identifier containing the target preamble classification and the target identification sequence as a target identifier of the target object;
after determining that the object which needs to be created currently in the electronic file is the target object, the method further comprises the following steps:
inquiring an identifier key value pair corresponding to the target object in a preset identifier management device, if the inquiry is successful, determining that an identifier contained in the inquired identifier key value pair is a target identifier of the target object, otherwise, executing a step of determining an object type to which the target object belongs, and after determining the target identifier of the target object, adding the target object and the key value pair of the target identifier into the identifier management device as corresponding identifier key value pairs; and the single identifier key value pair comprises a single object and a corresponding identifier.
2. The method of claim 1, further comprising:
if the identifier key value pair corresponding to the target object is not inquired in a preset identifier management device, inquiring a front classification key value pair corresponding to the target object in a preset front classification management device, if the inquiry is successful, determining that the front classification contained in the inquired front classification key value pair is the target front classification of the target object, otherwise, executing the step of determining the object type of the target object, and after the target front classification of the target object is determined, adding the target object and the key value pair of the target front classification into the front classification management device as the corresponding front classification key value pair; and the single precursor classification key value pair comprises a single object and a corresponding precursor classification.
3. The method of claim 2, further comprising:
if the lead classification management device needs to be restored, reading all object types and corresponding lead classifications from the electronic file, and adding the read key value pairs of all object types and corresponding lead classifications into the lead classification management device as lead classification key value pairs;
and if the identifier management device needs to be restored, reading all the objects and the corresponding identifiers from the electronic file, and adding the read key value pairs of the objects and the corresponding identifiers into the identifier management device as identifier key value pairs.
4. The method of claim 3, wherein before determining that the object currently required to be created in the electronic file is the target object, further comprising:
and judging whether the object which needs to be created currently in the electronic file has a reference relationship with other objects, if so, executing a step of determining the object which needs to be created currently in the electronic file as a target object, and otherwise, determining that the identifier of the object which needs to be created currently in the electronic file does not need to be acquired.
5. The method of claim 4, after determining that the object to be created currently in the electronic file is the target object, further comprising:
and determining identifiers of other objects having reference relations with the target object as designated identifiers, inquiring an identifier key value pair corresponding to the designated identifiers from the identifier management device, if the inquiry is successful, establishing the reference relations between the objects in the inquired identifier key value pair and the target object, and otherwise, determining that the reference relations are established to cause problems.
6. The method of claim 5, wherein the preamble classification comprises at least one capital letter, the identification sequence comprises at least one number, and the preamble classification and the identification sequence of the identifier are separated by a predetermined separator.
7. An identifier definition apparatus of an electronic file, comprising:
an object determination module to: determining an object needing to be created currently in the electronic file as a target object;
a preamble classification determination module to: determining the object type of the target object, and determining a precursor classification corresponding to the object type of the target object as a target precursor classification; wherein the leading classification is a corresponding character string, and the leading classifications of different object types are different;
an identification sequence determination module to: determining an identification sequence for identifying the sequence number of the target object in the electronic file as a target identification sequence; the identification sequences are corresponding character strings, the serial numbers of different objects in the electronic file are different, and the identification sequences with different serial numbers are different;
an identifier determination module to: determining an identifier containing the target preamble classification and the target identification sequence as a target identifier of the target object;
the identifier definition means is further for: after determining that an object needing to be created currently in an electronic file is a target object, inquiring an identifier key value pair corresponding to the target object in a preset identifier management device, if the inquiry is successful, determining an identifier contained in the inquired identifier key value pair as a target identifier of the target object, otherwise, executing a step of determining an object type of the target object, and after determining the target identifier of the target object, adding the target object and the key value pair of the target identifier into the identifier management device as corresponding identifier key value pairs; and the single identifier key value pair comprises a single object and a corresponding identifier.
8. An identifier definition device of an electronic file, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the identifier definition method of an electronic file according to any of claims 1 to 6 when executing said computer program.
CN202210046296.5A 2022-01-17 2022-01-17 Electronic file identifier definition method, device and equipment Active CN114090522B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210046296.5A CN114090522B (en) 2022-01-17 2022-01-17 Electronic file identifier definition method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210046296.5A CN114090522B (en) 2022-01-17 2022-01-17 Electronic file identifier definition method, device and equipment

Publications (2)

Publication Number Publication Date
CN114090522A true CN114090522A (en) 2022-02-25
CN114090522B CN114090522B (en) 2022-04-22

Family

ID=80308817

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210046296.5A Active CN114090522B (en) 2022-01-17 2022-01-17 Electronic file identifier definition method, device and equipment

Country Status (1)

Country Link
CN (1) CN114090522B (en)

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102236589A (en) * 2010-05-04 2011-11-09 南京壹进制信息技术有限公司 Data protection method for managing increment file based on digital identifiers
CN102298641A (en) * 2011-09-14 2011-12-28 清华大学 Method for uniformly storing files and structured data based on key value bank
JP2012059166A (en) * 2010-09-13 2012-03-22 Toshiba Tec Corp Merchandise data processor and program for the same
CN106156019A (en) * 2015-03-23 2016-11-23 北京万方数据股份有限公司 The method and apparatus generating identifier
CN106375983A (en) * 2016-11-01 2017-02-01 武汉斗鱼网络科技有限公司 Identifier generating method and apparatus
CN106997378A (en) * 2017-03-13 2017-08-01 摩贝(上海)生物科技有限公司 The synchronous method of database data polymerization based on Redis
CN109275042A (en) * 2018-10-17 2019-01-25 武汉斗鱼网络科技有限公司 A kind of distribution method, device, terminal and the storage medium of barrage message
CN111737269A (en) * 2020-08-26 2020-10-02 苏州浪潮智能科技有限公司 Data query response method and device and computer readable storage medium
CN111930969A (en) * 2020-07-01 2020-11-13 中新金桥数字科技(北京)有限公司 Knowledge object identifier rapid analysis method in knowledge service field
CN112541137A (en) * 2020-12-10 2021-03-23 清华大学 Identifier generation method and device, electronic equipment and storage medium
CN112541834A (en) * 2020-12-08 2021-03-23 南方电网调峰调频发电有限公司 Identifier processing method, device and system for hydropower industry digital object
US20210334239A1 (en) * 2020-04-27 2021-10-28 Richard Banister System and Method for Re-Synchronizing a Portion of or an Entire Source Database and a Target Database
CN113612811A (en) * 2021-06-20 2021-11-05 济南浪潮数据技术有限公司 Method, system, equipment and medium for client mounting in multiple channels
CN113779513A (en) * 2021-09-15 2021-12-10 广州易方信息科技股份有限公司 ZIP file identification insertion method and device, computer equipment and storage medium
CN113836611A (en) * 2021-08-25 2021-12-24 通号城市轨道交通技术有限公司 Equipment number file generation method and device, electronic equipment and storage medium

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102236589A (en) * 2010-05-04 2011-11-09 南京壹进制信息技术有限公司 Data protection method for managing increment file based on digital identifiers
JP2012059166A (en) * 2010-09-13 2012-03-22 Toshiba Tec Corp Merchandise data processor and program for the same
CN102298641A (en) * 2011-09-14 2011-12-28 清华大学 Method for uniformly storing files and structured data based on key value bank
CN106156019A (en) * 2015-03-23 2016-11-23 北京万方数据股份有限公司 The method and apparatus generating identifier
CN106375983A (en) * 2016-11-01 2017-02-01 武汉斗鱼网络科技有限公司 Identifier generating method and apparatus
CN106997378A (en) * 2017-03-13 2017-08-01 摩贝(上海)生物科技有限公司 The synchronous method of database data polymerization based on Redis
CN109275042A (en) * 2018-10-17 2019-01-25 武汉斗鱼网络科技有限公司 A kind of distribution method, device, terminal and the storage medium of barrage message
US20210334239A1 (en) * 2020-04-27 2021-10-28 Richard Banister System and Method for Re-Synchronizing a Portion of or an Entire Source Database and a Target Database
CN111930969A (en) * 2020-07-01 2020-11-13 中新金桥数字科技(北京)有限公司 Knowledge object identifier rapid analysis method in knowledge service field
CN111737269A (en) * 2020-08-26 2020-10-02 苏州浪潮智能科技有限公司 Data query response method and device and computer readable storage medium
CN112541834A (en) * 2020-12-08 2021-03-23 南方电网调峰调频发电有限公司 Identifier processing method, device and system for hydropower industry digital object
CN112541137A (en) * 2020-12-10 2021-03-23 清华大学 Identifier generation method and device, electronic equipment and storage medium
CN113612811A (en) * 2021-06-20 2021-11-05 济南浪潮数据技术有限公司 Method, system, equipment and medium for client mounting in multiple channels
CN113836611A (en) * 2021-08-25 2021-12-24 通号城市轨道交通技术有限公司 Equipment number file generation method and device, electronic equipment and storage medium
CN113779513A (en) * 2021-09-15 2021-12-10 广州易方信息科技股份有限公司 ZIP file identification insertion method and device, computer equipment and storage medium

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
FONS WIJNHOVEN 等: "Value-Based File Retention: File Attributes as File Value and Information Waste Indicators", 《ACM》 *
XIULONG LIU 等: "Range Queries for Sensor-augmented RFID Systems", 《IEEE》 *
刘景宁 等: "对象存储系统中对象查找及标识符分配管理策略", 《小型微型计算机系统》 *
王巧华: "数字校园下高校档案工作业务流程重组", 《中国优秀博硕士学位论文全文数据库(硕士)社会科学Ⅱ辑》 *

Also Published As

Publication number Publication date
CN114090522B (en) 2022-04-22

Similar Documents

Publication Publication Date Title
US20020032684A1 (en) Directory information management apparatus, directory information management method, and computer readable recording medium having directory information management program stored therein
JP2005517221A (en) Efficient collating element structure for handling large numbers of characters
CN109918341B (en) Log processing method and device
CN110222238B (en) Query method and system for bidirectional mapping of character string and identifier
CN112463774B (en) Text data duplication eliminating method, equipment and storage medium
GB2607780A (en) Index structure for blockchain ledger
US11074133B2 (en) Method, electronic device and computer readable medium of file management
CN112988770B (en) Method, device, electronic equipment and storage medium for updating serial number
CN109189759B (en) Data reading method, data query method, device and equipment in KV storage system
US20150213048A1 (en) Hybrid of proximity and identity similarity based deduplication in a data deduplication system
CN116089620A (en) Electronic archive data management method and system
CN113051229A (en) User data acquisition method, device, terminal and readable storage medium
CN114090522B (en) Electronic file identifier definition method, device and equipment
CN114895875B (en) Zero-code visual information system metadata production application method and system
CN116089663A (en) Rule expression matching method and device and computer readable storage medium
CN113553458A (en) Data export method and device in graph database
CN111488341B (en) Database index management method and device and electronic equipment
CN110968649B (en) Method, apparatus and computer program product for managing data sets
CN115221360A (en) Tree structure configuration method and system
CN116881262B (en) Intelligent multi-format digital identity mapping method and system
CN110609926A (en) Data tag storage management method and device
CN112380174B (en) XFS file system analysis method containing deleted files, terminal device and storage medium
CN113987785B (en) Management method and device for complete information of algorithm block of nuclear power station DCS system
CN113792048B (en) Form verification rule generation method and system for non-relational database
CN112749154B (en) Data warehousing method, device and equipment and computer readable 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
GR01 Patent grant
GR01 Patent grant
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: An identifier definition method, device, and device for electronic documents

Effective date of registration: 20231019

Granted publication date: 20220422

Pledgee: Taian Taishan Caiyuan Investment Group Co.,Ltd.

Pledgor: Taishan Information Technology Co.,Ltd.

Registration number: Y2023980061603

PE01 Entry into force of the registration of the contract for pledge of patent right