CN111159211B - Order information generation method, device, system, computer equipment and storage medium - Google Patents
Order information generation method, device, system, computer equipment and storage medium Download PDFInfo
- Publication number
- CN111159211B CN111159211B CN201911420519.4A CN201911420519A CN111159211B CN 111159211 B CN111159211 B CN 111159211B CN 201911420519 A CN201911420519 A CN 201911420519A CN 111159211 B CN111159211 B CN 111159211B
- Authority
- CN
- China
- Prior art keywords
- order information
- order
- information generation
- service
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 50
- 230000015654 memory Effects 0.000 claims description 8
- 230000008569 process Effects 0.000 description 13
- 238000010586 diagram Methods 0.000 description 9
- 230000003287 optical effect Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
- G06F16/2308—Concurrency control
- G06F16/2315—Optimistic concurrency control
- G06F16/2322—Optimistic concurrency control using timestamps
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2458—Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
- G06F16/2471—Distributed queries
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q30/00—Commerce
- G06Q30/06—Buying, selling or leasing transactions
- G06Q30/0601—Electronic shopping [e-shopping]
- G06Q30/0633—Lists, e.g. purchase orders, compilation or processing
- G06Q30/0635—Processing of requisition or of purchase orders
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Business, Economics & Management (AREA)
- Finance (AREA)
- Accounting & Taxation (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Computational Linguistics (AREA)
- Probability & Statistics with Applications (AREA)
- Mathematical Physics (AREA)
- Fuzzy Systems (AREA)
- Development Economics (AREA)
- Economics (AREA)
- Marketing (AREA)
- Strategic Management (AREA)
- General Business, Economics & Management (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The disclosure discloses an order information generation method, an order information generation device, an order information generation system, computer equipment and a storage medium, and relates to the technical field of computers. The method comprises the following steps: the database receives an order information generation request sent by a service server of a target service; the database determines the sequence identifier corresponding to the current received order information generation request based on the sequence identifier corresponding to the last received order information generation request; the database generates an order number corresponding to the order information generation request based on the sequence identifier corresponding to the current received order information generation request, the current time information and the service identifier of the target service; the order number is stored and transmitted to the service server to cause the service server to generate order information based on the order number. By adopting the method provided by the embodiment of the disclosure, the order information generation efficiency can be improved.
Description
Technical Field
The disclosure relates to the field of computer technology, and in particular, to a method, a device, a system, computer equipment and a storage medium for generating order information.
Background
Today, the rapid development of the internet requires various order numbers in various business scenarios to distinguish different orders, so as to meet business requirements. In the whole internet, since the order numbers of each order are different, the service server can determine the corresponding unique order based on the order numbers.
At least one service server exists in the system, and each service server contains at least one service, and each service in each service server can generate orders. When the service server generates an order corresponding to a certain service, in order to generate an order number corresponding to the order, the service server needs to send a query request to the database, where the query request is used for indicating the database to query the latest stored order number in the database. After the database receives the query request, the database queries and acquires the latest stored order number in the database, and sends the latest stored order number to the service server. After receiving the latest stored order number, the service server adds one to the corresponding value of the order number, generates a newly generated order number, and sends a storage request carrying the newly generated order number to the database. After the database receives the storage request, the newly generated order numbers are stored in the database, so that the order numbers stored in the database are updated, and after the database is updated, query requests sent by other servers are processed.
In the above technical solution for generating order numbers, after a service server sends a query request to a database, if the service server has not sent the generated order numbers to the database, in order to avoid confusion of the order numbers, the database cannot process query requests sent by other service servers until the service server feeds back the newly generated order numbers, which may result in low order information generation efficiency.
Disclosure of Invention
The embodiment of the disclosure provides a method, a device, a system, computer equipment and a storage medium for generating order information, which can solve the problem of low order information generation efficiency in the prior art. The technical scheme is as follows:
In one aspect, there is provided an order information generating method, the method comprising:
The database receives an order information generation request sent by a service server of a target service;
the database determines the sequence identifier corresponding to the current received order information generation request based on the sequence identifier corresponding to the last received order information generation request;
the database generates an order number corresponding to the order information generation request based on the sequence identifier corresponding to the current received order information generation request, the current time information and the service identifier of the target service;
The order number is stored and transmitted to the service server to cause the service server to generate order information based on the order number.
In one embodiment of the present disclosure, the determining, by the database, the sequence identifier corresponding to the currently received order information generating request based on the sequence identifier corresponding to the last received order information generating request includes:
Acquiring a sequence identifier corresponding to a last received order information generation request;
and adding one obtained value to the value of the sequence identifier corresponding to the last received order information generation request to serve as the sequence identifier corresponding to the current received order information generation request.
In one embodiment of the present disclosure, the database generates an order number corresponding to an order information generation request based on a sequence identifier corresponding to the currently received order information generation request, current time information, and a service identifier of a target service, and includes:
and sequentially connecting the sequence identifier corresponding to the currently received order information generation request, the current time information and the service identifier of the target service to obtain an order number corresponding to the order information generation request.
In one embodiment of the present disclosure, the database stores order numbers, including:
The database stores the order numbers in the database according to the long data type, wherein the length of the stored order numbers is 8 bytes.
In one embodiment of the present disclosure, after the database stores the order number and sends the order number to the service server, the method further includes:
the method comprises the steps that a database receives an order storage notice sent by a service server, wherein the order storage notice carries an order number and order information;
The database stores order information in correspondence with order numbers.
In one aspect, an order information generating method is provided, which is applied to an order information generating system, wherein the order information generating system comprises a terminal, a service server of multiple services and a database, and the method comprises the following steps:
the terminal sends an order request to a service server of a target service;
A service server of the target service sends an order information generation request to a database;
The database determines the sequence identifier corresponding to the current received order information generation request based on the sequence identifier corresponding to the last received order information generation request, generates an order number corresponding to the order information generation request based on the sequence identifier corresponding to the current received order information generation request, the current time information and the service identifier of the target service, stores the order number, and sends the order number to the service server of the target service;
A service server of a target service sends an order information filling request to a terminal, wherein the order information filling request carries an order number and initial order information;
the terminal displays initial order information, acquires supplementary order information input by a user, generates order information based on the initial order information and the supplementary order information, and sends the order information to a service server of a target service;
the service server of the target service sends an order storage notice to the database, wherein the order storage notice carries an order number and order information;
The database stores order information in correspondence with order numbers.
In one aspect, there is provided an order information generating apparatus, the apparatus comprising:
the receiving module is used for receiving an order information generation request sent by a service server of the target service by the database;
The determining module is used for determining the sequence identifier corresponding to the current received order information generating request based on the sequence identifier corresponding to the last received order information generating request by the database;
the generation module is used for generating order numbers corresponding to the order information generation requests based on the sequence identifications corresponding to the current received order information generation requests, the current time information and the service identifications of the target service by the database;
And the storage module is used for storing the order number in the database and sending the order number to the service server so that the service server can generate order information based on the order number.
In one embodiment of the disclosure, the determining module is configured to:
Acquiring a sequence identifier corresponding to a last received order information generation request;
and adding one obtained value to the value of the sequence identifier corresponding to the last received order information generation request to serve as the sequence identifier corresponding to the current received order information generation request.
In one embodiment of the disclosure, the generating module is configured to:
and sequentially connecting the sequence identifier corresponding to the currently received order information generation request, the current time information and the service identifier of the target service to obtain an order number corresponding to the order information generation request.
In one embodiment of the present disclosure, the storage module is configured to:
The database stores the order numbers in the database according to the long data type, wherein the length of the stored order numbers is 8 bytes.
In one embodiment of the disclosure, the apparatus further includes a corresponding storage module configured to:
the method comprises the steps that a database receives an order storage notice sent by a service server, wherein the order storage notice carries an order number and order information;
The database stores order information in correspondence with order numbers.
In one aspect, an order information generating system is provided, comprising a terminal, a service server for multiple services and a database, wherein,
The terminal is used for sending an order request to a service server of the target service; and displaying the initial order information, acquiring the supplementary order information input by the user, generating order information based on the initial order information and the supplementary order information, and sending the order information to a service server of the target service
The business server is used for sending an order information generation request to the database; an order information filling request is sent to a terminal, wherein the order information filling request carries an order number and initial order information; sending an order storage notice to a database, wherein the order storage notice carries an order number and order information;
the database is used for determining the sequence identifier corresponding to the current received order information generation request based on the sequence identifier corresponding to the last received order information generation request, generating an order number corresponding to the order information generation request based on the sequence identifier corresponding to the current received order information generation request, the current time information and the service identifier of the target service, storing the order number and sending the order number to the service server of the target service; the order information is stored in correspondence with the order number.
In one aspect, a computer device is provided that includes one or more processors and one or more memories having stored therein at least one instruction that is loaded and executed by the one or more processors to implement operations performed by an order information generation method as any of the possible implementations described above.
In one aspect, a computer-readable storage medium having stored therein at least one instruction that is loaded and executed by a processor to implement operations performed by an order information generation method as any one of the possible implementations described above is provided.
The technical scheme provided by the embodiment of the disclosure has the beneficial effects that at least:
According to the embodiment of the disclosure, after receiving an order information generation request of a service server, a database determines a sequence identifier corresponding to a current received order information generation request according to a sequence identifier corresponding to a last received order information generation request, and generates an order number corresponding to the order information generation request by the sequence identifier corresponding to the current received order information generation request, current time information and the service identifier of the target service, and stores and feeds back the order number to the corresponding service server. In the process of generating the order number, the process of generating the order number is performed in the database, namely, the order number is generated locally, so that query requests sent by other service servers can be processed without waiting for the service servers to feed back the order number, and the efficiency of order information generation is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present disclosure, and other drawings may be obtained according to these drawings without inventive effort for a person of ordinary skill in the art.
Fig. 1 is a flowchart of an order information generating method according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of an order information generation system for generating order information provided by an embodiment of the present disclosure;
fig. 3 is a schematic diagram of an order information generating apparatus provided in an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of an order information generation system provided by an embodiment of the present disclosure;
Fig. 5 is a schematic structural diagram of a computer device according to an embodiment of the present disclosure.
Detailed Description
For the purposes of clarity, technical solutions and advantages of the present disclosure, the following further details the embodiments of the present disclosure with reference to the accompanying drawings.
The method for generating order information provided in the embodiment may be applied to a terminal or may be executed in a server. The terminal can be a mobile terminal such as a mobile phone, a tablet computer, a notebook computer and the like, or a fixed terminal such as a desktop computer and the like. The server may be a single server or a server group, if the server is a single server, the server may be responsible for all the processes in the following schemes, if the server is a server group, different servers in the server group may be respectively responsible for different processes in the following schemes, and specific process allocation conditions may be set by technicians according to actual requirements at will, which will not be described herein.
The method of the embodiment of the disclosure can be applied to a shopping platform, a take-out platform, a ordering system of a music platform or other platforms. Specifically, the user can purchase goods according to the needs of the user, and when payment is needed, the terminal can generate and display an order, so that the user can acquire order information conveniently. In the process of generating orders by the terminal, the terminal sends an order number acquisition request to the service server, and acquires the order number sent to the terminal by the service server. The terminal generates an initial order according to the order number, and generates a complete order after the user fills in the user information. At this point, after the terminal obtains the complete order, the user may complete the payment.
Fig. 1 is a schematic diagram of an order information generating method according to an embodiment of the present disclosure. The method may be applied to any computer device, which may be a server. Referring to fig. 1, the process flow of the method includes:
101. the database receives an order information generation request sent by a service server of a target service.
The target service may be a service that needs order information generation. At least one service is included in the service server, and each service may generate at least one order. The order may be a shopping order or a take-out order, and the type of the order is not limited here.
In implementation, when a target service in a certain service server generates a target order, the service server sends an order information generation request carrying a target service identifier to a database, wherein the order generation request is used for indicating the database to generate an order number corresponding to the target order. The database receives an order information generation request sent by a service server of the target service.
It should be noted that, in a plurality of processes, the database may be respectively connected with a plurality of service servers, so that the plurality of service servers may access the database at any time, that is, when the database generates an order number for a certain service server, the database allows other service servers to access the database.
102. The database determines the sequence identifier corresponding to the current received order information generation request based on the sequence identifier corresponding to the last received order information generation request.
Wherein the order identifier may be used to indicate an order in which the order was generated.
In implementation, when the database receives an order information generation request currently sent by a service server of a target service, the database queries and acquires a sequence identifier corresponding to the last received order information generation request, and adds one to the value of the acquired sequence identifier to obtain a new value. The database takes the new value as the sequence identifier corresponding to the order information generation request.
In practice, the database may be a Key-Value type (Key-Value) database, such as a remote dictionary service (Remote Dictionary Server, redis) database. And receiving a current order information generation request sent by any service server in the Redis database, and inquiring and acquiring a sequence identifier corresponding to the last order information generation request by the Redis database. After the Redis database obtains the sequence identifier corresponding to the previous order information generation request, the Redis database executes an INCR (increment register) command to enable the Redis database to add one to the value of the sequence identifier corresponding to the previous order information generation request, and obtain a new value after adding one to the value. The Redis database takes the new value as the sequence identifier corresponding to the current received order information generation request.
In one embodiment of the present disclosure, the data type sequentially identified in the Redis database is a data type in Key-Value, and the Value of Key-Value is stored. When the Redis database receives the current order information generation request, the order identifier corresponding to the last received order information generation request is acquired, and an INCR command is executed, wherein the INCR command is used for indicating the database to execute the 1 adding operation on the key value corresponding to the order identifier, and the key value can be a serial number arranged in sequence. The database obtains a new value after adding one to the value, determines the new value as the sequence identifier corresponding to the currently received order information generation request, and correspondingly, the Redis database generates a corresponding key value from the sequence identifier of the currently received order information generation request and stores the key value.
The sequence identifier may be a 5-bit number, the sequence may be increased from 00000, and when the threshold 99999 is reached, the value is initialized to 0, and the INCR command is re-executed to increase.
When the first service server sends the order request information to the database, the database cannot acquire the sequence identifier corresponding to the last received order information generation request because the last received order information generation request is not received in the current database, and at this time, the database can generate an initial sequence identifier, the initial sequence identifier value can be 00000, and the initial sequence identifier is used as the sequence identifier corresponding to the last received order information generation request.
103. The database generates an order number corresponding to the order information generation request based on the sequence identifier corresponding to the current received order information generation request, the current time information and the service identifier of the target service.
The current time information may be a time point of an order information generation request sent by the service server, or a time point of a sequence identifier corresponding to the order generated by the database, or a time point of the order generated by the service server. The service identification may indicate information of the target service, such as merchandise information.
In implementation, the order information request carries a service identifier of the target service. After the database generates the sequence identifier of the current order, the database analyzes the order information request and obtains the service identifier of the target service in the order information request. The database sequentially connects the current time information corresponding to the order information generation request received by the database, the service identification of the target service and the sequence identification to obtain an order number corresponding to the order information generation request.
Specifically, the database sequentially connects the timestamp value in the current time information, the identification value corresponding to the service identification of the target service and the value corresponding to the sequence identification, and the connected value is obtained. The database determines the connected numerical value as an order number corresponding to the order information generation request.
For example, the technician may preset the order number to be 19 digits, and set the specific format of each order number to be: the database generates an order number 1910200914212200001 with 12 bits of current time information+2 bits of service identification+5 bits of sequence identification, wherein 191020091421 is the current time information, and the information can contain time information accurate to seconds, for example 191020091421 contains time information of 19 years, 12 months, 20 points, 14 minutes and 21 seconds, 22 is the service identification, and 00001 is the sequence identification.
The time information, the service identifier and the sequence identifier in the order number are all positive integers.
104. The order number is stored and transmitted to the service server to cause the service server to generate order information based on the order number.
Wherein, the database can set the data type of each order number as long data type when storing the order number.
In practice, the database background may count the number of generated order numbers per predetermined time interval. And counting the number of the order numbers in the background of the database, and storing the counted order numbers into the database after the number reaches the preset number, so as to reduce the access pressure of the database.
It should be noted that the database may store the order numbers in the database in batches.
In one embodiment of the present disclosure, after the database returns the order number generated by the database to the service server where the target service is located through the process corresponding to the target service, the service server may send an order storage notification to the database, where the order storage notification carries the order number and the order information of the target order. After the database receives the order storage notice, the database establishes the corresponding relation between the order information of the target order and the order number, and stores the corresponding relation in the database.
Fig. 2 is a schematic diagram of generating order information by an order information generating system according to an embodiment of the present disclosure, where the system includes a terminal, a service server for multiple services, and a database, and referring to fig. 2, the embodiment includes the following steps:
201. and the terminal sends an order request to a service server of the target service.
In implementation, after receiving an order generation instruction of an order, the terminal inquires a target service corresponding to the order, finds a corresponding service server according to the target service, and sends an order request of the target service to the service server, wherein the order request is used for indicating the service server to send an order number corresponding to the order to the terminal.
202. And the service server of the target service sends an order information generation request to the database.
The target service is a service requiring order information generation. At least one service is included in the service server, and each service may generate at least one order. The order may be a shopping order or a take-out order, and the type of the order is not limited here.
In implementation, when a target service in a certain service server generates a target order, the service server sends an order information generation request carrying a target service identifier to a database, wherein the order information generation request is used for indicating the database to generate order information corresponding to the target order. The database receives an order information generation request sent by a service server of the target service.
It should be noted that, in a plurality of processes, the database may be respectively connected with a plurality of service servers, so that the plurality of service servers may access the database at any time, that is, when the database generates order information for a certain service server, the database allows other service servers to access the database.
203. The database determines the sequence identifier corresponding to the current received order information generation request based on the sequence identifier corresponding to the last received order information generation request, generates an order number corresponding to the order information generation request based on the sequence identifier corresponding to the current received order information generation request, the current time information and the service identifier of the target service, stores the order number, and sends the order number to the service server of the target service.
In implementation, when the database receives an order information generation request currently sent by a service server of the target service, the order information request carries a service identifier of the target service. The database queries and acquires the sequence identifier corresponding to the last received order information generation request, and adds one value of the acquired sequence identifier to obtain a new value. The database takes the new value as the sequence identifier corresponding to the order information generation request. After the database obtains the sequence identification of the current order, the database analyzes the order information request and obtains the service identification of the target service in the order information request. The database sequentially connects the current time information corresponding to the order information generation request received by the database, the service identification of the target service and the sequence identification to obtain an order number corresponding to the order information generation request.
Specifically, the timestamp value in the current time information, the identification value corresponding to the service identification of the target service and the value corresponding to the sequence identification are sequentially connected, and the connected value is obtained. And determining the connected numerical value as an order number corresponding to the order information generation request.
For example, the technician may preset the order number to be 19 digits, and set the specific format of each order number to be: the database generates an order number 1910200914212200001 with 12 bits of current time information+2 bits of service identification+5 bits of sequence identification, wherein 191020091421 is the current time information, and the information can contain time information accurate to seconds, for example 191020091421 contains time information of 19 years, 12 months, 20 points, 14 minutes and 21 seconds, 22 is the service identification, and 00001 is the sequence identification.
The time information, the service identifier and the sequence identifier in the order number are all positive integers.
In practice, the database may be a Key-Value type (Key-Value) database, such as a remote dictionary service (Remote Dictionary Server, redis) database. And receiving a current order information generation request sent by any service server in the Redis database, and inquiring and acquiring a sequence identifier corresponding to the last order information generation request by the Redis database. After the Redis database obtains the sequence identifier corresponding to the last order information generation request, the Redis database executes an INCR command to enable the Redis database to add one to the value of the sequence identifier corresponding to the last order information generation request, and obtain a new value after adding one to the value. The Redis database takes the new value as the sequence identifier corresponding to the current received order information generation request.
In one embodiment of the present disclosure, the Value of the sequence identifier in the Redis database is stored in a data type of Key-Value, after receiving the current order information generation request, the sequence identifier corresponding to the last received order information generation request is obtained, and an INCR command is executed, where the INCR command performs an add 1 operation on the Key Value corresponding to the sequence identifier, the Key Value may be a serial number arranged in sequence, and returns an added Value, the added Value is determined as the sequence identifier corresponding to the current received order information generation request, and accordingly, the Redis database generates a corresponding Key Value from the sequence identifier of the current received order information generation request and stores the corresponding Key Value.
In one embodiment of the present disclosure, the sequence identification may be a 5-bit number, the sequence may be incremented starting from 00000, and when the threshold 99999 is reached, the value is initialized to 0, and the INCR command is re-executed to increment.
When the first service server sends the order request information to the database, the database cannot acquire the sequence identifier corresponding to the last received order information generation request because the last received order information generation request is not received in the current database, and at this time, the database can generate an initial sequence identifier, the initial sequence identifier value can be 00000, and the initial sequence identifier is used as the sequence identifier corresponding to the last received order information generation request.
204. And the service server of the target service sends an order information filling request to the terminal, wherein the order information filling request carries an order number and initial order information.
The initial order information may be merchandise information selected by the user, or other information.
In implementation, after the service server receives the order number sent by the database, the service server of the target service sends an order information filling request to the terminal, so as to obtain complete order information.
205. The terminal displays the initial order information, acquires the supplementary order information input by the user, generates order information based on the initial order information and the supplementary order information, and sends the order information to a service server of the target service.
The supplementary order information can be the address of the user or the contact mode of the user, and the order information comprises initial order information sent by the service server and supplementary order information input by the user.
In implementation, a terminal receives an order information filling request sent by a service server, obtains an order number and initial order information in the order information filling request, displays the order number and the initial order information, combines the initial order information and the supplementary order information together, generates order information, and sends the order information to the service server.
206. The service server of the target service sends an order storage notice to the database.
The order storage notice carries an order number and order information.
In implementation, after the service server of the target service receives the order information sent by the terminal, the service server of the target service sends an order storage notice carrying an order number and the order information to the database.
207. The database stores order information in correspondence with order numbers.
In implementation, when the database receives an order storage notice sent by the service server, the database acquires an order number and order information in the order storage notice, establishes a corresponding relation between the order number and the order information, and stores the corresponding relation in the database.
The embodiment of the disclosure discloses an order information generation method, wherein a database receives an order information generation request sent by a service server of a target service, and determines a sequence identifier corresponding to a currently received order information generation request according to a sequence identifier corresponding to a last received order information generation request. The database generates an order number corresponding to the order information generation request based on the sequence identifier corresponding to the current received order information generation request, the current time information and the service identifier of the target service. The database stores the order number and sends the order number to the service server. In the process of generating the order number, the process of generating the order number is performed in the database, namely, the order number is generated locally, so that query requests sent by other service servers can be processed without waiting for the service servers to feed back the order number, and the efficiency of order information generation is improved.
Any combination of the above-mentioned optional solutions may be adopted to form an optional embodiment of the present disclosure, which is not described herein in detail.
The following are device embodiments of the present disclosure that may be used to perform method embodiments of the present disclosure. For details not disclosed in the embodiments of the apparatus of the present disclosure, please refer to the embodiments of the method of the present disclosure. Fig. 3 is a schematic diagram of an order information generating apparatus according to an embodiment of the present disclosure. Referring to fig. 3, the apparatus includes:
A receiving module 301, configured to receive an order information generating request sent by a service server of a target service from a database;
A determining module 302, configured to determine, by using the database, a sequence identifier corresponding to a currently received order information generation request based on a sequence identifier corresponding to a last received order information generation request;
The generating module 303 is configured to generate, by using the database, an order number corresponding to the order information generating request based on a sequence identifier corresponding to the currently received order information generating request, current time information, and a service identifier of the target service;
The storage module 304 is configured to store the order number in the database, and send the order number to the service server, so that the service server generates order information based on the order number.
In one embodiment of the present disclosure, the determining module 302 is configured to:
Acquiring a sequence identifier corresponding to a last received order information generation request;
and adding one obtained value to the value of the sequence identifier corresponding to the last received order information generation request to serve as the sequence identifier corresponding to the current received order information generation request.
In one embodiment of the present disclosure, the generating module 303 is configured to:
and sequentially connecting the sequence identifier corresponding to the currently received order information generation request, the current time information and the service identifier of the target service to obtain an order number corresponding to the order information generation request.
In one embodiment of the present disclosure, the storage module 304 is configured to:
The database stores the order numbers in the database according to the long data type, wherein the length of the stored order numbers is 8 bytes.
In one embodiment of the disclosure, the apparatus further includes a corresponding storage module configured to:
the method comprises the steps that a database receives an order storage notice sent by a service server, wherein the order storage notice carries an order number and order information;
The database stores order information in correspondence with order numbers.
Fig. 4 is a schematic diagram of an order information generating system according to an embodiment of the present disclosure, which is applied to an order information generating system 400, where the order information generating system 400 includes a terminal 401, a service server 402 for multiple services, and a database 403. Referring to fig. 4, the apparatus is for:
A terminal 401, configured to send an order request to a service server of a target service; and displaying the initial order information, acquiring the supplementary order information input by the user, generating order information based on the initial order information and the supplementary order information, and sending the order information to a service server of the target service
A service server 402 for sending an order information generation request to a database; an order information filling request is sent to a terminal, wherein the order information filling request carries an order number and initial order information; sending an order storage notice to a database, wherein the order storage notice carries an order number and order information;
a database 403, configured to determine a sequence identifier corresponding to a currently received order information generation request based on a sequence identifier corresponding to a last received order information generation request, generate an order number corresponding to the order information generation request based on the sequence identifier corresponding to the currently received order information generation request, current time information, and a service identifier of a target service, store the order number, and send the order number to a service server of the target service; the order information is stored in correspondence with the order number.
Fig. 5 is a schematic structural diagram of a computer device provided in an embodiment of the disclosure, where the computer device 500 may include one or more processors (central processing units, CPU) 501 and one or more memories 502, where at least one instruction is stored in the memory 302, and the at least one instruction is loaded and executed by the processor 501 to implement the page drop rate determining method provided in the foregoing method embodiments. Of course, the computer device may also have a wired or wireless network interface, a keyboard, an input/output interface, and other components for implementing the functions of the device, which are not described herein.
In an exemplary embodiment, a computer readable storage medium, such as a memory including instructions executable by a processor in a terminal to perform the order information generation method of the above embodiment is also provided. For example, the computer readable storage medium may be Read-Only Memory (ROM), random-access Memory (Random Access Memory, RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program for instructing relevant hardware, where the program may be stored in a computer readable storage medium, and the above storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The foregoing description of the preferred embodiments of the present disclosure is not intended to limit the disclosure, but rather to cover any and all modifications, equivalents, improvements or alternatives falling within the spirit and principles of the present disclosure.
Claims (8)
1. An order information generating method, characterized by being applied to a database, the database being connected with a plurality of service servers, comprising:
Receiving order information generation requests sent by a service server of target service in a plurality of service servers; wherein, the service server comprises at least one service;
Acquiring a sequence identifier corresponding to a last received order information generation request, wherein the sequence identifier is a 5-bit number;
Adding one obtained value to the value of the sequence identifier corresponding to the last received order information generation request as the sequence identifier corresponding to the current received order information generation request; when the numerical value of the sequence identifier corresponding to the last received order information generation request reaches a threshold value, the sequence identifier corresponding to the current received order information generation request is obtained by initializing the numerical value of the sequence identifier to 00000 and adding one;
Generating an order number corresponding to the order information generation request based on the sequence identifier corresponding to the current received order information generation request, current time information and the service identifier of the target service;
And storing the order number based on the long data type, and sending the order number to the service server so that the service server generates order information based on the order number, wherein the length of the stored order number is 8 bytes.
2. The method of claim 1, wherein the database generating an order number corresponding to the order information generation request based on the order identification corresponding to the currently received order information generation request, current time information, and a service identification of the target service comprises:
and sequentially connecting the sequence identifier corresponding to the currently received order information generation request, the current time information and the service identifier of the target service to obtain an order number corresponding to the order information generation request.
3. The method according to any one of claims 1-2, wherein after the database stores the order number and sends the order number to the service server, the method further comprises:
The database receives an order storage notice sent by the service server, wherein the order storage notice carries the order number and order information;
The database stores the order information in correspondence with the order number.
4. An order information generating method, which is applied to an order information generating system, wherein the order information generating system comprises a terminal, a plurality of business servers and a database, the database is connected with the plurality of business servers, and the method comprises the following steps:
The terminal sends an order request to a service server of a target service in a plurality of service servers; wherein, the service server comprises at least one service;
The service server of the target service sends an order information generation request to the database;
The database acquires a sequence identifier corresponding to a last received order information generation request, wherein the sequence identifier is a 5-bit number; adding one obtained value to the value of the sequence identifier corresponding to the last received order information generation request as the sequence identifier corresponding to the current received order information generation request; when the numerical value of the sequence identifier corresponding to the last received order information generation request reaches a threshold value, the sequence identifier corresponding to the current received order information generation request is obtained by initializing the numerical value of the sequence identifier to 00000 and adding one; generating an order number corresponding to the order information generation request based on a sequence identifier corresponding to the current received order information generation request, current time information and a service identifier of the target service, storing the order number based on a long data type, and sending the order number to a service server of the target service, wherein the length of the stored order number is 8 bytes;
the service server of the target service sends an order information filling request to the terminal, wherein the order information filling request carries the order number and initial order information;
the terminal displays the initial order information, acquires supplementary order information input by a user, generates order information based on the initial order information and the supplementary order information, and sends the order information to a service server of the target service;
the service server of the target service sends an order storage notice to the database, wherein the order storage notice carries the order number and the order information;
The database stores the order information in correspondence with the order number.
5. An order information generating apparatus, characterized by being applied to a database, the database having connections established with a plurality of service servers, comprising:
The receiving module is used for receiving an order information generation request sent by a service server of a target service in the plurality of service servers by the database; wherein, the service server comprises at least one service;
the determining module is used for acquiring a sequence identifier corresponding to a last received order information generation request from the database, wherein the sequence identifier is a 5-bit number; adding one obtained value to the value of the sequence identifier corresponding to the last received order information generation request as the sequence identifier corresponding to the current received order information generation request; when the numerical value of the sequence identifier corresponding to the last received order information generation request reaches a threshold value, the sequence identifier corresponding to the current received order information generation request is obtained by initializing the numerical value of the sequence identifier to 00000 and adding one;
The generation module is used for generating order numbers corresponding to the order information generation requests based on the sequence identifiers corresponding to the current received order information generation requests, the current time information and the service identifiers of the target service by the database;
The storage module is used for storing the order number based on the long data type by the database and sending the order number to the service server so that the service server generates order information based on the order number, wherein the length of the stored order number is 8 bytes.
6. An order information generating system is characterized by comprising a terminal, a plurality of business servers and a database, wherein the database is connected with the plurality of business servers,
The terminal is used for sending an order request to a service server of a target service in a plurality of service servers, wherein the service server comprises at least one service; the initial order information is displayed, the supplementary order information input by a user is obtained, the order information is generated based on the initial order information and the supplementary order information, and the order information is sent to a service server of the target service;
The business server is used for sending an order information generation request to the database; sending an order information filling request to the terminal, wherein the order information filling request carries the order number and the initial order information; sending an order storage notice to the database, wherein the order storage notice carries the order number and the order information;
The database is used for acquiring a sequence identifier corresponding to a last received order information generation request, wherein the sequence identifier is a 5-bit number; adding one obtained value to the value of the sequence identifier corresponding to the last received order information generation request as the sequence identifier corresponding to the current received order information generation request; when the numerical value of the sequence identifier corresponding to the last received order information generation request reaches a threshold value, the sequence identifier corresponding to the current received order information generation request is obtained by initializing the numerical value of the sequence identifier to 00000 and adding one; generating an order number corresponding to the order information generation request based on a sequence identifier corresponding to the current received order information generation request, current time information and a service identifier of the target service, storing the order number based on a long data type, and sending the order number to a service server of the target service, wherein the length of the stored order number is 8 bytes; and storing the order information corresponding to the order number.
7. A computer device comprising one or more processors and one or more memories having stored therein at least one instruction that is loaded and executed by the one or more processors to implement the operations performed by the order information generation method of any of claims 1-3.
8. A computer readable storage medium having stored therein at least one instruction that is loaded and executed by a processor to implement the operations performed by the order information generation method of any of claims 1 to 3.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911420519.4A CN111159211B (en) | 2019-12-31 | 2019-12-31 | Order information generation method, device, system, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911420519.4A CN111159211B (en) | 2019-12-31 | 2019-12-31 | Order information generation method, device, system, computer equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111159211A CN111159211A (en) | 2020-05-15 |
CN111159211B true CN111159211B (en) | 2024-06-07 |
Family
ID=70560348
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911420519.4A Active CN111159211B (en) | 2019-12-31 | 2019-12-31 | Order information generation method, device, system, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111159211B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112184367B (en) * | 2020-09-17 | 2024-05-24 | 北京同邦卓益科技有限公司 | Order processing method and device |
CN114546297B (en) * | 2020-11-25 | 2024-02-27 | 顺丰科技有限公司 | Order data processing method, device, system, computer equipment and storage medium |
CN112733499A (en) * | 2021-01-05 | 2021-04-30 | 中国工商银行股份有限公司 | Serial number generation method and device |
CN113011945A (en) * | 2021-03-16 | 2021-06-22 | 深圳市微创云启科技有限公司 | Order number generation method and device, terminal equipment and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP2608130A1 (en) * | 2011-12-22 | 2013-06-26 | France Telecom | Order identifiers |
CN104750872A (en) * | 2015-04-22 | 2015-07-01 | 海南易建科技股份有限公司 | Method and device for searching service object |
CN105099889A (en) * | 2015-07-24 | 2015-11-25 | 拉扎斯网络科技(上海)有限公司 | Order notification method, device and system |
CN105404953A (en) * | 2015-10-23 | 2016-03-16 | 努比亚技术有限公司 | Identification generation method and apparatus |
WO2017096928A1 (en) * | 2015-12-09 | 2017-06-15 | 惠州Tcl移动通信有限公司 | Multi-terminal mapping system and method for virtual sim card |
CN107967284A (en) * | 2016-10-20 | 2018-04-27 | 北京京东尚科信息技术有限公司 | Method and apparatus for storing, inquiring about sequence information |
-
2019
- 2019-12-31 CN CN201911420519.4A patent/CN111159211B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP2608130A1 (en) * | 2011-12-22 | 2013-06-26 | France Telecom | Order identifiers |
CN104750872A (en) * | 2015-04-22 | 2015-07-01 | 海南易建科技股份有限公司 | Method and device for searching service object |
CN105099889A (en) * | 2015-07-24 | 2015-11-25 | 拉扎斯网络科技(上海)有限公司 | Order notification method, device and system |
CN105404953A (en) * | 2015-10-23 | 2016-03-16 | 努比亚技术有限公司 | Identification generation method and apparatus |
WO2017096928A1 (en) * | 2015-12-09 | 2017-06-15 | 惠州Tcl移动通信有限公司 | Multi-terminal mapping system and method for virtual sim card |
CN107967284A (en) * | 2016-10-20 | 2018-04-27 | 北京京东尚科信息技术有限公司 | Method and apparatus for storing, inquiring about sequence information |
Also Published As
Publication number | Publication date |
---|---|
CN111159211A (en) | 2020-05-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111159211B (en) | Order information generation method, device, system, computer equipment and storage medium | |
US11038975B2 (en) | Information pushing method and device | |
CN107967284B (en) | Method and device for storing and inquiring order information | |
US20200356572A1 (en) | Search ranking method and apparatus, electronic device and storage medium | |
CN108933695B (en) | Method and apparatus for processing information | |
CN109948882B (en) | Task processing method based on block data structure and related equipment | |
CN111881329A (en) | Account balance management method and system | |
CN111125057A (en) | Service request processing method and device and computer system | |
CN113111078B (en) | Resource data processing method and device, computer equipment and storage medium | |
CN113590756A (en) | Information sequence generation method and device, terminal equipment and computer readable medium | |
CN110928594A (en) | Service development method and platform | |
CN112732547B (en) | Service testing method and device, storage medium and electronic equipment | |
CN113868687A (en) | Task processing progress management method and device | |
CN113127561B (en) | Method and device for generating service single number, electronic equipment and storage medium | |
CN111552715B (en) | User query method and device | |
CN109308299B (en) | Method and apparatus for searching information | |
CN113487411A (en) | Method, device, equipment and computer readable medium for information interaction | |
CN113704222A (en) | Method and device for processing service request | |
CN107707328B (en) | Abstract information transmission method and device | |
CN111125112A (en) | Data processing method and device, electronic equipment and computer readable storage medium | |
CN111414566A (en) | Method and device for pushing information | |
CN114205639B (en) | Video processing method and device, electronic equipment and storage medium | |
CN114327517B (en) | Software-driven implementation method and system | |
CN108920602B (en) | Method and apparatus for outputting information | |
CN113495888B (en) | Identification management method and device |
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 |