CN110046192B - System and method for generating serial number of request information - Google Patents

System and method for generating serial number of request information Download PDF

Info

Publication number
CN110046192B
CN110046192B CN201910325588.0A CN201910325588A CN110046192B CN 110046192 B CN110046192 B CN 110046192B CN 201910325588 A CN201910325588 A CN 201910325588A CN 110046192 B CN110046192 B CN 110046192B
Authority
CN
China
Prior art keywords
information
sequence number
registration
number generation
request
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.)
Active
Application number
CN201910325588.0A
Other languages
Chinese (zh)
Other versions
CN110046192A (en
Inventor
黄全
任娟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Lizhi Network Technology Co ltd
Original Assignee
Guangzhou Lizhi Network 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 Guangzhou Lizhi Network Technology Co ltd filed Critical Guangzhou Lizhi Network Technology Co ltd
Priority to CN201910325588.0A priority Critical patent/CN110046192B/en
Publication of CN110046192A publication Critical patent/CN110046192A/en
Application granted granted Critical
Publication of CN110046192B publication Critical patent/CN110046192B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/126Character encoding

Abstract

The invention relates to a serial number generation system and a method of request information, wherein the system comprises a configuration device, a registration device, an information acquisition device and at least one serial number generation device; each sequence number generation device is used for acquiring corresponding configuration information from the configuration device and sending a registration request to the registration device; the registration device is used for registering each serial number generation device according to the configuration information to generate corresponding registration information; the registration information comprises an address of the sequence number generation device and a number interval corresponding to the address; the information acquisition device is used for acquiring the request information and extracting the number of the request information; acquiring registration information, determining an address of a serial number generation device, and sending request information and a serial number generation request to the serial number generation device corresponding to the address; the sequence number generating device is used for obtaining the sequence number of the request information according to the sequence number generation request and the sequence number of the previous request information. The system can reduce the time delay of information processing and greatly improve the information processing speed.

Description

System and method for generating serial number of request information
Technical Field
The present invention relates to the field of network technologies, and in particular, to a system and a method for generating a sequence number of request information.
Background
With the rapid development of the internet, more and more application scenes need to process request information in sequence; the order of processing is very important in some cases, such as request information of joining a group and exiting the group in instant messaging products, request information of payment and refund in the payment field, request information of deposit and withdrawal of bank customers and the like; if the request information cannot be processed in sequence, errors and poor user experience are easily caused.
However, in a highly concurrent, large-traffic distributed framework, it is very difficult to ensure that request information for a certain dimension is processed in sequence. At present, the request information is generally sequenced by means of assigning serial numbers to the request information or by means of assigning serial numbers to the request information by a third-party product; the step of assigning the serial numbers to the request information means that each request information is assigned with one serial number, the serial numbers are in increasing trend, and then the request information is processed according to the sequence of the serial numbers; the common process of labeling the serial number of the request information by using the third-party product is to use an automatic ID increment generation function of the third-party product, for example, a mysql self-increment ID function, a redis INCR function, and the like, to label each request information by using an increment ID when receiving the request information, and then only need to process the request information according to the ID sequence. The method for assigning the serial number to the request information has low processing speed and cannot process complicated and huge request information; the method for marking the serial number of the request information by adopting the third-party product has the problems of data migration, access bottleneck, difficulty in dynamic expansion and the like.
Disclosure of Invention
Therefore, it is necessary to provide a system and a method for generating a sequence number of request information, which are directed to the problems of the current method for generating a sequence number of request information that the processing speed is slow and dynamic expansion is difficult.
A serial number generation system of request information comprises a configuration device, a registration device, an information acquisition device and at least one serial number generation device;
the configuration device is used for storing configuration information;
each sequence number generation device is used for acquiring corresponding configuration information from the configuration device, finishing information configuration of each sequence number generation device according to the configuration information and sending a registration request to the registration device;
the registration device is used for registering each serial number generation device according to the configuration information to generate corresponding registration information; the registration information comprises an address of a sequence number generation device and a number interval corresponding to the address;
the information acquisition device is used for acquiring request information and extracting the number of the request information; acquiring registration information, determining the address of the sequence number generation device according to the number interval when the number is in the number interval, and sending the request information and the sequence number generation request to the sequence number generation device corresponding to the address;
and the sequence number generating device is used for obtaining the sequence number of the request information according to the sequence number generation request and the sequence number of the previous request information.
In one embodiment, each sequence number generation device comprises a master sequence number generation device and a slave sequence number generation device, wherein the master sequence number generation device and the slave sequence number generation device have the same structure;
when the master serial number generation device fails, the slave serial number generation device is used for acquiring the same configuration information as the master serial number generation device from the configuration device, completing information configuration of the slave serial number generation device according to the configuration information, and sending a registration request to the registration device;
the registration device is used for registering the slave sequence number generation device according to the configuration information, generating the registration information of the slave sequence number generation device and deleting the registration information of the master sequence number generation device.
In one embodiment, the system further comprises a database for storing snapshot information of the sequence number of the historical request information.
In one embodiment, the sequence number generation means obtains the sequence number of the previous request information from the snapshot information in the database.
In one embodiment, the sequence number generation device is configured to send the sequence number of the request message to the information collection device.
In one embodiment, the sequence number generation device comprises a configuration module, a sequence number calculation module, a sequence number snapshot generation module and a registration module;
the configuration module is used for acquiring the configuration information from the configuration device and completing information configuration according to the configuration information;
the registration module is used for sending a registration request to the registration device;
the sequence number calculation module is used for generating a request according to the sequence number and obtaining the sequence number of the request information according to the sequence number of the previous request information;
and the sequence number snapshot generating module is used for generating snapshot information from the sequence number of each request message and periodically updating the snapshot information to the database.
In one embodiment, the information acquisition device acquires registration information from the registration device through an SDK, and sends the request information and a sequence number generation request to the sequence number generation device corresponding to the address.
A serial number generation method of request information comprises an interaction method among a configuration device, a registration device, an information acquisition device and at least one serial number generation device; the interaction method comprises the following steps:
each sequence number generation device acquires corresponding configuration information from the configuration device, completes information configuration of each sequence number generation device according to the configuration information, and sends a registration request to the registration device;
the registration device registers each serial number generation device according to the configuration information to generate corresponding registration information; the registration information comprises an address of a sequence number generation device and a number interval corresponding to the address;
the information acquisition device acquires request information and extracts the number of the request information; acquiring registration information, determining the address of the sequence number generation device according to the number interval when the number is in the number interval, and sending the request information and the sequence number generation request to the sequence number generation device corresponding to the address;
and the sequence number generating device obtains the sequence number of the request information according to the sequence number generation request and the sequence number of the previous request information.
In one embodiment, the method further comprises the following steps: each sequence number generation device comprises a master sequence number generation device and a slave sequence number generation device, wherein the master sequence number generation device and the slave sequence number generation device have the same structure;
when the master serial number generation device fails, the slave serial number generation device acquires the same configuration information as the master serial number generation device from the configuration device, completes information configuration of the slave serial number generation device according to the configuration information, and sends a registration request to the registration device;
the registration device registers the slave sequence number generation device according to the configuration information, generates registration information of the slave sequence number generation device, and deletes the registration information of the master sequence number generation device.
In one embodiment, the method further comprises the following steps:
and the sequence number generating device acquires the sequence number of the previous request information from snapshot information in a database.
The system and the method for generating the serial number of the request information comprise a configuration device, a registration device, an information acquisition device and at least one serial number generation device; firstly, each serial number generation device acquires corresponding configuration information from a configuration device, completes information configuration according to the configuration information and sends a registration request to a registration device; the registration device registers each serial number generation device according to the configuration information to generate corresponding registration information; the registration information comprises an address of the sequence number generation device and a number interval corresponding to the address; the information acquisition device acquires the request information and extracts the number of the request information; acquiring registration information, determining the address of a serial number generation device according to the number interval when the number is in the number interval, and sending request information and a serial number generation request to the serial number generation device corresponding to the address; the sequence number generating device is used for obtaining the sequence number of the request information according to the sequence number generation request and the sequence number of the previous request information. The system comprises a plurality of serial number generating devices, each serial number generating device can generate serial numbers for the request information in a certain number interval, and can divide the various request information in different number intervals into different serial number generating devices for serial number generation, so that the time delay of information processing is reduced, and the information processing speed is greatly improved; in addition, the registration information is obtained by registering according to the configuration information, when the configuration information is changed, the registration information can be correspondingly changed, the request information of the number interval which can be processed by the corresponding sequence number generation device can be changed, and the dynamic expansion is very convenient.
Drawings
FIG. 1 is a schematic structural diagram of a request message sequence number generation system according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating a structure of registration information of a registration apparatus according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a request message sequence number generation system according to an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a request message sequence number generation system according to an embodiment of the present invention;
fig. 5 is a flowchart illustrating a method for generating a sequence number of request information according to an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to preferred embodiments and the accompanying drawings. It is to be understood that the following examples are illustrative only and are not intended to limit the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention. It should be noted that, for the convenience of description, only some but not all of the matters related to the present invention are shown in the drawings.
[ PROBLEMS ] to explain the related art
It should be noted that the terms "first \ second \ third" related to the embodiments of the present invention are merely used for distinguishing similar objects, and do not represent a specific ordering for the objects, and it should be understood that "first \ second \ third" may exchange a specific order or sequence order if allowed. It should be understood that the terms first, second, and third, as used herein, are interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in other sequences than those illustrated or otherwise described herein.
The terms "comprises" and "comprising," and any variations thereof, of embodiments of the present invention are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or (module) elements is not limited to only those steps or elements but may alternatively include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
Reference herein to "a plurality" means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
The invention provides a serial number generation system for request information. Fig. 1 is a schematic structural diagram of a serial number generation system for request information according to an embodiment of the present invention, and as shown in fig. 1, the serial number generation system for request information according to an embodiment of the present invention includes a configuration device 10, a registration device 20, an information collection device 30, and at least one serial number generation device 40; the configuration device 10 is used for storing configuration information; each serial number generation device 40 is used for acquiring corresponding configuration information from the configuration device, completing information configuration of each serial number generation device according to the configuration information, and sending a registration request to the registration device 20; the registration device 20 is configured to register each serial number generation device according to the configuration information, and generate corresponding registration information; the registration information comprises an address of the sequence number generation device and a number interval corresponding to the address; the information acquisition device 30 is used for acquiring request information and extracting the number of the request information; acquiring registration information, determining the address of a sequence number generation device according to the number interval when the number is in the number interval, and sending request information and a sequence number generation request to a sequence number generation device 40 corresponding to the address; the sequence number generating means 40 is used for obtaining the sequence number of the request information according to the sequence number generation request and the sequence number of the previous request information.
The configuration information is related parameters for initializing the serial number generation device, and generally includes an address port number and a number interval, where the address generally refers to an IP address of the serial number generation device, and the number interval generally is an interval composed of a start value of the number and a stop value of the number; the number generally refers to the ID of the requested information; the format of the configuration information is typically an IP address, a port number, [ request information ID start value, request information ID cutoff value ] of the serial number generation apparatus; for example, common configuration information may be 192.168.0.101,8001, [0,99 ]; 192.168.0.102,8001, [100,199 ]; 192.168.0.103,8001,[200,299]. The configuration device 10 stores a plurality of sets of configuration information, the configuration device 10 may assign configuration information to a plurality of sequence number generation devices according to actual conditions, each sequence number generation device assigns a set of configuration information, and the sequence number generation device 40 uses the configuration information to complete its own configuration. The ID may include a session ID, a service type ID, and an activity ID, and the user may customize the ID according to the actual needs of the user. In addition, the request information ID start value and the request information ID cutoff value are not unique and can be set according to actual requirements. The port number is also determined based on the actual port type and number.
The serial number generation device 40 transmits a registration request to the registration device 20 after completing its own configuration using the configuration information, and the registration device 20 registers the serial number generation device after receiving the registration request to generate registration information. The registration information is typically in the form of: the serial number generating device registers the node/serial number generating device IP address/number interval; the specific process of registration is as follows: the registration apparatus 20 first searches for a "registration node of the serial number generation apparatus" under the root node, and then creates a new node under the registration node of the serial number generation apparatus, where the new node is used to store the registration information of the serial number generation apparatus (as shown in fig. 2); if the "serial number generation apparatus registration node" does not exist, the registration apparatus 20 first creates a "serial number generation apparatus node" under the root node, and then creates a new node according to the registration information under the serial number generation apparatus registration node. If the node generated by registering certain registration information already exists, the registration fails when the registration information is used for registration again, so that only one sequence number generation device is ensured to be responsible for generating the sequence numbers of the request information in a certain number interval, the generated sequence numbers are all performed according to the sequence of the request information, and errors are avoided. In addition, the registration apparatus 20 stores all node information under all "serial number generation apparatus registration nodes", which is typically stored in the form of a service registration list.
The information collecting device 30 is used for collecting the request information sent by each user, extracting the number of the request information, and determining which number section the request information belongs to. Then obtaining the registration information from the registration device 10, usually obtaining all node information under the "registration node of the serial number generation device", determining which number interval the request information belongs to according to the number of the request information, and then determining the IP address of the serial number generation device according to the number; and then the request information and the sequence number generation request are sent to the sequence number generation device 40 corresponding to the IP address, and after receiving the request signal and the sequence number generation request, the sequence number generation device 40 obtains the sequence number of the request information according to the sequence number generation request and the sequence number of the previous request information. The sequence number of the previous request message usually refers to the sequence number of the request signal that is one time before the request signal and the request for generating the sequence number are received, the sequence number of the previous request message is usually stored in a database, and the sequence number generating device 40 can periodically obtain the sequence number from the database.
The serial number generation system for the request information comprises a configuration device 10, a registration device 20, an information acquisition device 30 and at least one serial number generation device 40; firstly, each serial number generation device 40 acquires corresponding configuration information from the configuration device 10, completes information configuration according to the configuration information, and sends a registration request to the registration device 20; the registration device 20 registers each serial number generation device according to the configuration information to generate corresponding registration information; the registration information comprises an address of the sequence number generation device and a number interval corresponding to the address; the information acquisition device 30 acquires the request information and extracts the number of the request information; acquiring registration information, determining the address of a serial number generation device according to the number interval when the number is in the number interval, and sending request information and a serial number generation request to the serial number generation device corresponding to the address; the sequence number generating means 40 is used for obtaining the sequence number of the request information according to the sequence number generation request and the sequence number of the previous request information. The system comprises a plurality of serial number generating devices 40, each serial number generating device 40 can generate serial numbers for the request information in a certain number interval, and can divide the various request information in different number intervals into different serial number generating devices for serial number generation, so that the time delay of information processing is reduced, and the information processing speed is greatly improved; in addition, the registration information is obtained by registering according to the configuration information, when the configuration information is changed, the registration information can be correspondingly changed, the request information of the number interval which can be processed by the corresponding sequence number generation device can be changed, and the dynamic expansion is very convenient.
In one embodiment, as shown in fig. 3, each sequence number generating device 40 includes a master sequence number generating device 42 and a slave sequence number generating device 44, wherein the master sequence number generating device 42 and the slave sequence number generating device 44 have the same structure; when the master serial number generating device 42 fails, the slave serial number generating device 44 is configured to obtain the same configuration information as the master serial number generating device 42 from the configuration device 10, complete information configuration of the slave serial number generating device according to the configuration information, and send a registration request to the registration device 20; the registration means 20 is configured to register the slave sequence number generation means 44 based on the configuration information, generate registration information of the slave sequence number generation means 44, and delete the registration information of the master sequence number generation means 42.
Specifically, the sequence number generating device 40 includes a master sequence number generating device 42 and a slave sequence number generating device 44, the master sequence number generating device 42 and the slave sequence number generating device 44 are identical in structure and function, only one of the devices is operated at a time, normally, the master sequence number generating device 42 is in an operating state, the slave sequence number generating device 44 is in a standby or standby state, and when the master sequence number generating device 42 fails, the slave sequence number generating device 44 starts to operate. The specific process is as follows: the slave sequence number generation device 44 acquires the same configuration information as the master sequence number generation device 42 from the configuration device 10, completes the information configuration of the slave sequence number generation device according to the configuration information, and sends a registration request to the registration device 20; the registration device 20 registers the slave sequence number generation device 44 based on the configuration information, generates registration information of the slave sequence number generation device 44, and deletes the registration information of the master sequence number generation device 42. In general, the registration apparatus 20 deletes the information node of the master serial number generation apparatus 42 and adds the information node of the slave serial number generation apparatus 44 to the "serial number generation apparatus registration node". The method of the master sequence number generating device 42 and the slave sequence number generating device 44 can ensure that the standby sequence number generating device is started quickly when one sequence number generating device fails, and avoids the problem that the sequence number generating device fails to generate the sequence number of the request information.
In one embodiment, as shown in fig. 3, the system further includes a database 50, and the database 50 is used for storing snapshot information of the sequence number of the history request information.
In one embodiment, the sequence number generation device 40 obtains the sequence number of the information requested in the previous time from the snapshot information in the database.
Specifically, the system for generating the serial number of the request information further includes a database 50, where the database 50 is mainly used to store snapshot information of the serial number of the history request information, and the serial number generation device 40 can obtain snapshot information of the serial number of the history request information from the database 50 by using the snapshot information that includes all the serial numbers of the history request information, that is, obtaining the serial number of the previous request information. A snapshot refers to a fully available copy of a given data set that includes an image of the corresponding data at some point in time (the point in time at which the copy began). The snapshot may be a copy of the data it represents or may be a replica of the data. The snapshot mainly has the function of online data backup and recovery. When the storage device has application failure or file damage, the data can be quickly recovered, and the data can be recovered to the state of an available time point. The snapshot has another function of providing another data access channel for the storage user, so that when the original data is subjected to online application processing, the user can access the snapshot data and can also utilize the snapshot to perform work such as testing. All storage systems, whether high, medium, and low, are applied to online systems, and then snapshot becomes an indispensable function. By adopting the snapshot sequence number capable of rapidly and accurately storing the historical request information, the sequence number of the request information can be effectively ensured to be generated according to the sequence of the request information without errors.
In one embodiment, the sequence number generation device is used for sending the sequence number of the request message to the information acquisition device.
The sequence number generating device sends the sequence number of the request information to the information collecting device after obtaining the sequence number of the request information according to the sequence number generation request and the sequence number of the previous request information, and the signal collecting device sorts the request information according to the sequence number of the request information, so that the request information is processed according to the corresponding sequence.
In one embodiment, as shown in fig. 4, the sequence number generating apparatus 40 includes a configuration module 422, a sequence number calculating module 424, a sequence number snapshot generating module 426, and a registration module 428; the configuration module 422 is configured to obtain configuration information from the configuration device, and complete information configuration according to the configuration information; the registration module 428 is configured to send a registration request to the registration apparatus; the sequence number calculation module 424 is configured to obtain a sequence number of the request information according to the sequence number generation request and the sequence number of the previous request information; the sequence number snapshot generating module 426 is configured to generate snapshot information from the sequence number of each request message, and periodically update the snapshot information to the database.
Specifically, the configuration module 422 is mainly used for reading the configuration information in the registration apparatus 20, completing the corresponding configuration, and updating the corresponding configuration information when the configuration information changes; the sequence number calculation module 424 is configured to generate a sequence number for the request information, and store the generated sequence number in the memory; in the process of generating sequence numbers, atomicity of sequence numbers generated by multiple threads in a certain dimension needs to be guaranteed, and the sequence numbers can be usually implemented by an atomic counter carried by a language, such as AtomicLong of Java. The atomicity means that when a certain calculator is modified by a plurality of threads simultaneously, the numerical value of the calculator is guaranteed to be correct after each thread is modified, and the concurrent control of multiple threads can be generally realized by adopting a CAS optimistic lock. The sequence number snapshot generating module 426 generates a snapshot of the historical request information at a sequence number timing (e.g., 10 seconds) and stores the snapshot in the database. And a timing storage mode is adopted, so that the interaction times with the database are reduced.
In one embodiment, the information acquisition device acquires the registration information from the registration device through the SDK, and sends the request information and the sequence number generation request to the sequence number generation device corresponding to the address.
Specifically, the SDK and software development kit are usually a set of development tools used for establishing application software, such as a specific software package, a software framework, a hardware platform, and an operating system; the method can provide service system calling, provide serial number application, extract registration information and the like, shield a plurality of interaction details for the service system, and ensure usability and development efficiency.
According to the system for generating the sequence number of the request information, the invention also provides a method for generating the sequence number of the request information.
Fig. 5 is a schematic structural diagram of a method for generating a sequence number of request information according to an embodiment of the present invention. As shown in fig. 5, the method for generating a serial number of request information in this embodiment includes an interaction method between a configuration device, a registration device, an information collection device, and at least one serial number generation device; the interaction method comprises the following steps:
step S110, each serial number generation device acquires corresponding configuration information from the configuration device, completes information configuration of each serial number generation device according to the configuration information, and sends a registration request to the registration device;
step S120, the registration device registers each serial number generation device according to the configuration information to generate corresponding registration information; the registration information comprises an address of the sequence number generation device and a number interval corresponding to the address;
step S130, the information acquisition device acquires request information and extracts the number of the request information; acquiring registration information, determining the address of a serial number generation device according to the number interval when the number is in the number interval, and sending request information and a serial number generation request to the serial number generation device corresponding to the address;
in step S140, the sequence number generation device obtains the sequence number of the request information according to the sequence number generation request and the sequence number of the previous request information.
The method for generating the serial number of the request information can be applied to a terminal, and the terminal can be a personal computer, a notebook computer and the like. The terminal can run the serial number of the request information to generate a corresponding application program, and when the text which needs to be subjected to the serial number generation of the request information is input into the application program, the terminal can run the relevant application program, so that the request information is processed, and the corresponding serial number is generated. The terminal comprises an information acquisition device, a configuration device, a registration device, a serial number generation device, a database and the like.
In one embodiment, the method further comprises the following steps: each sequence number generation device comprises a master sequence number generation device and a slave sequence number generation device, wherein the master sequence number generation device and the slave sequence number generation device have the same structure;
when the main sequence number generating device breaks down, the slave sequence number generating device acquires the same configuration information as the main sequence number generating device from the configuration device, completes the information configuration of each sequence number generating device according to the configuration information, and sends a registration request to the registration device;
the registration device registers the slave sequence number generation device according to the configuration information, generates registration information of the slave sequence number generation device, and deletes the registration information of the master sequence number generation device.
In one embodiment, the method further comprises the following steps:
the sequence number generation means acquires the sequence number of the previous request information from the snapshot information in the database.
The above-mentioned request information sequence number generation device adopts the request information sequence number generation method, and thus,
in addition, the method for generating the sequence number of the request information is a method executed in a system for generating the sequence number of the request information, and has corresponding functional modules and beneficial effects of the system, and is not described herein again.
According to the method and the device for generating the sequence number of the request message, the invention further provides a computer device, and the computer device of the invention is described in detail below with reference to the accompanying drawings and the preferred embodiments.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A serial number generation system of request information is characterized by comprising a configuration device, a registration device, an information acquisition device and at least one serial number generation device;
the configuration device is used for storing configuration information;
each sequence number generation device is used for acquiring corresponding configuration information from the configuration device, finishing information configuration of each sequence number generation device according to the configuration information and sending a registration request to the registration device;
the registration device is used for registering each serial number generation device according to the configuration information to generate corresponding registration information; the registration information comprises an address of a sequence number generation device and a number interval corresponding to the address;
the information acquisition device is used for acquiring request information and extracting the number of the request information; acquiring registration information, determining the address of the sequence number generation device according to the number interval when the number is in the number interval, and sending the request information and the sequence number generation request to the sequence number generation device corresponding to the address;
and the sequence number generating device is used for obtaining the sequence number of the request information according to the sequence number generation request and the sequence number of the previous request information.
2. The system of claim 1, wherein each of the sequence number generating means includes a master sequence number generating means and a slave sequence number generating means, wherein the master sequence number generating means and the slave sequence number generating means are identical in structure;
when the master serial number generation device fails, the slave serial number generation device is used for acquiring the same configuration information as the master serial number generation device from the configuration device, completing information configuration of the slave serial number generation device according to the configuration information, and sending a registration request to the registration device;
the registration device is used for registering the slave sequence number generation device according to the configuration information, generating the registration information of the slave sequence number generation device and deleting the registration information of the master sequence number generation device.
3. The system for generating serial number of request message according to claim 2, further comprising a database for storing snapshot information of the serial number of history request message.
4. The system according to claim 3, wherein said sequence number generating means obtains a sequence number of said previous request message from said snapshot message in said database.
5. The system for generating the serial number of the request message according to claim 4, wherein the serial number generating device is configured to send the serial number of the request message to the message collecting device.
6. The system for generating sequence number of request message according to claim 5, wherein: the sequence number generation device comprises a configuration module, a sequence number calculation module, a sequence number snapshot generation module and a registration module;
the configuration module is used for acquiring the configuration information from the configuration device and completing information configuration according to the configuration information;
the registration module is used for sending a registration request to the registration device;
the sequence number calculation module is used for generating a request according to the sequence number and obtaining the sequence number of the request information according to the sequence number of the previous request information;
and the sequence number snapshot generating module is used for generating snapshot information from the sequence number of each request message and periodically updating the snapshot information to the database.
7. The system according to claim 6, wherein the information acquisition device obtains the registration information from the registration device by SDK, and sends the request information and the request for generating the serial number to the serial number generation device corresponding to the address.
8. A method for generating a serial number of request information is characterized by comprising an interaction method among a configuration device, a registration device, an information acquisition device and at least one serial number generation device; the interaction method comprises the following steps:
each sequence number generation device acquires corresponding configuration information from the configuration device, completes information configuration of each sequence number generation device according to the configuration information, and sends a registration request to the registration device;
the registration device registers each serial number generation device according to the configuration information to generate corresponding registration information; the registration information comprises an address of a sequence number generation device and a number interval corresponding to the address;
the information acquisition device acquires request information and extracts the number of the request information; acquiring registration information, determining the address of the sequence number generation device according to the number interval when the number is in the number interval, and sending the request information and the sequence number generation request to the sequence number generation device corresponding to the address;
and the sequence number generating device obtains the sequence number of the request information according to the sequence number generation request and the sequence number of the previous request information.
9. The method for generating the sequence number of the request message according to claim 8, further comprising: each sequence number generation device comprises a master sequence number generation device and a slave sequence number generation device, wherein the master sequence number generation device and the slave sequence number generation device have the same structure;
when the master serial number generation device fails, the slave serial number generation device acquires the same configuration information as the master serial number generation device from the configuration device, completes information configuration of the slave serial number generation device according to the configuration information, and sends a registration request to the registration device;
the registration device registers the slave sequence number generation device according to the configuration information, generates registration information of the slave sequence number generation device, and deletes the registration information of the master sequence number generation device.
10. The method for generating the sequence number of the request message according to claim 9, further comprising:
and the sequence number generating device acquires the sequence number of the previous request information from snapshot information in a database.
CN201910325588.0A 2019-04-22 2019-04-22 System and method for generating serial number of request information Active CN110046192B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910325588.0A CN110046192B (en) 2019-04-22 2019-04-22 System and method for generating serial number of request information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910325588.0A CN110046192B (en) 2019-04-22 2019-04-22 System and method for generating serial number of request information

Publications (2)

Publication Number Publication Date
CN110046192A CN110046192A (en) 2019-07-23
CN110046192B true CN110046192B (en) 2021-08-20

Family

ID=67278553

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910325588.0A Active CN110046192B (en) 2019-04-22 2019-04-22 System and method for generating serial number of request information

Country Status (1)

Country Link
CN (1) CN110046192B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107360224A (en) * 2017-07-07 2017-11-17 携程旅游信息技术(上海)有限公司 Sequence number generation method, system, equipment and storage medium in distributed system
CN108804442A (en) * 2017-04-27 2018-11-13 北京京东尚科信息技术有限公司 Sequence number generation method and device
CN109240848A (en) * 2018-07-27 2019-01-18 阿里巴巴集团控股有限公司 A kind of data object tag generation method and device
CN109491772A (en) * 2018-09-28 2019-03-19 深圳财富农场互联网金融服务有限公司 Business serial number gencration method, apparatus, computer equipment and storage medium

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5159217A (en) * 1991-07-29 1992-10-27 National Semiconductor Corporation Brownout and power-up reset signal generator
KR100475433B1 (en) * 2002-01-25 2005-03-10 삼성전자주식회사 System comprising dynamic random access memory devices and refresh method thereof
KR100755536B1 (en) * 2005-12-15 2007-09-06 주식회사 팬택앤큐리텔 Prevention system for the IP allocation of a cloned mobile phone
CN102769667B (en) * 2012-06-29 2015-01-28 北京奇虎科技有限公司 Method, equipment and system for generating ID
CN105471833B (en) * 2015-05-14 2019-04-16 瑞数信息技术(上海)有限公司 A kind of safe communication method and device
CN105812248A (en) * 2016-05-09 2016-07-27 腾讯科技(深圳)有限公司 Distribution method and device for identification value
CN106572165A (en) * 2016-10-26 2017-04-19 宜人恒业科技发展(北京)有限公司 Distributed global unique ID application method
US10585560B2 (en) * 2016-10-31 2020-03-10 Splunk Inc. Display management for data visualizations of analytics data
CN109376155B (en) * 2018-11-06 2021-07-20 泰康保险集团股份有限公司 ID generation method and device, storage medium and electronic device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108804442A (en) * 2017-04-27 2018-11-13 北京京东尚科信息技术有限公司 Sequence number generation method and device
CN107360224A (en) * 2017-07-07 2017-11-17 携程旅游信息技术(上海)有限公司 Sequence number generation method, system, equipment and storage medium in distributed system
CN109240848A (en) * 2018-07-27 2019-01-18 阿里巴巴集团控股有限公司 A kind of data object tag generation method and device
CN109491772A (en) * 2018-09-28 2019-03-19 深圳财富农场互联网金融服务有限公司 Business serial number gencration method, apparatus, computer equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"基于统计特征的SYN Flood检测方法";刘云等;《软件工程》;20170405(第4期);第4-8页 *

Also Published As

Publication number Publication date
CN110046192A (en) 2019-07-23

Similar Documents

Publication Publication Date Title
US11632441B2 (en) Methods, systems, and devices for electronic note identifier allocation and electronic note generation
CN108681565B (en) Block chain data parallel processing method, device, equipment and storage medium
CN106407430B (en) A kind of intelligent contract state synchronization method of complexity based on stage bucket
CN108470298B (en) Method, device and system for transferring resource numerical value
CN110096336B (en) Data monitoring method, device, equipment and medium
CN110247984B (en) Service processing method, device and storage medium
CN110309161B (en) Data synchronization method and device and server
CN111399764B (en) Data storage method, data reading device, data storage equipment and data storage medium
CN105468718B (en) Data consistency processing method, device and system
CN110134503B (en) Timed task processing method and device in cluster environment and storage medium
CN114092252A (en) Block chain transaction execution method, device, equipment and readable storage medium
CN111784329A (en) Service data processing method and device, storage medium and electronic device
CN108520401B (en) User list management method, device, platform and storage medium
CN110674029A (en) Method and device for automatically generating test data, electronic equipment and storage medium
CN110046192B (en) System and method for generating serial number of request information
CN110502574B (en) Cross-system information synchronization method, user equipment, storage medium and device
CN112231395A (en) Transaction data synchronization method and server
KR19980079668A (en) Parallel Data Processing System and Its Control Method
CN114443294B (en) Big data service component deployment method, system, terminal and storage medium
CN109389271B (en) Application performance management method and system
CN115454971A (en) Data migration method and device, electronic equipment and storage medium
CN110569231B (en) Data migration method, device, equipment and medium
CN110085237B (en) Recovery method, device and equipment of interactive process
CN114356925A (en) Identification generation method and device, electronic equipment and storage medium
CN107704557B (en) Processing method and device for operating mutually exclusive data, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant