CN112541005A - Number generation method and device and electronic equipment - Google Patents

Number generation method and device and electronic equipment Download PDF

Info

Publication number
CN112541005A
CN112541005A CN201910899347.7A CN201910899347A CN112541005A CN 112541005 A CN112541005 A CN 112541005A CN 201910899347 A CN201910899347 A CN 201910899347A CN 112541005 A CN112541005 A CN 112541005A
Authority
CN
China
Prior art keywords
numbering
rule
sub
rules
configuration information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910899347.7A
Other languages
Chinese (zh)
Inventor
冉守旭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN201910899347.7A priority Critical patent/CN112541005A/en
Publication of CN112541005A publication Critical patent/CN112541005A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24564Applying rules; Deductive queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/90335Query processing
    • G06F16/90344Query processing by using string matching techniques

Abstract

The invention discloses a number generation method, a device, a storage medium and electronic equipment. The number rules are determined through the number rule list configured with the number rules, and the corresponding sub-rules are determined, so that the number rules configured in the application are multiple, the sub-rules are multiple, the number generation method can meet different number rules, the running program of the number generation method is not required to be modified after the number rules are changed, and the operation and maintenance cost of the program is reduced.

Description

Number generation method and device and electronic equipment
Technical Field
The invention relates to the technical field of information processing, in particular to a number generation method and device and electronic equipment.
Background
At present, numbers are often used in units of various industries, and the types of the numbers are also various, such as: official document number, certificate label, notice serial number, case number, order number and the like. Each type of number corresponds to one or more numbering rules, and new numbers need to be generated according to the numbering rules.
In the prior art, if the numbering rules are changed, the corresponding rule codes need to be modified, so that the maintenance cost of the automatic numbering system is high.
Disclosure of Invention
In view of the above, the present invention provides a number generation method, apparatus and electronic device that overcome the above problems or at least partially solve the above problems.
In a first aspect, an embodiment of the present application provides a number generation method, where the method includes:
inquiring in a numbering rule list according to configuration information to obtain a numbering rule matched with the configuration information, wherein the numbering rule list comprises at least one numbering rule;
acquiring sub-rules in the numbering rules;
determining the numbering sequence of each sub-rule;
and numbering the configuration information according to the sub-rules and the numbering sequence to obtain a target number.
In some embodiments, the querying in the numbering rule list according to the configuration information to obtain the numbering rule matching with the configuration information includes:
acquiring configuration information, analyzing the configuration information and acquiring a target query field;
and querying the numbering rule list according to the target query field to obtain a numbering rule matched with the configuration information, wherein the numbering rule list comprises at least one numbering rule.
In some embodiments, the obtaining the configuration information and analyzing the configuration information to obtain the target query field includes:
acquiring configuration information, and analyzing the configuration information to obtain public security document number format data, wherein the public security document number format data comprises one or more of a case type field, an organization code field and a document number field;
and determining a target query field in the public security document number format data.
In some embodiments, the target number represents a document number of a public security document, wherein the numbering the configuration information according to the sub-rule and the numbering sequence to obtain the target number includes:
determining the number sequence of the output characters corresponding to the sub-rules in the official document number according to the sub-rules and the numbering sequence;
and sequencing the output characters corresponding to the sub-rules according to the sequence of the document numbers to obtain the document numbers of the public security documents.
In some embodiments, the obtaining of the sub-rule of the numbering rules comprises:
acquiring an initial sub-rule of the numbering rule;
determining the sequence order of the initial sub-rule according to configuration information;
and judging whether the same sequence order bit corresponds to a plurality of initial sub-rules, if so, determining the sub-rules on the sequence order bit according to the priority of the initial sub-rules, so that each sequence order bit corresponds to a unique sub-rule.
In some embodiments, the method further comprises:
if the numbering is carried out according to the target sub-rule, and the numbering information cannot be output, judging whether a candidate sub-rule exists in the sequence order corresponding to the target sub-rule, and if so, determining the candidate sub-rule as the target sub-rule of the sequence order.
In some embodiments, the numbering the configuration information according to the sub-rule and the numbering sequence to obtain a target number includes:
determining the number type of each sub-rule;
generating numbering sub-information according to the numbering type;
and sequencing the numbering sub-information according to the numbering sequence to obtain a target number.
In some embodiments, the number type includes one or more of a dictionary type, a date type, a production serial number type, or a fixed value.
In a second aspect, an embodiment of the present application provides an apparatus for generating a number, where the apparatus includes:
the inquiry unit is used for inquiring in a numbering rule list according to the configuration information to obtain a numbering rule matched with the configuration information, wherein the numbering rule list comprises at least one numbering rule;
an obtaining unit, configured to obtain a sub-rule in the numbering rule;
a determining unit, configured to determine a numbering order of each of the sub-rules;
and the numbering unit is used for numbering the configuration information according to the sub-rules and the numbering sequence to obtain a target number.
In a third aspect, an embodiment of the present application provides an electronic device, where the electronic device includes at least one processor, and at least one memory and a bus connected to the processor; the processor and the memory complete mutual communication through the bus; the processor is configured to call program instructions in the memory to perform the number generation method as described in any implementation manner of the first aspect.
By means of the technical scheme, the number generation method, the number generation device and the electronic equipment provided by the invention can acquire the number rule in the number rule list according to the configuration information, determine the sub-rule and the number sequence of the sub-rule according to the number rule, and finally perform number processing on the configuration information to acquire the target number. The number rules are determined through the number rule list configured with the number rules, and the corresponding sub-rules are determined, so that the number rules configured in the application are multiple, the sub-rules are multiple, the number generation method can meet different number rules, the running program of the number generation method is not required to be modified after the number rules are changed, and the operation and maintenance cost of the program is reduced.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 is a flowchart illustrating an embodiment of a number generation method provided in an embodiment of the present application;
FIG. 2 is a flow diagram illustrating one embodiment of a method for determining sub-rules provided by an embodiment of the present application;
fig. 3 is a schematic structural diagram illustrating an embodiment of a number generation apparatus provided in an embodiment of the present application;
FIG. 4 is a schematic block diagram of an electronic device suitable for use in implementing some embodiments of the present application.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
The numbers in the embodiments of the present application include various types, for example, document numbers, order numbers, intra-enterprise document numbers, device numbers, and the like. Referring to fig. 1, a method for generating a number provided by an embodiment of the present application is shown, where the method may be applied to a numbering server to perform automatic numbering, and specifically the method may include the following steps:
s101, inquiring in a numbering rule list according to configuration information to obtain a numbering rule matched with the configuration information.
The configuration information represents numbering requirement information of the numbers to be generated, and can include basic information such as numbering types, numbering requirements and numbering lengths. In the application, a numbering rule list is created in advance, at least one numbering rule is stored in the numbering rule list, and the numbering rules in the numbering rule list meet various numbering types, such as document numbers, order numbers, equipment numbers and the like. When the method is applied to the server, the server receives corresponding configuration information, then queries in the numbering rule list according to the configuration information, and obtains the numbering rule matched with the configuration information. Specifically, for example, if the configuration information includes a numbering type as an order number, the corresponding matching numbering rule is a rule belonging to the order number.
And S102, acquiring sub-rules in the numbering rules.
After the numbering rule is determined, the numbering rule is also required to be analyzed, and a corresponding sub-rule is obtained. The sub-rules corresponding to the fields can be obtained by analyzing the fields of the numbering rule, for example, if the numbering rule of a certain order number includes a time field, an equipment field, a location field, and the like, and if the sub-rules in the numbering rule include a time rule, an equipment rule, a location rule, and the like, then when the order number, the order number needs to be numbered according to the sub-rules, so that the finally generated number can meet the requirement of the configuration information of the order.
S103, determining the numbering sequence of each sub-rule;
and S104, numbering the configuration information according to the sub-rules and the numbering sequence to obtain a target number.
After the numbering rule and the sub-rule corresponding to the numbering rule are determined, the numbering sequence of each sub-rule needs to be determined. Since the numbering rule includes a plurality of sub-rules, it is necessary to determine the order of the respective sub-rules in the finally generated number, i.e. reflecting the position order of the number field corresponding to the sub-rule in the generated number. For example, the time field corresponding to the time rule is placed at the second position in the number, or the order type field is placed at the first position in the number.
After the order of the rules and sub-rules is determined, the configuration information may be numbered to obtain a final target number.
When the server executes the method for generating the numbers, the generation of various types of numbers can be completed only by one set of program codes, and in the prior art, one set of code programs usually embodies one numbering rule, when the numbering rule is changed, the corresponding numbering rule needs to be called by switching threads, and when the numbering rule changes, the corresponding code program needs to be changed, so that the numbering progress is influenced conveniently, on the other hand, the workload of developers can be increased, and the maintenance cost is increased. The number rules are determined through the number rule list configured with the number rules, and the corresponding sub-rules are determined, so that the number rules configured in the application are multiple, the sub-rules are multiple, the number generation method can meet different number rules, the running program of the number generation method is not required to be modified after the number rules are changed, and the operation and maintenance cost of the program is reduced.
In another embodiment of the present application, a numbering rule matching method is further provided, including:
s201, obtaining configuration information, analyzing the configuration information, and obtaining a target query field;
s202, inquiring the numbering rule list according to the target inquiry field to obtain the numbering rule matched with the configuration information.
Firstly, the configuration information needs to be analyzed to obtain a target query field, for example, the provided configuration information is a document type number, the configuration information needs to be analyzed to obtain a document type field, a corresponding numbering rule is matched according to the document type field, it needs to be noted that the numbering rule is used if only one of the matched numbering rules exists, if a plurality of the matched numbering rules exist, the target numbering rule can be determined by matching through other analysis obtaining fields, the target numbering rule can also be determined according to a preferential use sequence of the numbering rule, or the target numbering rule is determined according to the specific rule designated information screened by a user.
There is also provided in an embodiment of the present application a method of determining a sub-rule, which may include the steps of, referring to fig. 2:
s301, acquiring an initial sub-rule of the numbering rule;
s302, determining the sequence order of the initial sub-rule according to configuration information;
s303, judging whether the same sequence order corresponds to a plurality of initial sub-rules, if so, executing S304;
s302, determining sub-rules on the sequence positions according to the priority of the initial sub-rules, so that each sequence position corresponds to a unique sub-rule.
Since each sub-rule in the finally generated target number is ordered, it should be noted that there may be a plurality of word rules corresponding to a certain sequence bit, and it is necessary to ensure that each sequence bit has only one sub-rule. The sub-rule of the corresponding sequential order bit needs to be determined according to the priority of the sub-rule. The priority may be set according to the use frequency of the sub-rules, or may be set according to the number type, for example, there are three sub-rules representing time numbering manners, where the time representing manner of each sub-rule is different, and the sub-rules that need to be used need to be determined according to the priority order of the sub-rule.
It should be noted that, if the number cannot be output when the number is performed according to the selected target sub-rule, it is determined whether a candidate sub-rule exists in the sequence order corresponding to the target sub-rule, and if so, the candidate sub-rule is determined as the target sub-rule of the sequence order. Wherein the candidate sub-rule is derived from a sub-rule which is located in the same order as the target sub-rule and has a different priority.
In another embodiment of the present application, a numbering process method is further provided, and the method may include the following steps:
s401, determining the number type of each sub-rule;
s402, generating numbering sub-information according to the numbering type;
and S403, sequencing the numbering sub-information according to the numbering sequence to obtain a target number.
The number type comprises one or more of a dictionary type, a date type, a production sequence number type or a fixed value.
Because of different types and different processing modes for generating symbols, each word sub-rule generally corresponds to one or more types, numbering is carried out according to the types to obtain numbering sub-information, and then the numbering sub-information is arranged according to the numbering sequence corresponding to the determined sub-rule to obtain a target number.
At present, the numbering is carried out by using a numbering generation method in many scenes, such as order numbering, logistics numbering, file numbering and special legal document numbering. The following description will be given taking the number of the official document as an example.
In the context of the number of the public security document, the configuration information is information generated according to the request of the number of the public security document, that is, the configuration information can embody the type information, the format information, some required information needing to be numbered, and the like of the generated document.
At this time, the configuration information is obtained and analyzed to obtain the public security document number format data, wherein the public security document number format data includes but is not limited to one or more of case type field, organization structure code field and document number field. The public security document number information may be determined based on the actual request information. The specific case type field can represent the case type corresponding to the public security document, such as an administrative case or a criminal case; the organization structure code field can represent the organization structure information for generating the public security document; the document number field can represent the required information of the document number, such as the format of a character string.
And then, determining a target query field in the data in the numbering format of the public security documents, wherein the target query field is used for querying the numbering rules stored in the numbering rule list, and the specific target query field can be all data in the numbering format of the public security documents or part of data in the numbering format of the public security documents which is most representative and can be used as identification information for querying.
After the sub-rules of the numbering rule are determined, the numbering sequence of each sub-rule needs to be determined, so that the sequence position of the output character corresponding to the sub-rule in the final number can be determined according to the numbering sub-rule and the numbering sequence. Still taking the number of the public security document as an example, the correspondingly generated target number is the number of the public security document. Determining the number sequence of the output characters corresponding to the sub-rules in the official document number according to the sub-rules and the numbering sequence; and sequencing the output characters corresponding to the sub-rules according to the sequence of the document numbers to obtain the document numbers of the public security documents.
For example, for a dictionary type, a dictionary type name (e.g., abbreviated as text) and a check field name (e.g., text number) are configured in such a rule, and a corresponding dictionary list (i.e., sub-rule) is obtained from the configuration list according to the dictionary type name, for example, one of the following items is: (abbreviation for text) number of the text: XZ-SADJB-docket word, each datum in the dictionary entry is (a) B: the dictionary type name is A, the check field name is B, the C is data analyzed according to the configuration information, and the D is a character to be output finally.
Taking the type of the number of the public security document as an example, the method for processing the number of the type includes firstly searching the detail meeting the requirement (A), such as B: C-D (for short), then comparing B: C, and firstly preferentially processing and analyzing data in the format of X: Y, then searching the data of X: Y in the format of B: C, and finally obtaining the value D, namely the character to be output by the rule detail. For example: and finally, the finally output character is the 'subject case character', whether an expression is set or not is judged, if the expression is set, the expression is (X), the X is replaced by the output 'subject case character', finally, the result is returned to be the (subject case character), and if the expression is set to be [ X ], the final output result is the [ subject case character ].
For the date type, the format (such as 2019) of the current server time in four-digit data of the year needs to be acquired, and the data is output as the character of the character number of the sequence bit, and whether the expression processing requirement exists is judged in the same way as the above.
For the production serial number type, the operation of serial number +1 is carried out according to the condition of the character string formed by the characters which are processed and generated, and the increased number is returned and output as the character number character of the sequence position.
And (4) regularly setting a fixed value, outputting the fixed value as the character number of the sequence bit, splicing the character numbers generated by the sequence bits after the circulation is finished, and returning to the final character number.
The following describes a method for generating a number provided in the present application, taking a document number for public security as an example.
Firstly, the configuration information provided by the preparation production document number is analyzed, if the provided configuration data is as follows:
documentCode:XZ-SADJB,casetype:201,departmentCode:12011152000
can be viewed as the format X: Y, X: Y
Analyzing the character strings of documentCode (document number) in the configuration data, such as (documentCode: XZ-SADJB), taking out the value XZ-SADJB behind ": and judging the documents belonging to the type of the case, such as XZ (administrative case) and XS (criminal case), according to the letter XZ in front of" - ".
Analyzing the string of casetype (case type) in the data as (case: 201), taking out the value 201 behind ": the different codes represent different case types, and the document numbers to be generated are different.
The character string of deparatentcode (organization code) in the data is parsed as (deparatentcode: 120111520000), and the following value 120111520000 is taken.
The data processed in the above data analysis is used in the following rule processing logic.
And forming a new XZ-SADJB:201 with the format of A: B by using the XZ-SADJB and the XZ-SADJB 201, then searching the new XZ-SADJB 201 in a set rule list, wherein the rule list is data in the format of A: B-C, and when the data completely conform to the A: B in the rule list, obtaining C (value-taking rule name, such as a rule generated by an administrative case document through a document number).
And searching out the detail of the rule meeting the condition from the configuration list by taking the value of the rule name. Each rule detail is composed of the following attributes: dictionary, date, production serial number, fixed value.
For example, if the rule detail filtered out is 6, the values of the sequence bits of the 6 rules may be 1, 2, 2, 3, 4, 5, for example, "jin" (middle) subject word [2019]1 "in this document number composition, jin" (middle) is a character with sequence bit 1 output, (middle) is a character with sequence bit 2 output, subject word is a character with sequence bit 3 output, [2019] is a character with sequence bit 4 output, and 1 is a character with sequence bit 5 output. In the six rules, there are two rules with order bit 2, so the setting of priority plays a role at this time, and finally, the rule is one rule for outputting the character with order bit 2.
When the same sequence bit occurs, the symbols are output from small to large according to the priority. According to the description of the example of the sequence bits, if two rules with sequence bits of 2 occur at the same time, the two rules are sorted from small to large according to the priority, the processing is performed according to the type after the sorting, if the character is output by the first rule, the character of the sequence bit is determined, the second rule with the sequence bit of 2 is not processed, if the character is not output by the first rule, the second rule is processed continuously, and the like.
Dictionary type name: when the rule detail type is dictionary type, the dictionary detail of compound dictionary type name is searched in the configuration list according to the dictionary type name. Each piece of data in the dictionary details is stored in (A) B: C-D format, and A represents the dictionary type name.
Default values are as follows: when the rule does not have the character meeting the condition, outputting the set character
If the symbol is set to "number", the character expression of "number" is finally output in the corresponding sequential bit: enriching the final output effect of characters
After all the rule detail processing is completed, the characters of all the sequence positions are finally spliced together, and the returned characters are the final document numbers.
In the application, the value logic of the priority of the same sequence bit, the value of the rule of the same sequence bit is taken according to the priority, if the first value is not taken, the value is carried out downwards, and if the first value is taken, the value is taken by the sequence bit; the data in the original X: Y format is processed and compared with the data in the format of A: B-C or (A) B: C-D in the configuration list, the value of the composite condition is returned, and finally the composite condition is output as the sequence bit character. The method can reduce the program development of the document number generation rule of each document, can meet the requirements of various document number generation through configuration rules, and can analyze and generate different document numbers according to different conditions.
With further reference to fig. 3, as an implementation of the method shown in some of the above figures, the present application provides an embodiment of a number generation apparatus, which corresponds to the embodiment of the method shown in fig. 1, and which is specifically applicable to various electronic devices.
As shown in fig. 3, the number generation device of the present embodiment includes:
the query unit 10 is configured to query a numbering rule list according to configuration information to obtain a numbering rule matching the configuration information, where the numbering rule list includes at least one numbering rule;
an obtaining unit 20, configured to obtain a sub-rule in the numbering rule;
a determining unit 30, configured to determine a numbering order of each of the sub-rules;
and a numbering unit 40, configured to number the configuration information according to the sub-rule and the numbering sequence, so as to obtain a target number.
The technical effects brought by the specific processing machines of the querying unit 10, the obtaining unit 20, the determining unit 30 and the numbering unit 40 in this embodiment can refer to the related descriptions of the embodiments of steps S101, S102, S103 and S104 in the corresponding embodiment of fig. 1, and are not described herein again.
In some optional implementation manners of this embodiment, the obtaining unit includes:
an obtaining subunit, configured to obtain an initial sub-rule of the numbering rule;
the sequence determining subunit is used for determining the sequence order of the initial sub-rule according to the configuration information;
and the judging subunit is used for judging whether the same sequence order corresponds to a plurality of initial sub-rules, and if so, determining the sub-rules on the sequence order according to the priority of the initial sub-rules so that each sequence order corresponds to a unique sub-rule.
In some optional implementation manners of this embodiment, if the configuration information in the query unit is information generated according to a public security document number request, the obtaining subunit is specifically configured to:
acquiring configuration information, and analyzing the configuration information to obtain public security document number format data, wherein the public security document number format data comprises one or more of a case type field, an organization code field and a document number field;
and determining a target query field in the public security document number format data.
In some optional implementations of this embodiment, the target number represents a public security document number, wherein the numbering unit is specifically configured to:
determining the number sequence of the output characters corresponding to the sub-rules in the official document number according to the sub-rules and the numbering sequence;
and sequencing the output characters corresponding to the sub-rules according to the sequence of the document numbers to obtain the document numbers of the public security documents.
In some optional implementations of this embodiment, the querying unit includes:
the analysis subunit is used for acquiring the configuration information and analyzing the configuration information to acquire a target query field;
and the inquiring subunit is used for inquiring the numbering rule list according to the target inquiring field to obtain the numbering rule matched with the configuration information, wherein the numbering rule list comprises at least one numbering rule.
In some optional implementations of this embodiment, the apparatus further includes:
and the replacing subunit is used for judging whether a candidate sub-rule exists in the sequence order bit corresponding to the target sub-rule or not if the numbering is carried out according to the target sub-rule and the numbering information cannot be output, and if so, determining the candidate sub-rule as the target sub-rule of the sequence order bit.
In some optional implementations of this embodiment, the numbering unit includes:
the type determining subunit is used for determining the number type of each sub-rule;
the information generation subunit is used for generating numbering sub-information according to the numbering type;
the numbering subunit is used for sequencing the numbering sub-information according to the numbering sequence to obtain a target number;
wherein the number type comprises one or more of a dictionary type, a date type, a production sequence number type or a fixed value.
It should be noted that the number generation device may be a chip, a component or a module, which may refer to a processor and a memory, and the query unit 10, the obtaining unit 20, the determining unit 30, the numbering unit 40, and the like are all stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more than one, and the operation and maintenance cost of the numbering system is reduced by adjusting the kernel parameters.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
The number generation device provided in the above embodiment of the present application may obtain the number rule in the number rule list according to the configuration information, determine the sub-rule and the number sequence of the sub-rule according to the number rule, and finally number the configuration information to obtain the target number. The number rules are determined through the number rule list configured with the number rules, and the corresponding sub-rules are determined, so that the number rules configured in the application are multiple, the sub-rules are multiple, the number generation method can meet different number rules, the running program of the number generation method is not required to be modified after the number rules are changed, and the operation and maintenance cost of the program is reduced.
Referring now to FIG. 4, shown is a schematic diagram of an electronic device 400 suitable for use in implementing some embodiments of the present application. The electronic device shown in fig. 4 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 4, the electronic device 400 may include a processor 401, a memory 402, a communication interface 403, an input unit 404, an output unit 405, and a communication bus 406. Wherein the processor 401 and the memory 402 are connected to each other by a communication bus 406. A communication interface 403, an input unit 404 and an output unit 405 are also connected to the communication bus 406.
The communication interface 403 may be an interface of a communication module, such as an interface of a GSM module. The communication interface 403 may be used to obtain the number request information transmitted by the a device, and the communication interface 403 is also used to transmit the generated target number to the a device.
In the embodiment of the present application, the processor 401 may be a Central Processing Unit (CPU), an application-specific integrated circuit (ASIC), a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic devices.
In one possible implementation, the memory 402 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a data query function, a numbering function, and the like), and the like; the storage data area may store data created according to the use of the computer, such as format data, rule data, and number data, etc.
Further, the memory 402 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device or other volatile solid state storage device.
The processor 401 may call a program stored in the memory 402, and in particular, the processor 401 may execute the numbering generation method shown in any one of the above embodiments of the operations performed by the server apparatus in fig. 1.
The memory 402 is used for storing one or more programs, the program may include program codes, the program codes include computer operation instructions, in this embodiment, the memory 402 stores at least the program for realizing the following functions:
inquiring in a numbering rule list according to configuration information to obtain a numbering rule matched with the configuration information, wherein the numbering rule list comprises at least one numbering rule;
acquiring sub-rules in the numbering rules;
determining the numbering sequence of each sub-rule;
and numbering the configuration information according to the sub-rules and the numbering sequence to obtain a target number.
The present application may further include an input unit 405, and the input unit 405 may include at least one of a touch sensing unit that senses a touch event on the touch display panel, a keyboard, a mouse, a camera, a microphone, and the like.
The output unit 404 may include: at least one of a display, a speaker, a vibration mechanism, a light, and the like. The display may comprise a display panel, such as a touch display panel or the like. In one possible case, the display panel may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. The vibration mechanism is operable to displace the electronic device 400, and in one possible implementation, the vibration mechanism includes a motor and an eccentric vibrator, and the motor drives the eccentric vibrator to rotate so as to generate vibration. The brightness and/or color of the lamp can be adjusted, in a possible implementation manner, different information can be embodied through at least one of the on-off, brightness and color of the lamp, for example, the alarm information can be embodied through red light emitted by the lamp.
Of course, the structure of the electronic device 400 shown in fig. 4 does not constitute a limitation of the electronic device in the embodiment of the present application, and in practical applications, the electronic device may include more or less components than those shown in fig. 4, or some components may be combined.
The present application provides a computer readable medium, on which a computer program is stored, wherein the program, when executed by a processor, implements the generation of the numbers described in the above method embodiments.
The embodiment of the present application provides a processor, which is configured to execute a program, where the program executes to generate the numbers described in the above method embodiments.
The present application also provides a computer program product which, when executed on a data processing apparatus, causes the data processing apparatus to implement the generation of the numbers described in the above method embodiments.
In addition, the electronic device, the processor, the computer-readable medium, or the computer program product provided in the foregoing embodiments of the present application may be all used for executing the corresponding method provided above, and therefore, the beneficial effects achieved by the electronic device, the processor, the computer-readable medium, or the computer program product may refer to the beneficial effects in the corresponding method provided above, and are not described herein again.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A method for generating a number, the method comprising:
inquiring in a numbering rule list according to configuration information to obtain a numbering rule matched with the configuration information, wherein the numbering rule list comprises at least one numbering rule;
acquiring sub-rules in the numbering rules;
determining the numbering sequence of each sub-rule;
and numbering the configuration information according to the sub-rules and the numbering sequence to obtain a target number.
2. The method of claim 1, wherein the querying in a numbering rule list according to the configuration information to obtain the numbering rule matching with the configuration information comprises:
acquiring configuration information, analyzing the configuration information and acquiring a target query field;
and querying the numbering rule list according to the target query field to obtain a numbering rule matched with the configuration information, wherein the numbering rule list comprises at least one numbering rule.
3. The method of claim 2, wherein the configuration information is information generated according to a request for a public security document number, and wherein obtaining the configuration information and parsing the configuration information to obtain a target query field comprises:
acquiring configuration information, and analyzing the configuration information to obtain public security document number format data, wherein the public security document number format data comprises one or more of a case type field, an organization code field and a document number field;
and determining a target query field in the public security document number format data.
4. The method of claim 3, wherein the target number represents a police document number, and wherein the numbering the configuration information according to the sub-rule and the numbering sequence to obtain the target number comprises:
determining the number sequence of the output characters corresponding to the sub-rules in the official document number according to the sub-rules and the numbering sequence;
and sequencing the output characters corresponding to the sub-rules according to the sequence of the document numbers to obtain the document numbers of the public security documents.
5. The method of claim 1, wherein obtaining the sub-rules of the numbering rules comprises:
acquiring an initial sub-rule of the numbering rule;
determining the sequence order of the initial sub-rule according to configuration information;
and judging whether the same sequence order bit corresponds to a plurality of initial sub-rules, if so, determining the sub-rules on the sequence order bit according to the priority of the initial sub-rules, so that each sequence order bit corresponds to a unique sub-rule.
6. The method of claim 5, further comprising:
if the numbering is carried out according to the target sub-rule, and the numbering information cannot be output, judging whether a candidate sub-rule exists in the sequence order corresponding to the target sub-rule, and if so, determining the candidate sub-rule as the target sub-rule of the sequence order.
7. The method according to claim 1, wherein said numbering the configuration information according to the sub-rule and the numbering sequence to obtain a target number comprises:
determining the number type of each sub-rule;
generating numbering sub-information according to the numbering type;
and sequencing the numbering sub-information according to the numbering sequence to obtain a target number.
8. The method of claim 7, wherein the number type comprises one or more of a dictionary type, a date type, a production serial number type, or a fixed value.
9. An apparatus for generating a number, the apparatus comprising:
the inquiry unit is used for inquiring in a numbering rule list according to the configuration information to obtain a numbering rule matched with the configuration information, wherein the numbering rule list comprises at least one numbering rule;
an obtaining unit, configured to obtain a sub-rule in the numbering rule;
a determining unit, configured to determine a numbering order of each of the sub-rules;
and the numbering unit is used for numbering the configuration information according to the sub-rules and the numbering sequence to obtain a target number.
10. An electronic device comprising at least one processor, and at least one memory, bus connected with the processor; the processor and the memory complete mutual communication through the bus; the processor is configured to invoke program instructions in the memory to perform the number generation method of any of claims 1-8.
CN201910899347.7A 2019-09-23 2019-09-23 Number generation method and device and electronic equipment Pending CN112541005A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910899347.7A CN112541005A (en) 2019-09-23 2019-09-23 Number generation method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910899347.7A CN112541005A (en) 2019-09-23 2019-09-23 Number generation method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN112541005A true CN112541005A (en) 2021-03-23

Family

ID=75013232

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910899347.7A Pending CN112541005A (en) 2019-09-23 2019-09-23 Number generation method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN112541005A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115510815A (en) * 2022-11-17 2022-12-23 山东未来网络研究院(紫金山实验室工业互联网创新应用基地) Rule-based identification generation method and apparatus
CN115757413A (en) * 2022-11-23 2023-03-07 中电金信软件有限公司 Data encoding method and device and electronic equipment
CN116306503A (en) * 2023-05-16 2023-06-23 中科科界(北京)科技有限公司 Member number generation method and device and computer equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106066875A (en) * 2016-05-30 2016-11-02 深圳市华傲数据技术有限公司 A kind of high efficient data capture method and system based on deep net reptile
CN107729479A (en) * 2017-10-16 2018-02-23 山东浪潮通软信息科技有限公司 A kind of method and device for the numbering for generating document
CN108255877A (en) * 2016-12-29 2018-07-06 北京国双科技有限公司 The storage method and device of judgement document
WO2018224028A1 (en) * 2017-06-09 2018-12-13 北京国双科技有限公司 Method and device for acquiring focus of judgement document

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106066875A (en) * 2016-05-30 2016-11-02 深圳市华傲数据技术有限公司 A kind of high efficient data capture method and system based on deep net reptile
CN108255877A (en) * 2016-12-29 2018-07-06 北京国双科技有限公司 The storage method and device of judgement document
WO2018224028A1 (en) * 2017-06-09 2018-12-13 北京国双科技有限公司 Method and device for acquiring focus of judgement document
CN107729479A (en) * 2017-10-16 2018-02-23 山东浪潮通软信息科技有限公司 A kind of method and device for the numbering for generating document

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115510815A (en) * 2022-11-17 2022-12-23 山东未来网络研究院(紫金山实验室工业互联网创新应用基地) Rule-based identification generation method and apparatus
CN115757413A (en) * 2022-11-23 2023-03-07 中电金信软件有限公司 Data encoding method and device and electronic equipment
CN115757413B (en) * 2022-11-23 2024-01-19 中电金信软件有限公司 Data coding method and device and electronic equipment
CN116306503A (en) * 2023-05-16 2023-06-23 中科科界(北京)科技有限公司 Member number generation method and device and computer equipment

Similar Documents

Publication Publication Date Title
CN108427731B (en) Page code processing method and device, terminal equipment and medium
CN112541005A (en) Number generation method and device and electronic equipment
CN104462179B (en) Method for processing big data, apparatus for executing the same and storage medium storing the same
CN111428451B (en) Text online editing method and device, electronic equipment and storage medium
CN107798017B (en) Method and system for generating execution plan information in distributed database
CN111651468A (en) Data updating method and device based on SQL analysis, electronic equipment and storage medium
CN110209766B (en) Data display method, electronic device and storage medium
US20230205755A1 (en) Methods and systems for improved search for data loss prevention
CN103793428A (en) Method and device for generating of webpage summary information
CN107391535A (en) The method and device of document is searched in document application
US7634454B2 (en) Concept keywords colorization in program identifiers
CN113434542B (en) Data relationship identification method and device, electronic equipment and storage medium
US9430528B2 (en) Grid queries
CN112199483B (en) Information input assisting method and device, electronic equipment and storage medium
CN112380238A (en) Database data query method and device, electronic equipment and storage medium
CN116302054A (en) Development method and device of software project, storage medium and electronic equipment
CN112115125B (en) Database access object name resolution method and device and electronic equipment
CN109388398B (en) Interface generation method and device in virtualization system
CN112527443A (en) Prompt box display method and device, electronic equipment and computer readable storage medium
CN111553133A (en) Report generation method and device, electronic equipment and storage medium
CN112364025B (en) Data processing method and device, electronic equipment and computer readable storage medium
US20190228102A1 (en) Data crawling and processing device and method thereof
CN117724702A (en) Component configuration generation method, device, computing equipment and computer storage medium
CN115268980A (en) Method, device, equipment and storage medium for judging optimization of act component
CN114385895A (en) Commodity checking method and device, electronic equipment and 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