CN109828990A - A kind of transaction journal generation method, server, equipment and medium - Google Patents

A kind of transaction journal generation method, server, equipment and medium Download PDF

Info

Publication number
CN109828990A
CN109828990A CN201910107372.7A CN201910107372A CN109828990A CN 109828990 A CN109828990 A CN 109828990A CN 201910107372 A CN201910107372 A CN 201910107372A CN 109828990 A CN109828990 A CN 109828990A
Authority
CN
China
Prior art keywords
serial number
newest
value
current
database
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
CN201910107372.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.)
Bank of China Ltd
Original Assignee
Bank of China 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 Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN201910107372.7A priority Critical patent/CN109828990A/en
Publication of CN109828990A publication Critical patent/CN109828990A/en
Pending legal-status Critical Current

Links

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The present invention provides a kind of transaction journal generation method, server, equipment and media, which comprises receives the serial number acquisition request of terminal transmission;Current serial number is obtained from memory;Newest serial number is formed according to the current serial number, the newest serial number is back to terminal, and the value of the current serial number is replaced with to the value of newest serial number, the present invention can reduce database pressure, improve serial number formation speed.

Description

A kind of transaction journal generation method, server, equipment and medium
Technical field
The present invention relates to serial number generation technique field more particularly to a kind of transaction journal generation method, server, set Standby and medium.
Background technique
In technical field of software development, high-frequency generation serial number, such as each transaction is needed to require to be corresponding with one A unique serial number (ID).In traditional serial number generating mode, need to generate Sequnce object in the database to store A certain amount of serial number, in order to guarantee that the serial number that distributed system generates is uniquely, to need the database in logical centralization Upper generation serial number when needing serial number every time, by accessing database, is obtained from the Sequnce object of database Serial number.One serial number of this every generation of serial number generating mode will connect a database and execute in a Sequnce Serial number inquiry, and need to prevent from losing by the newest serial number persistence of generation simultaneously.When serial number acquisition request height simultaneously When hair, larger pressure can be generated to database, database response speed can reduce, so that serial number formation speed is slow, influence Task process.
Summary of the invention
It is an object of the present invention to provide a kind of transaction journal generation methods, reduce database pressure, improve stream Water formation speed.It is another object of the present invention to provide a kind of servers.It is yet a further object of the present invention to provide A kind of computer equipment.Another purpose of the invention is that providing a kind of readable medium.
In order to reach the goals above, one aspect of the present invention discloses a kind of transaction journal generation method, comprising:
Receive the serial number acquisition request of terminal transmission;
Current serial number is obtained from memory;
Newest serial number is formed according to the current serial number, the newest serial number is back to terminal, and will be described The value of current serial number replaces with the value of newest serial number.
Preferably, newest serial number is formed according to the current serial number to specifically include:
The value of the current serial number is increased by the first default value and obtains the newest serial number.
Preferably, the method also includes:
The newest serial number is stored to database after forming the newest serial number of the second preset quantity.
Preferably, when obtaining the failure of current serial number from memory, serial number initial value is obtained from database, according to institute It states serial number initial value and forms current serial number.
Preferably, current serial number is formed according to the serial number initial value to specifically include:
The value of the serial number initial value is increased into third default value and obtains the current serial number.
Preferably, the third default value is greater than newest serial number and number when storing newest serial number to database According to the difference of serial number initial value in library.
The invention also discloses a kind of transaction journal generation methods, comprising:
Serial number acquisition request is sent so that the server obtains current serial number from memory, according to institute to server It states current serial number and forms newest serial number, the newest serial number is returned, and the value of the current serial number is replaced with The value of newest serial number.
The invention also discloses a kind of servers, comprising:
Request unit, for receiving the serial number acquisition request of terminal transmission;
Serial number acquiring unit, for obtaining current serial number from memory;
Serial number generation unit, for forming newest serial number according to the current serial number, by the newest serial number It is back to terminal, and the value of the current serial number is replaced with to the value of newest serial number.
The invention also discloses a kind of computer equipment, including memory, processor and storage are on a memory and can The computer program run on a processor,
The processor realizes method as described above when executing described program.
The invention also discloses a kind of computer-readable mediums, are stored thereon with computer program,
The program realizes method as described above when being executed by processor.
Current serial number is stored in memory by the present invention, after receiving serial number acquisition request, is obtained from memory To current serial number, newest serial number is generated according to current serial number according to preset rules, to guarantee the serial number generated only Unique newest serial number of generation is returned to terminal, and replaces the value of current serial number with the value of newest serial number by one property As current serial number, so that duplicate newest serial number will not be generated in the generating process of subsequent newest serial number.This hair During open-birth is at serial number, without during one serial number of every generations access database, so as to The pressure that database is reduced when serial number acquisition request high concurrent, improves the formation speed of serial number, and can reduce generation stream The cost of water number.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 shows a kind of one of flow chart of one specific embodiment of transaction journal generation method of the present invention;
Fig. 2 shows a kind of one of flow charts of one specific embodiment of transaction journal generation method of the present invention;
Fig. 3 shows a kind of one of flow chart of one specific embodiment of transaction journal generation method of the present invention;
Fig. 4 shows a kind of one of flow chart of one specific embodiment of transaction journal generation method of the present invention;
Fig. 5 shows a kind of one of flow chart of one specific embodiment of transaction journal generation method of the present invention;
Fig. 6 shows a kind of one of flow chart of one specific embodiment of transaction journal generation method of the present invention;
Fig. 7 shows a kind of algorithm flow chart of one specific embodiment of transaction journal generation method of the present invention;
Fig. 8 shows a kind of one of structure chart of one specific embodiment of server of the present invention;
Fig. 9 shows the two of a kind of structure chart of one specific embodiment of server of the present invention;
Figure 10 shows the structural schematic diagram for being suitable for the computer equipment for being used to realize the embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
According to an aspect of the present invention, from server side, present embodiment discloses a kind of transaction journal number generation sides Method.As shown in Figure 1, in the present embodiment, transaction journal generation method includes:
S100: the serial number acquisition request of terminal transmission is received.
S200: current serial number is obtained from memory.
S300: forming newest serial number according to the current serial number, the newest serial number is back to terminal, and will The value of the current serial number replaces with the value of newest serial number.
Current serial number is stored in memory by the present invention, after receiving serial number acquisition request, is obtained from memory To current serial number, newest serial number is generated according to current serial number according to preset rules, to guarantee the serial number generated only Unique newest serial number of generation is returned to terminal, and replaces the value of current serial number with the value of newest serial number by one property As current serial number, so that duplicate newest serial number will not be generated in the generating process of subsequent newest serial number.This hair During open-birth is at serial number, without during one serial number of every generations access database, so as to The pressure that database is reduced when serial number acquisition request high concurrent, improves the formation speed of serial number, and with database I/O operation It is most time-consuming, the highest operation of cost, by making full use of memory, the operation between database is reduced, to reduce generation The cost of serial number.
In one preferred embodiment, SQL Server database purchase serial number, such as storage flowing water can be used Number initial value periodically stores newest serial number into SQL Server database to update serial number initial value, when serial number is lost Afterwards, the serial number initial value that storage can be obtained from database forms newest serial number on the basis of serial number initial value, prevents Serial number generates duplicate serial number after losing.Specifically, can be created in SQL Server database table SequenceNO with Scheduled store serial number initial value.
In a preferred embodiment, as shown in Fig. 2, forming newest flowing water according to the current serial number in the S300 It number specifically includes:
S310: the value of the current serial number is increased by the first default value and obtains the newest serial number.The present embodiment In, newest serial number is obtained by increasing by the first default value on the basis of current serial number.In other embodiments, Newest serial number can be formed by reducing the modes such as certain numerical value, need to only guarantee the newest serial number being subsequently generated and stream before Water number does not repeat.Preferably, the first default value can be 1, form newest flowing water on the basis of current serial number plus after 1 Number, serial number generating mode is simple and does not repeat, and in practical applications, other numerical value can also be used in the first default value.
In a preferred embodiment, as shown in figure 3, the method also includes:
S400: the newest serial number is stored to database after the newest serial number of every formation the second preset quantity. By the newest serial number of scheduled store, it can prevent the newest serial number generated from losing, when system boot initialization, in memory simultaneously There is no serial number, or after system jam is restarted, the current serial number in memory can be lost, by periodically by newest flowing water Number persistence into database, can in memory without current serial number when, the serial number of storage is obtained from database again, So as to know the numberical range of the previous secondary newest serial number generated, so it is newest according to the generation of the serial number of reacquisition Serial number, can also guarantee generate newest serial number therewith previous existence at serial number do not repeat.For example, when the second preset quantity When being 100, when 100 newest serial numbers of every formation, then the newest serial number being newly formed is stored into database, then when interior When current serial number being not present in depositing, the serial number of newest storage can be obtained from database, then the last newest stream generated In the numberical range for 100 serial numbers that the numberical range of water number continuously generates on the basis of the serial number of acquisition, when can not obtain When taking the newest serial number that previous time generates, the newest serial number generated is made to avoid the numerical value of the newest serial number of last generation Range can prevent generate serial number therewith previous existence at serial number replication problem, realize efficiently, safety generation flowing water Number purpose.
In a preferred embodiment, as shown in figure 4, the S200 further include:
S210: when obtaining the failure of current serial number from memory, serial number initial value is obtained from database, according to described Serial number initial value forms current serial number.When obtaining the failure of current serial number from memory, that is, show that system may be booting It initializes or breaks down after restarting, the serial number initial value that the serial number of scheduled store is formed can be obtained from database, thus It can continue to generate serial number.
In a preferred embodiment, as shown in figure 5, forming current flowing water according to the serial number initial value in the S210 It is number specific can include:
S211: the value of the serial number initial value is increased into third default value and obtains the current serial number.By flowing The numerically increase third default value of water initial value makes the newest serial number generated avoid the newest serial number of last generation Numberical range can prevent generate serial number therewith previous existence at serial number replication problem.
In a preferred embodiment, the third default value is greater than when storing newest serial number to database most The difference of serial number initial value in new serial number and database.For example, when in current serial number numerically plus 1 to form newest stream Water number, and store the newest serial number currently formed into database after forming 100 newest serial numbers, then third is pre- If numerical value should be greater than the difference of existing serial number in newest serial number and database when storing, then third default value needs big In the product of the first default value and the second preset quantity, i.e. third default value need to be greater than 1*100, is subsequently generated with guarantee Newest serial number therewith previous existence at serial number will not repeat.
In a preferred embodiment, if necessary to customize, recycle serial number, it can also be in second day weight New setting serial number initial value.As shown in fig. 6, the method is further can include:
S500: in preset time, the serial number initial value stored in database is replaced with into preset value.Wherein, preset time The physical table of memory and database is emptied and is considered as replacing serial number initial value by the time that can be server discontinuing operation For preset value.
Fig. 7 shows the algorithm flow chart of a specific example of the invention, wherein algorithm flow is explained in dotted line expression It is bright.As shown in fig. 7, the client as terminal is by the Internet access service device, calls application interface is newest to obtain Serial number.The current serial number stored at present in memory is@value.After getting@value, whether current serial number is confirmed In the presence of when@value==0 sets up (Ture), current serial number is 0, indicates that Server Restart or other reasons cause to cache Value value lose, need at this time again from the table of database read serial number initial value, that is, obtain last time persistence stream Water number, the step can be realized by Select@value=[value] From SequenceNO.The serial number initial value that will acquire The current serial number redefined after value plus 100, the step can be realized by@value=@value+100.As@value= When=0 invalid (False), indicate that there are current serial numbers in current memory caching, will delay by@value=@value+1 Value plus 1 are deposited, is equivalent to and the value of current serial number is added into the newest serial number of 1 formation.Can@value%100==0 further be passed through? The newest serial number that storage generates is determined the need for, i.e., storage is primary most when the every increase by 100 of the value of newest serial number New serial number.Specifically, passing through Update SequenceNO Set when the result of@value%100==0 is Ture The serial number stored in table SequenceNO in database is initially replaced with current newest flowing water by [value]=@value Number, the newest serial number of generation is then returned into client.When the result of@value%100==0 is False, it is not necessarily to Newest serial number is directly returned to client by storage.
Based on same principle, from terminal point, the present embodiment also discloses a kind of transaction journal generation method.The side Method includes that serial number acquisition request is sent to server so that the server obtains current serial number from memory, according to described Current serial number forms newest serial number, the newest serial number is returned, and the value of the current serial number is replaced with most The value of new serial number.
Current serial number is stored in memory by the present invention, after receiving serial number acquisition request, is obtained from memory To current serial number, newest serial number is generated according to current serial number according to preset rules, to guarantee the serial number generated only Unique newest serial number of generation is returned to terminal, and replaces the value of current serial number with the value of newest serial number by one property As current serial number, so that duplicate newest serial number will not be generated in the generating process of subsequent newest serial number.This hair During open-birth is at serial number, without during one serial number of every generations access database, so as to The pressure that database is reduced when serial number acquisition request high concurrent, improves the formation speed of serial number, and with database I/O operation It is most time-consuming, the highest operation of cost, by making full use of memory, the operation between database is reduced, to reduce generation The cost of serial number.
In one preferred embodiment, SQL Server database purchase serial number, such as storage flowing water can be used Number initial value periodically stores newest serial number into SQL Server database to update serial number initial value, when serial number is lost Afterwards, the serial number initial value that storage can be obtained from database forms newest serial number on the basis of serial number initial value, prevents Serial number generates duplicate serial number after losing.Specifically, can be created in SQL Server database table SequenceNO with Scheduled store serial number initial value.
In a preferred embodiment, to form newest serial number according to the current serial number specific can include: will be described The value of current serial number increases by the first default value and obtains the newest serial number.In the present embodiment, by current serial number On the basis of increase by the first default value and obtain newest serial number.It in other embodiments, can also be by reducing certain numerical value Etc. modes form newest serial number, only need to guarantee the newest serial number being subsequently generated with before serial number not repeat.It is excellent Choosing, the first default value can be 1, form newest serial number, serial number generating mode on the basis of current serial number plus after 1 It simply and does not repeat, in practical applications, other numerical value can also be used in the first default value.
In a preferred embodiment, the method also includes: keep server newest in every formation the second preset quantity The newest serial number is stored to database after serial number.By the newest serial number of scheduled store, can prevent from generating newest Serial number is lost, and when system boot initialization, there is no serial numbers in memory, or after system jam is restarted, memory In current serial number can lose, can be in memory without current by periodically by newest serial number persistence into database When serial number, the serial number of storage is obtained from database again, so as to know the previous secondary newest serial number generated Numberical range, and then newest serial number is generated according to the serial number of reacquisition, can also guarantee the newest serial number generated with The serial number generated before does not repeat.For example, when the second preset quantity is 100, when 100 newest serial numbers of every formation, then The newest serial number being newly formed is stored into database, then it, can be from database when current serial number is not present in memory The middle serial number for obtaining newest storage, then the numberical range of the last newest serial number generated is on the basis of the serial number of acquisition In the numberical range of 100 serial numbers continuously generated, when the newest serial number that previous time generates can not be obtained, make generation The numberical range that newest serial number avoids the newest serial number of last generation can prevent the serial number generated therewith previous existence at Serial number replication problem, realize efficiently, safety generation serial number purpose.
In a preferred embodiment, when obtaining the failure of current serial number from memory, server is obtained from database Serial number initial value is taken, current serial number is formed according to the serial number initial value.When obtaining the failure of current serial number from memory, Show that system may be that after opening initialization or break down is restarted, the serial number shape of scheduled store can be obtained from database At serial number initial value, so as to continue generate serial number.
In a preferred embodiment, described according to the serial number initial value to form current serial number specific can include: will The value of the serial number initial value increases third default value and obtains the current serial number.By serial number initial value numerically Increase third default value, the numberical range for making the newest serial number generated avoid the newest serial number of last generation can prevent The serial number only generated therewith previous existence at serial number replication problem.
In a preferred embodiment, the third default value is greater than when storing newest serial number to database most The difference of serial number initial value in new serial number and database.For example, when in current serial number numerically plus 1 to form newest stream Water number, and store the newest serial number currently formed into database after forming 100 newest serial numbers, then third is pre- If numerical value should be greater than the difference of existing serial number in newest serial number and database when storing, then third default value needs big In the product of the first default value and the second preset quantity, i.e. third default value need to be greater than 1*100, is subsequently generated with guarantee Newest serial number therewith previous existence at serial number will not repeat.
Based on same principle, the present embodiment also discloses a kind of server.As shown in figure 8, the server includes that request obtains Take unit 11, serial number acquiring unit 12 and serial number generation unit 13.
Wherein, the request unit 11 is used to receive the serial number acquisition request of terminal transmission.
The serial number acquiring unit 12 from memory for obtaining current serial number.
The serial number generation unit 13 is used to form newest serial number according to the current serial number, by the newest stream Water number is back to terminal, and the value of the current serial number is replaced with to the value of newest serial number.
The server can also pass through hardware realization by software realization.In a preferred embodiment, exploitation can be passed through SQL Server database common language runtime (Common Language Runtime, CLR) component, CLR and Java are virtual Machine is equally also a runtime environment, it is responsible for resource management (Memory Allocation and garbage collection etc.), and guarantees to apply and bottom Necessary separation between layer operation system is the main enforcement engine of .NET Framework.Use .NET program development component The CLR component of server is formed, and can integrate the function of the customized .NET application program of user using SQL Server, it will CLR component is installed to database, for client call.CLR component can realize the generation of newest serial number and be sent to terminal Function, and can periodically store the newest serial number of generation into database, prevent serial number from losing.If necessary to extend, It can be by CLR deployment of components into more databases, by the way that serial number initial value, the first default value, the second preset quantity is arranged With the parameters such as third default value, the CLR component on each database is made to form different serial numbers.
In one preferred embodiment, SQL Server database purchase serial number, such as storage flowing water can be used Number initial value periodically stores newest serial number into SQL Server database to update serial number initial value, when serial number is lost Afterwards, the serial number initial value that storage can be obtained from database forms newest serial number on the basis of serial number initial value, prevents Serial number generates duplicate serial number after losing.Specifically, can be created in SQL Server database table SequenceNO with Scheduled store serial number initial value.
In a preferred embodiment, the serial number generation unit 13 is further used for the value of the current serial number Increase by the first default value and obtains the newest serial number.
In a preferred embodiment, the serial number generation unit 13 is further used in the second preset quantity of every formation The newest serial number is stored to database after a newest serial number.
In a preferred embodiment, the serial number acquiring unit 12 is further used for when the current stream of acquisition from memory When water failure, serial number initial value is obtained from database, current serial number is formed according to the serial number initial value.
In a preferred embodiment, the serial number acquiring unit 12 is further used for the value of the serial number initial value Increase third default value and obtains the current serial number.
In a preferred embodiment, as shown in figure 9, the server further includes serial number reset cell 14.The flowing water Number reset cell is used to that the serial number initial value stored in database to be replaced with preset value in preset time.
Since the principle that the server solves the problems, such as is similar with above method, the implementation side of may refer to of book server The implementation of method, details are not described herein.
Based on same principle, the present embodiment also discloses a kind of terminal, which is used to send serial number to server and obtain It takes and requests to form newest serial number according to the current serial number so that the server obtains current serial number from memory, The newest serial number is returned, and the value of the current serial number is replaced with to the value of newest serial number.
Since the principle that the terminal solves the problems, such as is similar with above method, the implementation of this terminal may refer to method Implement, details are not described herein.
System, device, module or the unit that above-described embodiment illustrates can specifically realize by computer chip or entity, Or it is realized by the product with certain function.It is a kind of typically to realize that equipment is computer equipment, specifically, computer is set It is standby for example can for personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, Media player, navigation equipment, electronic mail equipment, game console, tablet computer, wearable device or these equipment In any equipment combination.
Computer equipment specifically includes memory, processor and storage on a memory simultaneously in a typical example The computer program that can be run on a processor is realized when the processor executes described program and is held as described above by client Capable method, alternatively, the processor realizes the method executed as described above by server when executing described program.
Below with reference to Figure 10, it illustrates the structures for the computer equipment 600 for being suitable for being used to realize the embodiment of the present application to show It is intended to.
As shown in Figure 10, computer equipment 600 includes central processing unit (CPU) 601, can be read-only according to being stored in Program in memory (ROM) 602 is loaded into random access storage device (RAM) from storage section 608) program in 603 And execute various work appropriate and processing.In RAM603, also it is stored with system 600 and operates required various program sum numbers According to.CPU601, ROM602 and RAM603 are connected with each other by bus 604.Input/output (I/O) interface 605 is also connected to Bus 604.
I/O interface 605 is connected to lower component: the importation 606 including keyboard, mouse etc.;It is penetrated including such as cathode The output par, c 607 of spool (CRT), liquid crystal ultramagnifier (LCD) etc. and loudspeaker etc.;Storage section 608 including hard disk etc.; And including such as LAN card, the communications portion 609 of the network interface card of modem etc..Communications portion 609 via such as because The network of spy's net executes communication process.Driver 610 is also connected to I/O interface 606 as needed.Detachable media 611, such as Disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 610, in order to read from thereon Computer program be mounted as needed such as storage section 608.
Particularly, according to an embodiment of the invention, may be implemented as computer above with reference to the process of flow chart description Software program.For example, the embodiment of the present invention includes a kind of computer program product comprising be tangibly embodied in machine readable Computer program on medium, the computer program include the program code for method shown in execution flow chart.At this In the embodiment of sample, which can be downloaded and installed from network by communications portion 609, and/or from removable Medium 611 is unloaded to be mounted.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data. The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM), Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates Machine readable medium does not include temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
For convenience of description, it is divided into various units when description apparatus above with function to describe respectively.Certainly, implementing this The function of each unit can be realized in the same or multiple software and or hardware when application.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates, Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one The step of function of being specified in a box or multiple boxes.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability It include so that the process, method, commodity or the equipment that include a series of elements not only include those elements, but also to wrap Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including described want There is also other identical elements in the process, method of element, commodity or equipment.
It will be understood by those skilled in the art that embodiments herein can provide as method, system or computer program product. Therefore, complete hardware embodiment, complete software embodiment or embodiment combining software and hardware aspects can be used in the application Form.It is deposited moreover, the application can be used to can be used in the computer that one or more wherein includes computer usable program code The shape for the computer program product implemented on storage media (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) Formula.
The application can describe in the general context of computer-executable instructions executed by a computer, such as program Module.Generally, program module includes routines performing specific tasks or implementing specific abstract data types, programs, objects, group Part, data structure etc..The application can also be practiced in a distributed computing environment, in these distributed computing environments, by Task is executed by the connected remote processing devices of communication network.In a distributed computing environment, program module can be with In the local and remote computer storage media including storage equipment.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for system reality For applying example, since it is substantially similar to the method embodiment, so being described relatively simple, related place is referring to embodiment of the method Part explanation.
The above description is only an example of the present application, is not intended to limit this application.For those skilled in the art For, various changes and changes are possible in this application.All any modifications made within the spirit and principles of the present application are equal Replacement, improvement etc., should be included within the scope of the claims of this application.

Claims (10)

1. a kind of transaction journal generation method characterized by comprising
Receive the serial number acquisition request of terminal transmission;
Current serial number is obtained from memory;
Newest serial number is formed according to the current serial number, the newest serial number is back to terminal, and will be described current The value of serial number replaces with the value of newest serial number.
2. transaction journal generation method according to claim 1, which is characterized in that formed according to the current serial number Newest serial number specifically includes:
The value of the current serial number is increased by the first default value and obtains the newest serial number.
3. transaction journal generation method according to claim 1, which is characterized in that the method also includes:
The newest serial number is stored to database after forming the newest serial number of the second preset quantity.
4. transaction journal generation method according to claim 3, which is characterized in that when obtaining current flowing water from memory When number failure, serial number initial value is obtained from database, current serial number is formed according to the serial number initial value.
5. transaction journal generation method according to claim 4, which is characterized in that formed according to the serial number initial value Current serial number specifically includes:
The value of the serial number initial value is increased into third default value and obtains the current serial number.
6. transaction journal generation method according to claim 5, which is characterized in that the third default value is greater than will The difference of serial number initial value in newest serial number and database when newest serial number is stored to database.
7. a kind of transaction journal generation method characterized by comprising
To server transmission serial number acquisition request so that the server obtains current serial number from memory, worked as according to described Preceding serial number forms newest serial number, and the newest serial number is returned, and the value of the current serial number is replaced with newest The value of serial number.
8. a kind of server characterized by comprising
Request unit, for receiving the serial number acquisition request of terminal transmission;
Serial number acquiring unit, for obtaining current serial number from memory;
Serial number generation unit returns to the newest serial number for forming newest serial number according to the current serial number To terminal, and the value of the current serial number is replaced with to the value of newest serial number.
9. a kind of computer equipment, can run on a memory and on a processor including memory, processor and storage Computer program, which is characterized in that
The processor is realized when executing described program such as any one of claim 1-7 the method.
10. a kind of computer-readable medium, is stored thereon with computer program, which is characterized in that
It realizes when the program is executed by processor such as any one of claim 1-7 the method.
CN201910107372.7A 2019-02-02 2019-02-02 A kind of transaction journal generation method, server, equipment and medium Pending CN109828990A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910107372.7A CN109828990A (en) 2019-02-02 2019-02-02 A kind of transaction journal generation method, server, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910107372.7A CN109828990A (en) 2019-02-02 2019-02-02 A kind of transaction journal generation method, server, equipment and medium

Publications (1)

Publication Number Publication Date
CN109828990A true CN109828990A (en) 2019-05-31

Family

ID=66863354

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910107372.7A Pending CN109828990A (en) 2019-02-02 2019-02-02 A kind of transaction journal generation method, server, equipment and medium

Country Status (1)

Country Link
CN (1) CN109828990A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110377268A (en) * 2019-07-25 2019-10-25 中国工商银行股份有限公司 Serial number generation method, device and storage medium
CN112541040A (en) * 2020-12-08 2021-03-23 中国银行股份有限公司 Serial number generation method and device
CN112667685A (en) * 2020-12-29 2021-04-16 北京先进数通信息技术股份公司 Serial number configuration method, device, equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6714948B1 (en) * 1999-04-29 2004-03-30 Charles Schwab & Co., Inc. Method and system for rapidly generating identifiers for records of a database
CN1819645A (en) * 2006-03-20 2006-08-16 北京北大方正电子有限公司 Automatic distributing generating method of identifier of TV-set programm
CN101458783A (en) * 2007-12-13 2009-06-17 鸿富锦精密工业(深圳)有限公司 Document generation system and method
CN102609477A (en) * 2012-01-19 2012-07-25 北京神州数码思特奇信息技术股份有限公司 Method for implementing serial number generator
CN103514216A (en) * 2012-06-29 2014-01-15 中国银联股份有限公司 Serial number generating method based on database system
CN104112224A (en) * 2014-08-11 2014-10-22 税友软件集团股份有限公司 Method, device and system for generating electronic invoice assigned code based on enterprise tax number

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6714948B1 (en) * 1999-04-29 2004-03-30 Charles Schwab & Co., Inc. Method and system for rapidly generating identifiers for records of a database
CN1819645A (en) * 2006-03-20 2006-08-16 北京北大方正电子有限公司 Automatic distributing generating method of identifier of TV-set programm
CN101458783A (en) * 2007-12-13 2009-06-17 鸿富锦精密工业(深圳)有限公司 Document generation system and method
CN102609477A (en) * 2012-01-19 2012-07-25 北京神州数码思特奇信息技术股份有限公司 Method for implementing serial number generator
CN103514216A (en) * 2012-06-29 2014-01-15 中国银联股份有限公司 Serial number generating method based on database system
CN104112224A (en) * 2014-08-11 2014-10-22 税友软件集团股份有限公司 Method, device and system for generating electronic invoice assigned code based on enterprise tax number

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110377268A (en) * 2019-07-25 2019-10-25 中国工商银行股份有限公司 Serial number generation method, device and storage medium
CN112541040A (en) * 2020-12-08 2021-03-23 中国银行股份有限公司 Serial number generation method and device
CN112667685A (en) * 2020-12-29 2021-04-16 北京先进数通信息技术股份公司 Serial number configuration method, device, equipment and storage medium
CN112667685B (en) * 2020-12-29 2024-04-16 北京先进数通信息技术股份公司 Method, device, equipment and storage medium for configuring serial numbers

Similar Documents

Publication Publication Date Title
US11656911B2 (en) Systems, methods, and apparatuses for implementing a scheduler with preemptive termination of existing workloads to free resources for high priority items
CN108958796B (en) Service request processing method and device and service request processing system
US11403346B2 (en) Method and device for searching for information in applications
CN111966500B (en) Resource scheduling method and device, electronic equipment and storage medium
CN109828990A (en) A kind of transaction journal generation method, server, equipment and medium
CN114356587B (en) Calculation power task cross-region scheduling method, system and equipment
US20200042392A1 (en) Implementing Affinity And Anti-Affinity Constraints In A Bundled Application
CN107578338B (en) Service publishing method, device and equipment
CN113674131A (en) Hardware accelerator equipment management method and device, electronic equipment and storage medium
CN113485830A (en) Micro-service automatic capacity expansion method for power grid monitoring system
CN108390914A (en) A kind of service update method and device, system
CN114429195A (en) Performance optimization method and device for hybrid expert model training
CN116737370A (en) Multi-resource scheduling method, system, storage medium and terminal
WO2022078060A1 (en) Tag-driven scheduling of computing resources for function execution
US11720554B2 (en) Iterative query expansion for document discovery
CN114924857A (en) Redis-based distributed timing scheduling method and device and storage medium
US11327793B2 (en) Garbage collection work stealing mechanism
US11321351B2 (en) Adaptable legacy stateful workload
CN113553180A (en) Container scheduling method and device and electronic equipment
US20240086225A1 (en) Container group scheduling methods and apparatuses
CN113407341B (en) Load object synchronization method and device based on distributed load balancing
CN117785486B (en) Environment resource allocation method, device, equipment and medium
US11651005B2 (en) Intelligent datastore determination for microservice
CN114185896B (en) Data processing method, device, electronic equipment and storage medium
US11768704B2 (en) Increase assignment effectiveness of kubernetes pods by reducing repetitive pod mis-scheduling

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20190531

RJ01 Rejection of invention patent application after publication