CN111159211A - Order information generation method, device and system, computer equipment and storage medium - Google Patents
Order information generation method, device and system, computer equipment and storage medium Download PDFInfo
- Publication number
- CN111159211A CN111159211A CN201911420519.4A CN201911420519A CN111159211A CN 111159211 A CN111159211 A CN 111159211A CN 201911420519 A CN201911420519 A CN 201911420519A CN 111159211 A CN111159211 A CN 111159211A
- Authority
- CN
- China
- Prior art keywords
- order information
- order
- database
- information generation
- service
- 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.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; 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 OR CALCULATING; 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 OR CALCULATING; 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—Managing shopping lists, e.g. compiling or processing purchase lists
- G06Q30/0635—Managing shopping lists, e.g. compiling or processing purchase lists replenishment orders; recurring 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 generates a sequence identifier corresponding to the request based on the last received order information, and determines the sequence identifier corresponding to the currently received order information generation request; the database generates a sequence identifier corresponding to the request, current time information and a service identifier of the target service based on the currently received order information, and generates an order number corresponding to the order information generation request; the database stores the order number and sends the order number to the service server so that the service server generates 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 present disclosure relates to the field of computer technologies, and in particular, to a method, an apparatus, a system, a computer device, and a storage medium for generating order information.
Background
Today, the internet is rapidly developed, and various order numbers are needed in various service scenes to distinguish different orders so as to meet service 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, each service server comprises at least one service, and each service in each service server can generate an order. When a business server generates an order corresponding to a certain business, at this time, in order to generate an order number corresponding to the order, the business server needs to send a query request to the database, where the query request is used to instruct the database to query the latest stored order number in the database. And 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 the service server receives the latest stored order number, the service server adds one to the numerical value corresponding to the order number, generates a newly generated order number, and sends a storage request carrying the newly generated order number to the database. And after the database receives the storage request, storing the newly generated order number into the database, thereby updating the order number stored in the database, and processing the query request sent by other servers after the database is updated.
In the above technical solution for generating order numbers, after a service server sends an inquiry request to a database, if the service server has not sent the generated order number to the database, in order to avoid disorder of the order number, the database cannot process inquiry requests sent by other service servers until the service server feeds back a newly generated order number, which may result in low efficiency of generating order information.
Disclosure of Invention
The embodiment of the disclosure provides an order information generation method, an order information generation device, an order information generation system, computer equipment and a storage medium, which can solve the problem of low order information generation efficiency in the prior art. The technical scheme is as follows:
in one aspect, an order information generating method is provided, and the method includes:
the database receives an order information generation request sent by a service server of a target service;
the database generates a sequence identifier corresponding to the request based on the last received order information, and determines the sequence identifier corresponding to the currently received order information generation request;
the database generates a sequence identifier corresponding to the request, current time information and a service identifier of the target service based on the currently received order information, and generates an order number corresponding to the order information generation request;
the database stores the order number and sends the order number to the service server so that the service server generates order information based on the order number.
In an embodiment of the present disclosure, the determining, by the database, the order identifier corresponding to the currently received order information generation request based on the order identifier corresponding to the last received order information generation request includes:
acquiring a sequence identifier corresponding to a last received order information generation request;
and adding one to the numerical value of the sequence identifier corresponding to the last received order information generation request to obtain a numerical value which is used as the sequence identifier corresponding to the currently received order information generation request.
In an embodiment of the present disclosure, the generating, by the database, an order number corresponding to the order information generation request based on the sequence identifier corresponding to the currently received order information generation request, the current time information, and the service identifier of the target service, 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 an embodiment of the present disclosure, the database stores an order number, including:
and the database stores the order number in the database according to the long data type, wherein the length of the stored order number is 8 bytes.
In an 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 database receives an order storage notice sent by the service server, wherein the order storage notice carries an order number and order information;
and the database correspondingly stores the order information and the order number.
On one hand, the order information generation method is provided and applied to an order information generation system, the order information generation 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 the target service;
a service server of a target service sends an order information generation request to a database;
the database generates a sequence identifier corresponding to the request based on the last received order information, determines a sequence identifier corresponding to the currently received order information generation request, generates a sequence identifier corresponding to the request, current time information and a service identifier of the target service based on the currently received order information, generates an order number corresponding to the order information generation request, stores the order number, and sends the order number to a 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 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;
a service server of a target service sends an order storage notice to a database, wherein the order storage notice carries an order number and order information;
and the database correspondingly stores the order information and the order number.
In one aspect, an order information generating apparatus is provided, the apparatus including:
the receiving module is used for the database to receive an order information generation request sent by a service server of the target service;
the determining module is used for generating a sequence identifier corresponding to the request based on the last received order information by the database and determining the sequence identifier corresponding to the currently received order information generation request;
the generating module is used for generating a sequence identifier corresponding to the request, current time information and a service identifier of the target service based on the currently received order information by the database, and generating an order number corresponding to the order information generating request;
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 generates order information based on the order number.
In an 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 to the numerical value of the sequence identifier corresponding to the last received order information generation request to obtain a numerical value which is used as the sequence identifier corresponding to the currently received order information generation request.
In an 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 an embodiment of the present disclosure, the storage module is configured to:
and the database stores the order number in the database according to the long data type, wherein the length of the stored order number is 8 bytes.
In an embodiment of the present disclosure, the apparatus further includes a corresponding storage module, configured to:
the database receives an order storage notice sent by the service server, wherein the order storage notice carries an order number and order information;
and the database correspondingly stores the order information and the order number.
In one aspect, an order information generating system is provided, which comprises a terminal, a service server of a plurality of services and a database, wherein,
the terminal is used for sending an order request to a service server of the target service; displaying the initial order information, acquiring the supplementary order information input by the user, generating the order information based on the initial order information and the supplementary order information, and sending the order information to the 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 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 generating a sequence identifier corresponding to the request based on the last received order information, determining a sequence identifier corresponding to the currently received order information generation request, generating a sequence identifier corresponding to the request, current time information and a service identifier of the target service based on the currently received order information, generating an order number corresponding to the order information generation request, storing the order number and sending the order number to a service server of the target service; and correspondingly storing the order information and the order number.
In one aspect, a computer device is provided and includes one or more processors and one or more memories, where at least one instruction is stored in the one or more memories and loaded by the one or more processors and executed to implement the operations performed by the order information generating method according to any one of the possible implementations described above.
In one aspect, a computer-readable storage medium is provided, in which at least one instruction is stored, and the at least one instruction is loaded and executed by a processor to implement the operations performed by the order information generating method according to any one of the above possible implementation manners.
The beneficial effects brought by the technical scheme provided by the embodiment of the disclosure at least comprise:
according to the embodiment of the disclosure, after receiving an order information generation request of a service server, a database generates a sequence identifier corresponding to the request according to the last received order information, determines the sequence identifier corresponding to the currently received order information generation request, generates a sequence identifier corresponding to the currently received order information generation request, current time information and a service identifier of the target service, generates an order number corresponding to the order information generation request, and stores and feeds back the order number to the corresponding service server. In the above process of generating the order number, since the process of generating the order number is performed in the database, that is, the order number is generated locally, it is not necessary to wait for the service server to feed back the order number, and the query request sent by other service servers can be processed, thereby improving the efficiency of generating the order information.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present disclosure, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
Fig. 1 is a schematic 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 generating system for generating order information according to 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 generating 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
To make the objects, technical solutions and advantages of the present disclosure more apparent, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings.
The method for generating order information provided in this embodiment may be applied to a terminal, and may also be executed in a server. The terminal can be a mobile terminal such as a mobile phone, a tablet computer and a notebook computer, and can also be a fixed terminal such as a desktop computer. The server may be a single server or a server group, and if the server is a single server, the server may be responsible for all processing in the following scheme, and if the server is a server group, different servers in the server group may be respectively responsible for different processing in the following scheme, and the specific processing allocation condition may be arbitrarily set by a technician according to actual needs, and is not described herein again.
The method of the embodiment of the disclosure can be applied to a shopping platform, a selling platform, a ordering system of a music platform or other platforms. Specifically, the user can purchase the commodity according to the needs of the user, and when payment is needed, the terminal can generate and display the order, so that the user can conveniently obtain order information. In the process of generating the order 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. And 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, the user may complete payment after the terminal has obtained the complete order.
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. and the database receives an order information generation request sent by a service server of the target service.
The target service may be a service that needs to generate order information. The business server comprises at least one business, and each business can generate at least one order. The order may be a shopping order or a take-away order, and the type of the order is not limited herein.
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, and the order generation request is used for indicating the database to generate an order number corresponding to the target order. And the database receives an order information generation request sent by a service server of the target service.
It should be noted that, in multiple processes, the database may be connected to multiple service servers, so that the multiple 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. And the database generates a sequence identifier corresponding to the request based on the last received order information, and determines the sequence identifier corresponding to the currently received order information generation request.
Wherein the order identifier may be used to indicate the order in which the orders were 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 obtains a sequence identifier corresponding to the last received order information generation request, and adds one to the obtained sequence identifier to obtain a new value. And the database takes the new numerical value as the order information to generate the sequence identifier corresponding to the request.
In practical applications, the database may be a Key-Value type (Key-Value) database, such as a Remote Dictionary service (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 previous 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 (incremental register) command, so that the Redis database adds one to the value of the sequence identifier corresponding to the previous order information generation request, and obtains a new value obtained after adding one to the value. And the Redis database takes the new numerical value as the sequence identifier corresponding to the currently received order information generation request.
In one embodiment of the present disclosure, the sequentially identified data types in the Redis database are Key-Value data types, and are stored as Key-Value values. When a Redis database receives a current order information generation request, a sequence identifier corresponding to the last received order information generation request is obtained and an INCR command is executed, wherein the INCR command is used for indicating the database to execute an operation of adding 1 to a key value corresponding to the sequence identifier, and the key value can be a serial number arranged in sequence. And correspondingly, the Redis database generates a corresponding key value for the sequence identifier of the currently received order information generation request and then stores the key value.
The sequence flag may be a 5-bit number, the sequence may increase from 00000, and when the threshold 99999 is reached, the value is initialized to 0, and the INCR command is re-executed to increase.
It should be noted that, when the first service server sends the order request information to the database, since the last received order information generation request is not received in the current database, the database cannot obtain the sequence identifier corresponding to the last received order information generation request, at this time, the database may generate an initial sequence identifier, the value of the initial sequence identifier may 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 a sequence identifier corresponding to the request, current time information and a service identifier of the target service based on the currently received order information, and generates an order number corresponding to the order information generation request.
The current time information may be a time point of an order information generation request sent by the service server, 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 identifier may indicate information of a target service, such as commodity 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. And the database sequentially connects the current time information corresponding to the order information generation request received by the database, the service identifier of the target service and the sequence identifier 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 identifier of the target service, and the value corresponding to the sequential identifier, to obtain a connected value. And the database determines the connected numerical value as an order number corresponding to the order information generation request.
For example, the technician presets the order number as 19 digits, and the specific format for setting each order number may be: 12 bits of current time information +2 bits of service identifier +5 bits of sequence identifier, and 1910200914212200001 order number generated by database, wherein 191020091421 is current time information, which may include time information accurate to second, e.g., 191020091421 includes time information of 09 o' clock 14 min 21 s at 12/20/19 years, 22 is service identifier, and 00001 is sequence identifier.
It should be noted that the time information, the service identifier, and the sequence identifier in the order number are all positive integers.
104. The database stores the order number and sends the order number to the service server so that the service server generates order information based on the order number.
When the database stores the order numbers, the data type of each order number can be set as the long data type.
In practice, the database background may count the number of generated order numbers for each predetermined time interval. And when the number of the order numbers is counted in the background of the database and reaches a preset number, the counted order numbers are stored in the database, so that the access pressure of the database is reduced.
It should be noted that the database may store the order numbers in batches in the database.
In an 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 store an order storage notification sent 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 notification, the database establishes a corresponding relationship between the order information of the target order and the order number, and stores the corresponding relationship in the database.
Fig. 2 is a schematic diagram of an order information generating system provided in an embodiment of the present disclosure to generate order information, where the system includes a terminal, a service server of multiple services, and a database, and as shown in 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 the terminal receives an order generation instruction of a certain order, the terminal queries 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, where the order request is used to instruct 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 business is a business needing to generate order information. The business server comprises at least one business, and each business can generate at least one order. The order may be a shopping order or a take-away order, and the type of the order is not limited herein.
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, and the order generation request is used for indicating the database to generate order information corresponding to the target order. And the database receives an order information generation request sent by a service server of the target service.
It should be noted that, in multiple processes, the database may be connected to multiple service servers, so that the multiple 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 generates a sequence identifier corresponding to the request based on the last received order information, determines a sequence identifier corresponding to the currently received order information generation request, generates a sequence identifier corresponding to the request, current time information and a service identifier of the target service based on the currently received order information, generates an order number corresponding to the order information generation request, stores the order number, and sends the order number to a service server of the target service.
In implementation, when the database receives an order information generation request currently sent by a service server of a target service, the order information request carries a service identifier of the target service. And querying and acquiring a sequence identifier corresponding to the last received order information generation request by the database, and adding one to the numerical value of the acquired sequence identifier to obtain a new numerical value. And the database takes the new numerical value as the order information to generate the sequence identifier corresponding to the request. After the database obtains the sequence identifier of the current order, the database obtains the service identifier of the target service in the order information request by analyzing the order information request. And the database sequentially connects the current time information corresponding to the order information generation request received by the database, the service identifier of the target service and the sequence identifier 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 identifier of the target service, and the value corresponding to the sequence identifier are sequentially connected to obtain a connected value. And determining the connected numerical value as an order number corresponding to the order information generation request.
For example, the technician presets the order number as 19 digits, and the specific format for setting each order number may be: 12 bits of current time information +2 bits of service identifier +5 bits of sequence identifier, and 1910200914212200001 order number generated by database, wherein 191020091421 is current time information, which may include time information accurate to second, e.g., 191020091421 includes time information of 09 o' clock 14 min 21 s at 12/20/19 years, 22 is service identifier, and 00001 is sequence identifier.
It should be noted that the time information, the service identifier, and the sequence identifier in the order number are all positive integers.
In practical applications, the database may be a Key-Value type (Key-Value) database, such as a Remote Dictionary service (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 previous 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 command to enable the Redis database to add one to the numerical value of the sequence identifier corresponding to the previous order information generation request and obtain a new numerical value after adding one to the numerical value. And the Redis database takes the new numerical value as the sequence identifier corresponding to the currently received order information generation request.
In an embodiment of the present disclosure, the numerical Value of the sequence identifier in the Redis database is stored in a Key-Value data type, and after receiving a current order information generation request, the sequence identifier corresponding to a last received order information generation request is obtained and an INCR command is executed, where the INCR command adds 1 to a Key Value corresponding to the sequence identifier, where the Key Value may be a sequence number arranged in sequence, and returns a Value after adding one, the Value after adding one is determined 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.
In one embodiment of the present disclosure, the sequence flag 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.
It should be noted that, when the first service server sends the order request information to the database, since the last received order information generation request is not received in the current database, the database cannot obtain the sequence identifier corresponding to the last received order information generation request, at this time, the database may generate an initial sequence identifier, the value of the initial sequence identifier may 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 commodity 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 acquire 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 the service server of the target service.
The supplementary order information may be an address of the user or a contact information of the user, and the order information includes initial order information sent by the service server and supplementary order information input by the user.
In implementation, the terminal receives an order information filling request sent by the 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 to generate order information, and sends the order information to the service server.
206. And 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 notification carrying an order number and the order information to the database.
207. And the database correspondingly stores the order information and the order number.
In implementation, when the database receives an order storage notification sent by the service server, the database acquires an order number and order information in the order storage notification, establishes a corresponding relationship between the order number and the order information, and stores the corresponding relationship 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, generates a sequence identifier corresponding to the request according to the last received order information, and determines the sequence identifier corresponding to the currently received order information generation request. The database generates a sequence identifier corresponding to the request, current time information and a service identifier of the target service based on the currently received order information, and generates an order number corresponding to the order information generation request. The database stores the order number and sends the order number to the service server. In the above process of generating the order number, since the process of generating the order number is performed in the database, that is, the order number is generated locally, it is not necessary to wait for the service server to feed back the order number, and the query request sent by other service servers can be processed, thereby improving the efficiency of generating the order information.
All the above optional technical solutions may be combined arbitrarily to form the optional embodiments of the present disclosure, and are not described herein again.
The following are embodiments of the apparatus of the present disclosure that may be used to perform embodiments of the methods of the present disclosure. For details not disclosed in the embodiments of the apparatus of the present disclosure, 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, by a database, an order information generation request sent by a service server of a target service;
a determining module 302, configured to determine, by the database, a sequence identifier corresponding to a last received order information generation request, and determine a sequence identifier corresponding to a currently received order information generation request;
a generating module 303, configured to generate, by the database, a sequence identifier corresponding to the request, current time information, and a service identifier of the target service based on the currently received order information, and generate an order number corresponding to the order information generating request;
and the storage module 304 is used for storing the order number in the database and sending the order number to the service server so that the service server generates order information based on the order number.
In an 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 to the numerical value of the sequence identifier corresponding to the last received order information generation request to obtain a numerical value which is used as the sequence identifier corresponding to the currently received order information generation request.
In an 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 an embodiment of the present disclosure, the storage module 304 is configured to:
and the database stores the order number in the database according to the long data type, wherein the length of the stored order number is 8 bytes.
In an embodiment of the present disclosure, the apparatus further includes a corresponding storage module, configured to:
the database receives an order storage notice sent by the service server, wherein the order storage notice carries an order number and order information;
and the database correspondingly stores the order information and the order number.
Fig. 4 is a schematic diagram of an order information generating system provided by 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 of 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; displaying the initial order information, acquiring the supplementary order information input by the user, generating the order information based on the initial order information and the supplementary order information, and sending the order information to the service server of the target service
A service server 402, configured to send an order information generation request to a database; sending an order information filling request 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 403 is configured to generate a sequence identifier corresponding to a request based on the last received order information, determine a sequence identifier corresponding to the currently received order information generation request, generate a sequence identifier corresponding to the request, current time information, and a service identifier of the target service based on the currently received order information, generate an order number corresponding to the order information generation request, store the order number, and send the order number to a service server of the target service; and correspondingly storing the order information and the order number.
Fig. 5 is a schematic structural diagram of a computer device provided in an embodiment of the present disclosure, where the computer device 500 may include one or more processors (CPUs) 501 and one or more memories 502, where the memory 302 stores at least one instruction, and the at least one instruction is loaded and executed by the processor 501 to implement the page retirement rate determination method provided in the foregoing method embodiments. Certainly, the computer device may further have components such as a wired or wireless network interface, a keyboard, and an input/output interface, so as to perform input and output, and the computer device may further include other components for implementing the functions of the device, which is not described herein again.
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 in the above embodiments is also provided. For example, the computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
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 instructing relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only exemplary of the present disclosure and is not intended to limit the present disclosure, which is to be construed in any way as imposing limitations thereon, such as the appended claims, and all changes and equivalents that fall within the true spirit and scope of the present disclosure.
Claims (10)
1. An order information generating method, comprising:
the database receives an order information generation request sent by a service server of a target service;
the database generates a sequence identifier corresponding to the request based on the last received order information, and determines the sequence identifier corresponding to the currently received order information generation request;
the database generates a sequence identifier corresponding to the order information generation request, current time information and a service identifier of the target service based on the currently received order information, and generates an order number corresponding to the order information generation request;
and the database stores the order number and sends the order number to the service server so that the service server generates order information based on the order number.
2. The method of claim 1, wherein the determining, by the database based on the sequential identifier corresponding to the last received order information generation request, the sequential identifier corresponding to the currently received order information generation request comprises:
acquiring a sequence identifier corresponding to a last received order information generation request;
and adding one to the numerical value of the sequence identifier corresponding to the last received order information generation request to obtain a numerical value which is used as the sequence identifier corresponding to the currently received order information generation request.
3. The method according to claim 1, wherein the database generates an order number corresponding to the order information generation request based on the sequence identifier corresponding to the currently received order information generation request, the current time information, and the service identifier of the 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.
4. The method of claim 1, wherein the database stores the order number, comprising:
the database stores the order number based on the long data type, wherein the length of the stored order number is 8 bytes.
5. The method according to any of claims 1-4, 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;
and the database correspondingly stores the order information and the order number.
6. An order information generating method is applied to an order information generating system, 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 the target service;
the service server of the target service sends an order information generation request to the database;
the database generates a sequence identifier corresponding to a request based on the last received order information, determines a sequence identifier corresponding to the currently received order information generation request, generates a sequence identifier corresponding to the request, current time information and a service identifier of the target service based on the currently received order information, generates an order number corresponding to the order information generation request, stores the order number, and sends the order number to a service server of the target service;
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 the 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;
and the database correspondingly stores the order information and the order number.
7. An order information generating apparatus, comprising:
the receiving module is used for the database to receive an order information generation request sent by a service server of the target service;
the determining module is used for generating a sequence identifier corresponding to the request based on the last received order information by the database and determining the sequence identifier corresponding to the currently received order information generation request;
a generating module, configured to generate, by the database, an order number corresponding to the order information generation request based on the sequence identifier corresponding to the currently received order information generation request, the current time information, and the service identifier of the target service;
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 generates order information based on the order number.
8. An order information generating system is characterized by comprising a terminal, a service server of a plurality of services and a database, wherein,
the terminal is used for sending an order request to a service server of the target service; displaying initial order information, acquiring supplementary order information input by a 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; 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 generating a sequence identifier corresponding to a request based on the last received order information, determining a sequence identifier corresponding to the currently received order information generation request, generating a sequence identifier corresponding to the request, current time information and a service identifier of the target service based on the currently received order information, generating an order number corresponding to the order information generation request, storing the order number, and sending the order number to a service server of the target service; and correspondingly storing the order information and the order number.
9. A computer device, comprising one or more processors and one or more memories having stored therein at least one instruction, the at least one instruction being loaded and executed by the one or more processors to perform operations performed by the order information generation method of any one of claims 1 to 5.
10. A computer-readable storage medium, having stored therein at least one instruction, which is loaded and executed by a processor to perform operations performed by the order information generation method of any one of claims 1 to 5.
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 true CN111159211A (en) | 2020-05-15 |
| CN111159211B 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) |
Cited By (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112184367A (en) * | 2020-09-17 | 2021-01-05 | 北京同邦卓益科技有限公司 | Order processing method and device |
| 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 |
| CN114546297A (en) * | 2020-11-25 | 2022-05-27 | 顺丰科技有限公司 | Order data processing method, device and system, computer equipment and storage medium |
| CN114611461A (en) * | 2022-03-11 | 2022-06-10 | 首约科技(北京)有限公司 | Method for generating order number with network car booking service information |
| CN114911983A (en) * | 2021-02-10 | 2022-08-16 | 中国联合网络通信集团有限公司 | Method and system for providing order number |
| CN116795814A (en) * | 2022-03-11 | 2023-09-22 | 中移动金融科技有限公司 | Order diversion storage method, device, electronic equipment and computer program product |
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 |
Cited By (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112184367A (en) * | 2020-09-17 | 2021-01-05 | 北京同邦卓益科技有限公司 | Order processing method and device |
| CN112184367B (en) * | 2020-09-17 | 2024-05-24 | 北京同邦卓益科技有限公司 | Order processing method and device |
| CN114546297A (en) * | 2020-11-25 | 2022-05-27 | 顺丰科技有限公司 | Order data processing method, device and system, computer equipment and storage medium |
| CN114546297B (en) * | 2020-11-25 | 2024-02-27 | 顺丰科技有限公司 | Order data processing methods, devices, systems, computer equipment and storage media |
| CN112733499A (en) * | 2021-01-05 | 2021-04-30 | 中国工商银行股份有限公司 | Serial number generation method and device |
| CN114911983A (en) * | 2021-02-10 | 2022-08-16 | 中国联合网络通信集团有限公司 | Method and system for providing order number |
| CN113011945A (en) * | 2021-03-16 | 2021-06-22 | 深圳市微创云启科技有限公司 | Order number generation method and device, terminal equipment and storage medium |
| CN114611461A (en) * | 2022-03-11 | 2022-06-10 | 首约科技(北京)有限公司 | Method for generating order number with network car booking service information |
| CN116795814A (en) * | 2022-03-11 | 2023-09-22 | 中移动金融科技有限公司 | Order diversion storage method, device, electronic equipment and computer program product |
Also Published As
| Publication number | Publication date |
|---|---|
| CN111159211B (en) | 2024-06-07 |
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 | |
| CN112835904A (en) | A data processing method and data processing device | |
| CN112527649A (en) | Test case generation method and device | |
| CN112884405A (en) | Inquiry system and scheduling method thereof | |
| CN113868687B (en) | A method and device for managing task processing progress | |
| CN111125112A (en) | Data processing method and device, electronic equipment and computer readable storage medium | |
| CN110706093A (en) | Accounting processing method and device | |
| CN113627835A (en) | Distribution management method and device | |
| CN110909022A (en) | A data query method and device | |
| CN113111078B (en) | Resource data processing method and device, computer equipment and storage medium | |
| CN110598068A (en) | Global identification generation method and device | |
| CN113127561B (en) | Method and device for generating service single number, electronic equipment and storage medium | |
| CN116258556A (en) | Method, device, electronic device and storage medium for business data processing | |
| CN113761565A (en) | Data desensitization method and apparatus | |
| CN114138397B (en) | Page display method and device, electronic equipment and storage medium | |
| CN113590756A (en) | Information sequence generation method and device, terminal equipment and computer readable medium | |
| CN113822745A (en) | Method and device for displaying items | |
| CN109308299B (en) | Method and apparatus for searching information | |
| CN113761405A (en) | A task order processing method and system | |
| CN112464099A (en) | Method, device, electronic equipment and medium for generating document based on query data | |
| CN114331261B (en) | Data processing method and device | |
| CN115858905A (en) | Data processing method and device, electronic equipment and storage medium | |
| CN113761344A (en) | Information recommendation method and device | |
| CN113626665B (en) | Data display 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 |