Functional position number normalizing method and device, electronic equipment and storage medium
The regular expression pattern is constructed by electronic devices to extract and fill the sub-parts of the functional position number, which solves the problem of low efficiency in functional position number and achieves more efficient format unification.
Patent Information
- Application Number
- CN202411189653.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-27
- Publication Date
- 2024-12-31
AI Technical Summary
The existing functions have low efficiency in position numbers, mainly due to the problem of inconsistent formats due to manual operations.
The functional position number to be regularized is obtained through electronic devices, a regular expression pattern is constructed to extract the sub-function position number, and the regular position number is determined according to the writing rules, including filling in the missing and removing redundant parts.
It improves the regular efficiency of functional position numbers, which is faster and more accurate than manual operation.
Smart Images

Figure CN119226577A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of data processing technology, and in particular, relates to a method, device, electronic device and storage medium for regularizing function location numbers. Background Art
[0002] The function location number is an identification symbol for the internal equipment of a nuclear power plant, and is used to uniquely identify the internal equipment of a nuclear power plant. In actual applications, when entering the function location number, the format of the entered function location number may be inconsistent due to various factors. This requires regularizing the function location number to unify the format of each function location number.
[0003] Currently, the function location numbers are usually regularized manually, so the existing regularization efficiency of the function location numbers is low. Summary of the invention
[0004] In view of this, an embodiment of the present application provides a method, device, electronic device and storage medium for regularizing function location numbers to solve the technical problem of low efficiency in the existing regularization of function location numbers.
[0005] In a first aspect, the present application provides a method for regularizing a function position number, comprising:
[0006] Get the target function position number to be regulated;
[0007] For each field in the target function position number, a regular expression pattern corresponding to the field is constructed, and a character string extracted by the regular expression pattern is used as the sub-function position number corresponding to the field;
[0008] The regularized target function position number is determined according to the sub-function position number corresponding to each of the fields.
[0009] Optionally, determining the regularized target function position number according to the sub-function position numbers corresponding to the fields includes:
[0010] Obtaining a writing rule for the target function position number;
[0011] According to the writing rule, determining the arrangement order of the sub-function position numbers corresponding to each of the fields;
[0012] According to the arrangement order, the sub-function position numbers corresponding to the various fields are concatenated to obtain the regularized target function position number.
[0013] Optionally, also include:
[0014] For each field in the target function position number, if the number of character strings extracted by the regular expression pattern corresponding to the field is 0, a first preset prompt is obtained as the sub-function position number corresponding to the field.
[0015] Optionally, after determining the regularized target function position number according to the sub-function position number corresponding to each of the fields, the method further includes:
[0016] Get the first information input by the user to fill in the string;
[0017] The first preset prompt contained in the regularized target function position number is replaced with the first information filling character string.
[0018] Optionally, also include:
[0019] For each field in the function position number, if the number of character strings extracted by the regular expression pattern corresponding to the field exceeds one, a second preset prompt is obtained as the sub-function position number corresponding to the field.
[0020] Optionally, after determining the regularized target function position number according to the sub-function position number corresponding to each of the fields, the method further includes:
[0021] Get the second information input by the user to fill in the string;
[0022] The second preset prompt contained in the regularized target function position number is replaced with the second information filling character string.
[0023] Optionally, constructing a regular expression pattern corresponding to the field includes:
[0024] Obtaining a writing rule for the target function position number;
[0025] According to the writing rules, a regular expression pattern corresponding to the field is constructed.
[0026] In a second aspect, the present application provides a device for regularizing function position numbers, including:
[0027] An acquisition unit, used for acquiring a target functional position number to be regularized;
[0028] An extraction unit, for constructing a regular expression pattern corresponding to each field in the target function position number, and using a character string extracted by the regular expression pattern as a sub-function position number corresponding to the field;
[0029] A determination unit is used to determine the regularized target function position number according to the sub-function position number corresponding to each of the fields.
[0030] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, each step in the method for regularizing functional position numbers as described in any one of the first aspects above is implemented.
[0031] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the method for regularizing the function position number as described in any one of the first aspects above are implemented.
[0032] In a fifth aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on a control device, the control device executes each step of the method for regularizing the function location number as described in any one of the first aspects above.
[0033] The method, device, electronic device and storage medium for regularizing function location numbers provided in the embodiments of the present application have the following beneficial effects:
[0034] In the function position number regularization method provided in the embodiment of the present application, the target function position number to be regularized is first obtained by an electronic device, and then for each field in the target function position number, a regular expression pattern corresponding to the field is constructed, and the string extracted by the regular expression pattern is used as the sub-function position number corresponding to the field, and finally the regularized target function position number is determined according to the sub-function position number corresponding to each field. The function position number regularization method provided in the present application can regularize the function position number by an electronic device. Compared with the method of regularizing the function position number manually, the function position number regularization method provided in the present application improves the regularization efficiency of the function position number. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0036] Figure 1 A flowchart of a method for regularizing a function position number provided in an embodiment of the present application;
[0037] Figure 2 A schematic diagram of the structure of a device for regularizing function position numbers provided in an embodiment of the present application;
[0038] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0039] It should be noted that the terms used in the embodiments of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application. In the description of the embodiments of the present application, unless otherwise specified, "multiple" refers to two or more than two, and "at least one", "one or more" refers to one, two or more. The terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, it is defined that the "first" and "second" features can explicitly or implicitly include one or more of the features.
[0040] References to "one embodiment" or "some embodiments" etc. described in this specification mean that a particular feature, structure or characteristic described in conjunction with the embodiment is included in one or more embodiments of the present application. Thus, the phrases "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear at different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0041] The functional location number is an identification symbol for internal equipment of a nuclear power plant. It is used to uniquely identify the internal equipment of a nuclear power plant and can describe the function and location of the internal equipment of the nuclear power plant.
[0042] The function position number may include multiple fields, each of which may correspond to a sub-function position number. The function position number has specific writing rules, which may include the number of sub-function position numbers, the writing rules of each sub-function position number, and the arrangement order between the sub-function position numbers.
[0043] An example of a function location number is given below. Please refer to Table 1. Table 1 is an example table of writing rules for a function location number provided in an embodiment of the present application.
[0044] Table 1
[0045]
[0046] In this example, the first field is used to describe the power plant number of the device, and the power plant number is represented by a single English character; the second field is used to describe the unit number of the device, and the unit number is represented by a single Arabic numeral; the third field is used to describe the system number of the device, and the system number is represented by a combination of three English characters; the fourth field is used to describe the device serial number of the device, and the device serial number is represented by three or four Arabic numerals; the fifth field is used to describe the device type number of the device, and the device type number is represented by a combination of two English characters, or a combination of two English characters and one English character or a special symbol (-).
[0047] In addition, there are redundant characters between the fields to separate them.
[0048] In actual applications, although the writing rules of the function location numbers of various devices are unified, when entering the function location numbers, the format of the entered function location numbers may be inconsistent due to various factors, such as inconsistent redundant characters between fields, or some entered function location numbers are missing a sub-function location number, or some entered function location numbers have a sub-function location number entered repeatedly.
[0049] For example, please refer to Table 2, which provides some examples of function location numbers according to an embodiment of the present application.
[0050] Table 2 Functional position number examples
[0051]
[0052] It can be seen that even though the writing rules of the various functional position numbers in Table 2 are unified, the formats of the entered functional position numbers may be inconsistent. For example, the redundant characters of the various functional position numbers may not be unified. For example, the redundant character of the functional position number "HY-2-03-RCV-002VP" is "-", while the functional position number "CET1051VV" has no redundant characters; and among the entered functional position numbers, there is a functional position number that is missing a sub-functional position number, such as the functional position number "CET1051VV" is missing the sub-functional position number used to describe the power plant number and the sub-functional position number used to describe the unit number.
[0053] The prior art usually regularizes the function position numbers manually (ie, unifies the formats of the function position numbers), so the efficiency of the prior art regularization of the function position numbers is low.
[0054] Based on this, an embodiment of the present application provides a method for regularizing function position numbers to improve the regularization efficiency of function position numbers.
[0055] The executor of the method for regularizing function location numbers provided in the embodiment of the present application may be an electronic device. Specifically, the electronic device may include a function location number regularization device and a terminal device, wherein the terminal device may include but is not limited to a mobile phone, a tablet computer, a laptop computer, a desktop computer, etc.
[0056] See also Figure 1 , Figure 1 The present invention provides a flowchart of a method for regularizing a function position number according to an embodiment of the present invention. The method for regularizing a function position number may include S101 to S103, which are described in detail as follows:
[0057] In S101, the target functional position number to be regularized is obtained.
[0058] In an embodiment of the present application, a user may input the target function position number to be regularized into an electronic device, so that the electronic device may obtain the target function position number to be regularized.
[0059] In actual applications, there may be spaces in the target function position number to be regularized. If these spaces exist in a sub-function position number, they may affect the subsequent process of extracting the sub-function position numbers corresponding to each field in the target function position number.
[0060] For example, a sub-function position number in a target function position number to be regularized is composed of a combination of three English characters. If there are extra spaces in the sub-function position number, such as "AB C", the sub-function position number will not be extracted subsequently. Therefore, after obtaining the target function position number to be regularized, before step S102, the electronic device can delete the spaces in the target function position number to be regularized.
[0061] In S102 , for each field in the target function position number, a regular expression pattern corresponding to the field is constructed, and a character string extracted by the regular expression pattern is used as the sub-function position number corresponding to the field.
[0062] In the embodiment of the present application, after obtaining the target function position number to be regularized, the electronic device can construct a regular expression pattern corresponding to each field in the target function position number to be regularized. That is, the electronic device can construct a regular expression pattern corresponding to each field in the target function position number.
[0063] In a possible implementation, when constructing a regular expression pattern corresponding to a field, the electronic device may first obtain a writing rule for the target function position number to be regularized, and then construct a regular expression pattern corresponding to the field according to the writing rule.
[0064] Specifically, the electronic device can determine the writing rules of the sub-function position number of the field according to the writing rules of the target function position number to be regularized, and then determine the regular expression pattern corresponding to the field according to the writing rules of the sub-function position number of the field.
[0065] The regular expression pattern may be used to extract a character string corresponding to the regular expression pattern.
[0066] Taking the first sub-segment in Table 1 as an example, the writing rule of the sub-function position number of this field is a single English character. Therefore, the regular expression pattern corresponding to this field can be used to extract a string of a single English character.
[0067] Taking the second sub-segment in Table 1 as an example, the writing rule of the sub-function position number of this field is a single Arabic numeral. Therefore, the regular expression pattern corresponding to this field can be used to extract a character string of a single Arabic numeral.
[0068] Taking the third sub-segment in Table 1 as an example, the writing rule of the sub-function position number of this field is a combination of three English characters. Therefore, the regular expression pattern corresponding to this field can be used to extract a character string that is a combination of three English characters.
[0069] Taking the fourth sub-segment in Table 1 as an example, the writing rule of the sub-function position number of this field is a combination of three Arabic numerals or four Arabic numerals. Therefore, the regular expression pattern corresponding to this field can be used to extract a character string that is a combination of three Arabic numerals or four Arabic numerals.
[0070] Taking the fifth sub-segment in Table 1 as an example, the writing rule of the sub-function position number of this field is a combination of two English characters or a combination of two English characters and one English character or a special symbol. Therefore, the regular expression pattern corresponding to this field can be used to extract a character string that is a combination of two English characters or a combination of two English characters and one English character or a special symbol.
[0071] By the above method, a regular expression pattern corresponding to each field of the function location number can be constructed. It should be noted that the above is only an example of constructing a regular expression pattern and not a limitation. Different writing rules of the function location number will also result in different regular expression patterns.
[0072] After constructing a regular expression pattern corresponding to a field, the corresponding string can be extracted through the regular expression pattern corresponding to the field as the sub-function position number corresponding to the field.
[0073] For example, the target function location number to be regularized can be "D-3-ASG-001-BA", and the writing rule of the first field of the target function location number is a single English character. Therefore, the regular expression pattern corresponding to the first field of the target function location number can extract the corresponding string "D", so the string "D" can be used as the sub-function location number corresponding to the first field of the target function location number.
[0074] For example, the target function location number to be regularized can be "D-3-ASG-001-BA", and the writing rule of the second field of the target function location number is a single Arabic numeral. Therefore, the regular expression pattern corresponding to the second field of the target function location number can extract the corresponding string "3", so the string "3" can be used as the sub-function location number corresponding to the second field of the target function location number.
[0075] By analogy, the character string "ASG" can be used as the sub-function position number corresponding to the third field of the target function position number; the character string "001" can be used as the sub-function position number corresponding to the fourth field of the target function position number; and the character string "BA" can be used as the sub-function position number corresponding to the fifth field of the target function position number.
[0076] In actual applications, since a sub-function location number may be missing in some function location numbers, the number of strings extracted by the regular expression pattern corresponding to a field of the target function location number may be 0 (ie, the corresponding string cannot be extracted).
[0077] Based on this, for each field in the target function position number, if the number of strings extracted by the regular expression pattern corresponding to the field is 0, the first preset prompt is obtained as the sub-function position number corresponding to the field. The first preset prompt can be used to indicate that the sub-function position number corresponding to the field is missing.
[0078] In actual applications, since some functional location numbers may contain a redundant sub-functional location number, the number of strings extracted by the regular expression pattern corresponding to a field of the target functional location number may exceed one (that is, multiple corresponding strings are extracted).
[0079] Based on this, for each field in the target function position number, if the number of character strings extracted by the regular expression pattern corresponding to the field exceeds one, a second preset prompt is obtained as the sub-function position number corresponding to the field. The second preset prompt can be used to indicate that the sub-function position number corresponding to the field is redundant.
[0080] If the multiple extracted character strings are identical, in addition to obtaining the second preset prompt as the sub-function position number corresponding to the field, the electronic device may also merge the multiple extracted identical character strings into one character string.
[0081] In S103, the regularized target function position number is determined according to the sub-function position number corresponding to each field.
[0082] In an embodiment of the present application, after the electronic device extracts the sub-function position numbers corresponding to each field of the target function position number, it can determine the regularized target function position number based on the sub-function position numbers corresponding to each field.
[0083] In one possible implementation, the electronic device may first obtain the writing rules of the target function position number, then determine the arrangement order of the sub-function position numbers corresponding to each field according to the writing rules of the target function position number, and finally, according to the arrangement order of the sub-function position numbers corresponding to each field, splice the sub-function position numbers corresponding to each field to obtain a regularized target function position number.
[0084] Exemplarily, the target function position number to be regularized may be "D-3-ASG-001-BA", based on which, the sub-function position numbers corresponding to the extracted fields may be "D", "3", "ASG", "001", and "BA", respectively, and the arrangement order of the sub-function position numbers determined according to the writing rules of the target function position number may be "D", "3", "ASG", "001", and "BA" respectively. Therefore, the regularized target function position number obtained after splicing may be "D3ASG001BA".
[0085] In one possible implementation, if the regularized target function position number contains a first preset prompt, that is, a sub-function position number is missing, the electronic device can obtain a first information filling string input by the user. After obtaining the first information filling string input by the user, the electronic device can replace the first preset prompt contained in the regularized target function position number with the first information filling string, thereby filling the missing sub-function position number.
[0086] In one possible implementation, if the regularized target function position number includes a second preset prompt, that is, a sub-function position number is redundant, the electronic device can obtain a second information filling string input by the user. After obtaining the second information filling string input by the user, the electronic device can replace the second preset prompt included in the regularized target function position number with the second information filling string, thereby achieving the deletion of redundant sub-function position numbers.
[0087] In another embodiment, when extracting the sub-function position number corresponding to each field, if the number of strings extracted by the regular expression pattern corresponding to the field is 0, the first preset prompt may not be obtained as the sub-function position number corresponding to the field. Similarly, if the number of strings extracted by the regular expression pattern corresponding to the field exceeds 1, the second preset prompt may not be obtained as the sub-function position number corresponding to the field. After determining the regularized target function position number, the regular expression verification pattern may be used to verify the regularized target function position number to determine whether a sub-function position number is missing or there are redundant sub-function position numbers in the regularized target function position number.
[0088] In this embodiment, if after checking the regularized target function position number, it is determined that a sub-function position number is missing in the regularized target function position number, the electronic device can obtain the first preset prompt as the sub-function position number corresponding to the field where the sub-function position number is missing. Similarly, if after checking the regularized target function position number, it is determined that there are redundant sub-function position numbers in the regularized target function position number, the electronic device can obtain the second preset prompt as the sub-function position number corresponding to the field where the redundant sub-function position number exists.
[0089] In this embodiment, the regular expression verification pattern can be obtained by combining the regular expression patterns corresponding to each field in the target function position number. Specifically, the regular expression verification pattern can be obtained by arranging the regular expression patterns corresponding to each field in the target function position number according to the arrangement order of each sub-function position number in the target function position number.
[0090] From the above, it can be seen that in the function position number regularization method provided in the embodiment of the present application, the target function position number to be regularized is first obtained by an electronic device, and then for each field in the target function position number, a regular expression pattern corresponding to the field is constructed, and the string extracted by the regular expression pattern is used as the sub-function position number corresponding to the field, and finally the regularized target function position number is determined according to the sub-function position number corresponding to each field. The function position number regularization method provided in the present application can regularize the function position number by an electronic device. Compared with the method of regularizing the function position number manually, the function position number regularization method provided in the present application improves the regularization efficiency of the function position number.
[0091] Based on the method for regularizing the function position number provided in the above embodiment, the present application further provides a device for regularizing the function position number to implement the above method embodiment, please refer to Figure 2 , Figure 2 This is a schematic diagram of the structure of a device for regularizing function position numbers provided in an embodiment of the present application. Figure 2 As shown, the functional location number regularization device 20 may include an acquisition unit 21, an extraction unit 22, and a determination unit 23. Among them:
[0092] The acquisition unit 21 is used to acquire the target functional position number to be regularized.
[0093] The extraction unit 22 is used to construct a regular expression pattern corresponding to each field in the target function position number, and use the character string extracted by the regular expression pattern as the sub-function position number corresponding to the field.
[0094] The determining unit 23 is used to determine the regularized target function position number according to the sub-function position number corresponding to each of the fields.
[0095] Optionally, the determining unit 23 is specifically configured to:
[0096] Obtaining a writing rule for the target function position number;
[0097] According to the writing rule, determining the arrangement order of the sub-function position numbers corresponding to each of the fields;
[0098] According to the arrangement order, the sub-function position numbers corresponding to the various fields are concatenated to obtain the regularized target function position number.
[0099] Optionally, the extraction unit 22 is further configured to:
[0100] For each field in the target function position number, if the number of character strings extracted by the regular expression pattern corresponding to the field is 0, a first preset prompt is obtained as the sub-function position number corresponding to the field.
[0101] Optionally, the functional position number regularization device 20 may further include a replacement unit, wherein:
[0102] The replacement unit is specifically used to: obtain the first information input by the user to fill in the character string;
[0103] The first preset prompt contained in the regularized target function position number is replaced with the first information filling character string.
[0104] Optionally, the extraction unit 22 is further configured to:
[0105] For each field in the function position number, if the number of character strings extracted by the regular expression pattern corresponding to the field exceeds one, a second preset prompt is obtained as the sub-function position number corresponding to the field.
[0106] Optionally, the replacement unit is further used for:
[0107] Get the second information input by the user to fill in the string;
[0108] The second preset prompt contained in the regularized target function position number is replaced with the second information filling character string.
[0109] Optionally, the extraction unit 22 is specifically used for:
[0110] Obtaining a writing rule for the target function position number;
[0111] According to the writing rules, a regular expression pattern corresponding to the field is constructed.
[0112] It should be noted that the information interaction, execution process and other contents between the above-mentioned units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be specifically referred to the method embodiment part and will not be repeated here.
[0113] See also Figure 3 , Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 3 As shown, the electronic device 3 provided in this embodiment may include: a processor 30, a memory 31, and a computer program 32 stored in the memory 31 and executable on the processor 30. For example, a program corresponding to a method for obtaining a dynamic constitutive relationship of a material. When the processor 30 executes the computer program 32, the steps in the above-mentioned embodiment of the regularization method for function position numbers are implemented, for example Figure 1 Alternatively, when the processor 30 executes the computer program 32, the functions of each module / unit in the embodiment corresponding to the electronic device 3 are realized, for example Figure 2 The functions of the units 21 to 23 are shown.
[0114] Exemplarily, the computer program 32 may be divided into one or more modules / units, one or more modules / units are stored in the memory 31 and executed by the processor 30 to complete the present application. One or more modules / units may be a series of computer program instruction segments that can complete specific functions, and the instruction segments are used to describe the execution process of the computer program 32 in the electronic device 3. For example, the computer program 32 may be divided into an acquisition unit, an extraction unit, and a determination unit. The specific functions of each unit can be found in Figure 2 The relevant descriptions in the corresponding embodiments are not repeated here.
[0115] Those skilled in the art will understand that Figure 3This is only an example of the electronic device 3 and does not constitute a limitation on the electronic device 3 , which may include more or less components than those shown in the figure, or a combination of certain components, or different components.
[0116] The processor 30 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.
[0117] The memory 31 may be an internal storage unit of the electronic device 3, such as a hard disk or memory of the electronic device 3. The memory 31 may also be an external storage device of the electronic device 3, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, or a flash card, etc., equipped on the electronic device 3. Further, the memory 31 may also include both an internal storage unit and an external storage device of the electronic device 3. The memory 31 is used to store computer programs and other programs and data required by the electronic device. The memory 31 may also be used to temporarily store data that has been output or is to be output.
[0118] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units is used as an example for illustration. In actual applications, the above-mentioned function allocation can be completed by different functional units as needed, that is, the internal structure of the device for regularizing the functional position number is divided into different functional units to complete all or part of the functions described above. The functional units in the embodiment can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0119] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0120] An embodiment of the present application provides a computer program product. When the computer program product is executed on a terminal device, the terminal device implements the steps in the above-mentioned various method embodiments.
[0121] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0122] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0123] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A method for regularizing a functional position number, characterized in that: include: Get the target function position number to be regulated; For each field in the target function position number, a regular expression pattern corresponding to the field is constructed, and a character string extracted by the regular expression pattern is used as the sub-function position number corresponding to the field; The regularized target function position number is determined according to the sub-function position number corresponding to each of the fields.
2. The method according to claim 1, characterized in that The step of determining the regularized target function position number according to the sub-function position number corresponding to each of the fields includes: Obtaining a writing rule for the target function position number; According to the writing rule, determining the arrangement order of the sub-function position numbers corresponding to each of the fields; According to the arrangement order, the sub-function position numbers corresponding to the various fields are concatenated to obtain the regularized target function position number.
3. The method according to claim 2, characterized in that Also includes: For each field in the target function position number, if the number of character strings extracted by the regular expression pattern corresponding to the field is 0, a first preset prompt is obtained as the sub-function position number corresponding to the field.
4. The method according to claim 3, characterized in that After determining the regularized target function position number according to the sub-function position number corresponding to each of the fields, the method further includes: Get the first information input by the user to fill in the string; The first preset prompt contained in the regularized target function position number is replaced with the first information filling character string.
5. The method according to claim 2, characterized in that: Also includes: For each field in the function position number, if the number of character strings extracted by the regular expression pattern corresponding to the field exceeds one, a second preset prompt is obtained as the sub-function position number corresponding to the field.
6. The method according to claim 5, characterized in that After determining the regularized target function position number according to the sub-function position number corresponding to each of the fields, the method further includes: Get the second information input by the user to fill in the string; The second preset prompt contained in the regularized target function position number is replaced with the second information filling character string.
7. The method according to any one of claims 1 to 6, characterized in that: The constructing of the regular expression pattern corresponding to the field includes: Obtaining a writing rule for the target function position number; According to the writing rules, a regular expression pattern corresponding to the field is constructed.
8. A device for regularizing function position numbers, characterized in that: include: An acquisition unit, used for acquiring a target functional position number to be regularized; An extraction unit, for constructing a regular expression pattern corresponding to each field in the target function position number, and using a character string extracted by the regular expression pattern as a sub-function position number corresponding to the field; A determination unit is used to determine the regularized target function position number according to the sub-function position number corresponding to each of the fields.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the processor implements the steps in the method for regularizing the function position number as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method for regularizing the function position number as claimed in any one of claims 1 to 7 are implemented.
