CN111680039A - Storage method, query method, device, equipment and storage medium of order information - Google Patents

Storage method, query method, device, equipment and storage medium of order information Download PDF

Info

Publication number
CN111680039A
CN111680039A CN202010468689.6A CN202010468689A CN111680039A CN 111680039 A CN111680039 A CN 111680039A CN 202010468689 A CN202010468689 A CN 202010468689A CN 111680039 A CN111680039 A CN 111680039A
Authority
CN
China
Prior art keywords
order
random salt
identifier
identification
order information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
CN202010468689.6A
Other languages
Chinese (zh)
Inventor
王洪祥
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Sankuai Online Technology Co Ltd
Original Assignee
Beijing Sankuai Online Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Sankuai Online Technology Co Ltd filed Critical Beijing Sankuai Online Technology Co Ltd
Priority to CN202010468689.6A priority Critical patent/CN111680039A/en
Publication of CN111680039A publication Critical patent/CN111680039A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION 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/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0633Lists, e.g. purchase orders, compilation or processing
    • G06Q30/0635Processing of requisition or of purchase orders

Abstract

The application discloses a storage method, a query method, a device, equipment and a storage medium of order information, and relates to the technical field of internet. The method comprises the following steps: receiving order information from a client; generating random salt, and storing the random salt and the order information into a database; performing salting processing on a first order identification corresponding to the order information to obtain a second order identification, wherein the salting processing comprises splicing the first order identification and the random salt; and sending the second order identification to the client. In the embodiment of the application, when the client uploads the order information, the server stores the order information into the database, salt addition processing is further performed on the first order identification related to the order information through random salt to obtain the second order identification, and the second order identification is sent to the client, so that the second order identification transmitted between the server and the client is not easy to be acquired by a crawler.

Description

Storage method, query method, device, equipment and storage medium of order information
Technical Field
The embodiment of the application relates to the technical field of internet, in particular to a storage method, a query method, a device, equipment and a storage medium for order information.
Background
With the development of internet technology, more and more order information is generated, and the order information is stored in a data table of a database by a server.
In the database, in order to conveniently store the order information, a primary key (primary key) is usually set to uniquely identify each row in the table, and a row in the data table may correspond to one piece of order information. In the related art, the auto _ increment is added by default by 1 each time by taking the self-increment ID as the main key of the database, i.e., the main key auto _ increment using MySQL. The server may query the order information from the database via the self-incrementing ID.
However, the self-increment ID is easy to be traversed and crawled by external computer equipment due to simple rule, and the anti-crawler effect is not good.
Disclosure of Invention
The embodiment of the application provides a storage method, a query method, a device, equipment and a storage medium of order information, and the method has the advantages of good anti-crawler effect and higher security of order information storage (or query). The technical scheme is as follows:
in one aspect, an embodiment of the present application provides a method for storing order information, where the method includes:
receiving order information from a client;
generating random salt, and storing the random salt and the order information into a database;
performing salting processing on a first order identification corresponding to the order information to obtain a second order identification, wherein the salting processing comprises splicing the first order identification and the random salt;
and sending the second order identification to the client.
On the other hand, an embodiment of the present application provides a method for querying order information, where the method includes:
receiving an order query request from a client, wherein the order query request carries a second order identifier, and the second order identifier is an order identifier obtained after the first order identifier is subjected to salt adding treatment;
analyzing the second order identification to obtain the first order identification;
and according to the first order identification, inquiring order information corresponding to the first order identification in a database.
On the other hand, an embodiment of the present application provides an order information storage apparatus, where the apparatus includes: the device comprises a receiving module, a storage module, a salt adding module and a sending module;
the receiving module is configured to receive order information from a client;
the storage module is configured to generate random salt and store the random salt and the order information into a database;
the salt adding module is configured to add salt to a first order identifier corresponding to the order information to obtain a second order identifier, and the salt adding process includes splicing the first order identifier and the random salt;
the sending module is configured to send the second order identifier to the client.
On the other hand, an embodiment of the present application provides an apparatus for querying order information, where the apparatus includes: the system comprises a receiving module, an analysis module and a query module;
the receiving module is configured to receive an order query request from a client, wherein the order query request carries a second order identifier, and the second order identifier is an order identifier obtained after the first order identifier is subjected to salt adding processing;
the analysis module is configured to analyze the second order identifier to obtain the first order identifier;
the query module is configured to query order information corresponding to the first order identifier in a database according to the first order identifier.
In another aspect, an embodiment of the present application provides a computer device, where the computer device includes a processor and a memory, where the memory stores a computer program, and the computer program is loaded and executed by the processor to implement the storage method of the order information or the query method of the order information.
In another aspect, the present application provides a non-transitory computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the above storage method for order information or the query method for order information.
The technical scheme provided by the embodiment of the application can bring the following beneficial effects:
when the client uploads the order information, the server stores the order information into the database, salt processing is carried out on a first order identification related to the order information through random salt to obtain a second order identification, the second order identification is sent to the client, and the second order identification is transmitted between the server and the client, is not the first order identification with self-increased ID but the second order identification after salt adding, is not easy to acquire by a crawler due to discontinuous serial number, so that the anti-crawler effect is better, and the security of order information storage is higher.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, 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 application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 illustrates a schematic block diagram of a computer system according to an exemplary embodiment of the present application;
FIG. 2 illustrates a schematic diagram of processing order information provided by an exemplary embodiment of the present application;
FIG. 3 illustrates a flow chart of a method for storing order information, shown in an exemplary embodiment of the present application;
FIG. 4 illustrates a flow chart of a method for storing order information, shown in an exemplary embodiment of the present application;
FIG. 5 illustrates a flow chart of a method for querying order information, shown in an exemplary embodiment of the present application;
FIG. 6 illustrates a flow chart of a method for querying order information, shown in an exemplary embodiment of the present application;
FIG. 7 illustrates a flow chart of a method for querying order information, shown in an exemplary embodiment of the present application;
fig. 8 is a block diagram illustrating a structure of an order information storage device according to an embodiment of the present application;
fig. 9 is a block diagram illustrating an apparatus for querying order information according to an embodiment of the present application;
fig. 10 shows a block diagram of a terminal according to an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
First, the terms referred to in the present application will be briefly described:
a main key: refers to a column or combination of columns whose value uniquely identifies each row in the table. Such one or more columns are referred to as the primary key of the table, by which the physical integrity of the table is enforced.
Optionally, the self-increment ID is used as the main key of the database. The self-increment ID refers to: for a record in the database, the ID value identifying the record is increased by 1 compared to the ID value of the previous record. Such as: for one record, the ID value is 100, then for the next record stored to the database, the ID value is increased from 1 to 101.
MySQL: is a relational database management system that maintains data in different tables rather than placing all data in a large warehouse, which increases speed and flexibility.
Random Salt (Salt): is a randomly generated set of strings that may include random upper and lower case letters, numbers, characters.
Adding salt: in cryptography, the process of inserting a specific character string at an arbitrary fixed position of a password to make the hashed result not be consistent with the hashed result of the original password is called "salting".
In the embodiment of the application, the salting processing of the order identifier refers to linking the order identifier and the random salt by using fixed characters.
Fig. 1 shows a schematic structural diagram of a computer system according to an exemplary embodiment of the present application, which includes a terminal 101, a server 102, and a database 103.
The terminal 101 is a device in which a client having a ordering function is installed. It may be a smartphone, tablet, Personal Computer (PC), or other electronic device. The client with the ordering function can be a shopping application program, an instant chat application program, an ordering application program, a car-playing application program, a game application program, a video application program and the like. In the embodiment of the application, a client in the terminal 101 may place an order through the server 102, and then obtain an id (salted id) of the current order after salting from the server 102; the terminal 101 may also use the sold ID to make an order query through the server 102.
The terminal 101 and the server 102 are connected by a wired or wireless network.
The server 102 is a backend server corresponding to an application installed in the terminal 101. The server can be a server, a server cluster formed by a plurality of servers or a cloud server. In the embodiment of the application, the server 102 may generate random salt, store the random salt in the database 103 together with the order information, and return the ID after the salt adding process to the terminal 101; the server 102 may also receive the order query request from the terminal 101, parse the real ID, query the database 103 with the ID, and add the queried order information to return to the terminal 101.
The database 103 and the server 102 are connected by a wired or wireless network. The database 103 is used for storing relevant data of orders.
Fig. 2 is a diagram illustrating processing of order information according to an exemplary embodiment of the present application.
Referring to (a) in fig. 2 in combination, corresponds to a process of encrypting order information at the time of placing an order.
1. The user places an order through a client in the terminal 210, and the terminal submits order information to the server 220.
2. The server 220 generates a random salt, stores the random salt in the database 230 together with the order information, and generates a self-increment ID corresponding to the order information.
3. Server 220 converts the ID and random salt into 16-ary character strings, respectively, linked by a fixed character, such as:
salted ID=long.toHexString(ID)+‘G’+long.toHexString(salt)
4. the server 220 returns the salted ID to the terminal 210.
Reference to (b) in fig. 2 in combination corresponds to the order query process.
1. The client in the terminal 210 transmits the filtered ID to the server 220.
2. Server 220 resolves the failed ID back to the true ID and random salt, and queries database 230 with the ID.
3. Server 220 compares the random salt stored in the retrieved data with the random salt that was back-resolved in the previous step. If the two are equal, the order information is returned to the terminal 210; otherwise, empty is returned.
Next, a method of storing order information will be described.
Fig. 3 is a flowchart illustrating a method for storing order information according to an exemplary embodiment of the present application, which may be applied to the server shown in fig. 1, and the method includes:
in step 310, order information from a client is received.
The client is an application program running in the terminal and capable of being ordered by a user, and includes but is not limited to: shopping application programs, instant chat application programs, ordering application programs, car-playing application programs, game application programs and video application programs.
When a user places an order, the client can generate order information corresponding to the order, the order information is sent to the server, and the server receives the order information from the client.
Order information includes, but is not limited to: order number, commodity name, commodity unit price, commodity quantity, commodity provider information, commodity receiver information and commodity exchange service information. Since the specific content of the order information is different corresponding to different types of orders, the specific content of the order information is not limited in the present application.
Illustratively, the client is an ordering-type application. The order information includes: delivery mode, delivery personnel information, order form number, commodity name, commodity unit price, commodity quantity, merchant information, receiving address and receiver contact mode.
Step 320, generating a random salt, and storing the random salt and the order information into a database.
The random salt is a set of strings randomly generated by the server and may include at least one of random upper and lower case letters, numbers, characters. For example: xah 0427.
The Database (Database) is a place where order information is stored electronically. Optionally, in the case that the order information at the client changes, the order information in the database may also change accordingly, such as: adding, intercepting, updating and deleting. Optionally, the database is MySQL.
After receiving the order information from the client, the server generates random salt corresponding to the order information, and stores the random salt and the order information into a database together so as to be convenient for inquiring the order information subsequently.
Step 330, performing salting processing on the first order identifier corresponding to the order information to obtain a second order identifier.
The salting processing comprises splicing the first order identification and random salt.
The first order identification is used to uniquely identify a piece of order information in the database. The first order identification may include: and at least one of upper and lower case letters, numbers and characters.
The second order identification is obtained by salting the first order identification. Optionally, after the random salt and the order information are stored in the database, the server obtains a first order identifier corresponding to the order information, and performs salt adding processing on the first order identifier to obtain a second order identifier.
Optionally, the first order identification is a self-ID. In the MySQL database, the self-increment ID may be automatically generated by the auto _ increment attribute of the data column. The following are exemplary: for order information a, the first order identification is 100860; for the next piece of order information b, the first order identification is 100861.
Step 340, sending the second order identification to the client.
And after determining the second order identification, the server sends the second order identification to the client.
Optionally, after receiving the second order identifier, the client stores the second order identifier, and completes the storage process of the order information. The client may subsequently query the order information according to the second order identification.
In summary, according to the method provided in this embodiment, when the client uploads the order information, the server stores the order information in the database, and also performs salting processing on the first order identifier related to the order information through random salt to obtain the second order identifier, and sends the second order identifier to the client.
In an alternative embodiment based on fig. 3, fig. 4 is a flowchart illustrating a storage method of order information provided by an exemplary embodiment of the present application, and the storage method may be applied to a server as illustrated in fig. 1. In this embodiment, step 330 is alternatively implemented as the following steps:
step 331, reading a first order identifier corresponding to the order information from the database.
When the database stores the order information and the random salt corresponding to the order information, a first order identification corresponding to the order information is generated. Optionally, the order information, the random number and the first order identifier are stored in a data form of a table. Exemplary, reference is made to the following table:
table one:
first order identification Order information Random salt
1 Information a 34343
2 Information b 19897
For order information a, the random salt is 34343, and the first order identifier is 1; for order information b, the random salt is 19897 and the first order identification is 2.
The server reads a first order identification corresponding to the order information from the database. Such as: for order information a, reading a first order mark as 1; for the order information b, the first order identification is read as 2.
Step 332, the first order identifier and the random salt are encrypted respectively.
And after reading the first order identification from the database, the server respectively encrypts the first order identification and the random salt. Optionally, the server may use different encryption processing manners for the first order identifier and the random salt, or may use the same encryption processing manner for the first order identifier and the random salt, which is not limited in this application.
In an optional embodiment, the server encrypts the first order identifier by using a first encryption algorithm; encrypting the random salt by adopting a second encryption algorithm; wherein the first encryption algorithm and the second encryption algorithm are inverse solvable encryption algorithms.
Illustratively, the first encryption algorithm is an 8-system character string conversion algorithm, and the server converts the first order identifier into an 8-system character string; the second encryption algorithm is a 16-system character string conversion algorithm, and the server converts the random salt into a 16-system character string.
The present application does not limit the specific expression of the first encryption algorithm and the second encryption algorithm.
And 333, splicing the encrypted first order identifier and the encrypted random salt to obtain a second order identifier.
And after respectively encrypting the first order identification and the random salt, the server splices the encrypted first order identification and the encrypted random salt to obtain a second order identification.
In an alternative embodiment, the server determines the concatenated character; and according to the splicing characters, splicing the encrypted first order identification and the encrypted random salt to obtain a second order identification.
The server randomly determines a splicing character, places the encrypted first order identification before the splicing character, and places the encrypted random salt behind the splicing character; or, the encrypted random salt is placed before the characters are spliced, and the encrypted first order mark is placed after the characters are spliced.
For different order information, the splicing characters adopted by the server can be the same or different, and the method is not limited in the application.
Illustratively, the splicing character is "a", and the encrypted first order identifier is: 01299000, the encrypted random salt is 01234560, then the second order is identified as 01299000a 01234560.
In summary, the method provided in this embodiment provides a specific method for salting treatment: and respectively encrypting the first order mark and the random salt, and then connecting by using splicing characters.
In the method provided by this embodiment, different (or the same) inverse resolvable encryption algorithms are used to encrypt the first order identifier and the random salt, so that the reliability of the order identifier after the salting process is improved, and the order identifier after the salting process is conveniently subjected to inverse resolution in the subsequent process.
Next, a method of storing order information will be described.
Fig. 5 is a flowchart illustrating a query method of order information according to an exemplary embodiment of the present application, which may be applied to the server shown in fig. 1, and the method includes:
step 510, receiving an order query request from the client, where the order query request carries a second order identifier.
And the second order identification is obtained after the first order identification is salted. Optionally, the salting process comprises concatenating the first order identification and the random salt. The random salt is a set of strings randomly generated by the server and may include at least one of random upper and lower case letters, numbers, characters. For example: omg 12! | A .
The order query request is a request sent by the client to the server for querying the order information. In the order information storage process, the server returns the second order identification to the client, and the client uses the order query request carrying the second order identification to request the server for querying the order information.
Step 520, the second order identifier is analyzed to obtain the first order identifier.
Optionally, the order information is stored in a database, the first order identification being used to uniquely identify a piece of order information in the database. The server needs to analyze the second order identifier to obtain a first order identifier, and then queries order information in the database according to the first order identifier.
Optionally, the first order identification is a self-ID. In the MySQL database, the self-increment ID may be automatically generated by the auto _ increment attribute of the data column. The following are exemplary: for order information c, the first order identification is 2000; for the next piece of order information d, the first order identification is 2001.
Step 530, according to the first order identifier, the order information corresponding to the first order identifier is inquired in the database.
And the server inquires in the database according to the analyzed first order identification and inquires out order information corresponding to the first order identification. Optionally, the database is MySQL.
In summary, according to the method provided in this embodiment, when the client uploads the order information, the server performs the salting processing on the first order identifier to obtain the second order identifier after the salting processing, so that the server can perform order query according to the second order identifier after the salting processing, and compared with directly querying the order information by using the first order identifier (such as a self-increment ID), the method provided in this embodiment has a better anti-crawler effect and higher security of order query.
In an alternative embodiment based on fig. 5, fig. 6 is a flowchart illustrating a query method of order information provided by an exemplary embodiment of the present application, which may be applied to the server shown in fig. 1. In this implementation, the second order identifier includes: and the spliced encrypted first order identification and the encrypted random salt. In this embodiment, step 520 is alternatively implemented as:
and 521, splitting the second order identifier to obtain the encrypted first order identifier and the encrypted random salt.
In the storage stage of the order information, the server splices the encrypted first order identifier and the encrypted random salt to obtain a second order identifier. Correspondingly, in the query stage of the order information, the server needs to split the second order identifier to obtain the encrypted first order identifier and the encrypted random salt.
In an alternative embodiment, the server determines the concatenated character; and splitting the second order identification according to the spliced characters to obtain the encrypted first order identification and the encrypted random salt.
Illustratively, the splice character is "A" and the second order is identified as 01299000A 01234560. The server splits the second order identification according to the splicing character of 'A', and the obtained encrypted first order identification is as follows: 01299000, the encrypted random salt is 01234560.
In step 522, the encrypted first order identifier is solved reversely to obtain the first order identifier.
The server needs to search the order information in the database according to the first order identifier, and the server performs inverse solution on the encrypted first order identifier to obtain the first order identifier.
In an optional implementation, the server performs inverse solution on the encrypted first order identifier according to a first encryption algorithm to obtain a first order identifier; wherein the first encryption algorithm is an inverse solvable encryption algorithm.
Illustratively, the first encryption algorithm is an 8-ary character string conversion algorithm, and the server performs inverse solution on the encrypted first order identifier to obtain the first order identifier.
In summary, the method provided in this embodiment provides a method for obtaining the first order identifier by the server according to the second order identifier, where the server splits the second order identifier according to the splicing character, and then performs inverse solution on the first order identifier obtained by splitting and after encryption, so as to obtain the first order identifier, which is convenient and efficient.
In an alternative embodiment based on fig. 5, fig. 7 is a flowchart illustrating a query method of order information provided by an exemplary embodiment of the present application, which may be applied to the server shown in fig. 1. In this implementation, the second order identifier includes: and the spliced encrypted first order identification and the encrypted random salt. In this embodiment, the method further includes the following steps:
and 540, reversely solving the encrypted random salt to obtain a first random salt.
The server performs inverse solution on the encrypted first order identifier, and also performs inverse solution on the encrypted random salt to obtain the first random salt.
In an optional embodiment, the server performs inverse solution on the encrypted random salt according to a second encryption algorithm to obtain a first random salt; wherein the second encryption algorithm is an inverse solvable encryption algorithm.
Illustratively, the second encryption algorithm is a 16-ary string transformation algorithm, and the server performs inverse solution on the encrypted random salt to obtain the first random salt.
Step 550, comparing the second random salt corresponding to the inquired order information with the first random salt.
After the server queries the order information in the database according to the first order identifier, the server also queries a second random salt corresponding to the order information in the database. And the server compares the inquired second random salt with the first random salt analyzed according to the second order identification, and further confirms the security of the order inquiry request.
If the second random salt is equal to the first random salt, go to step 560; if the second random salt is not equal to the first random salt, go to step 570.
And step 560, in the case that the second random salt is equal to the first random salt, returning order information to the client.
And the server confirms that the order inquiry request is a safe inquiry request sent by the client and returns an order message to the client because the second random salt is equal to the first random salt.
Step 570, returning the query failure information to the client under the condition that the second random salt is not equal to the first random salt.
And because the second random salt is not equal to the first random salt, the server cannot confirm that the order query request is a safe query request sent by the client, and then returns query failure information to the client.
In another implementation, the server does not return any information to the client in the event that the second random salt is not equal to the first random salt.
In summary, according to the method provided in this embodiment, after the order information is queried, the server compares the parsed first random salt with the second random salt in the database, so as to ensure that the queried order information is the order information required by the client, and improve the reliability of order query.
The method examples described above may be implemented individually or in combination.
Fig. 8 illustrates an order information storage apparatus according to an embodiment of the present application, where the apparatus includes: a receiving module 810, a storage module 820, a salt adding module 830 and a sending module 840;
a receiving module 810 configured to receive order information from a client;
a storage module 820 configured to generate a random salt, store the random salt and the order information in a database;
the salt adding module 830 is configured to perform salt adding processing on the first order identifier corresponding to the order information to obtain a second order identifier, wherein the salt adding processing includes splicing the first order identifier and random salt;
a sending module 840 configured to send the second order identification to the client.
In an alternative embodiment, the salting module 830 comprises: a reading sub-module 831, an encryption sub-module 832 and a splicing sub-module 833; the reading sub-module 831 is configured to read a first order identifier corresponding to the order information from the database; an encryption submodule 832 configured to encrypt the first order identifier and the random salt, respectively; and the splicing sub-module 833 is configured to splice the encrypted first order identifier and the encrypted random salt to obtain a second order identifier.
In an alternative embodiment, the encryption sub-module 832 is configured to encrypt the first order identifier by using a first encryption algorithm; an encryption sub-module 832 configured to encrypt the random salt using a second encryption algorithm; wherein the first encryption algorithm and the second encryption algorithm are inverse solvable encryption algorithms.
In an alternative embodiment, the concatenation sub-module 833 is configured to determine a concatenated character; and the splicing sub-module 833 is configured to splice the encrypted first order identifier and the encrypted random salt according to the spliced characters to obtain a second order identifier.
In an alternative embodiment, the first order identification comprises: the ID is added by oneself.
Fig. 9 shows an apparatus for querying order information according to an embodiment of the present application, where the apparatus includes: a receiving module 910, a parsing module 920, and a querying module 930;
a receiving module 910, configured to receive an order query request from a client, where the order query request carries a second order identifier, and the second order identifier is an order identifier obtained after performing salt processing on the first order identifier;
the analyzing module 920 is configured to analyze the second order identifier to obtain a first order identifier;
a query module 930 configured to query the database for order information corresponding to the first order identification according to the first order identification.
In an alternative embodiment, the second order identification comprises: the first order mark after the encryption processing and the random salt after the encryption processing are spliced; the analysis module 920 is configured to split the second order identifier to obtain the encrypted first order identifier and the encrypted random salt; the parsing module 920 is configured to perform inverse solution on the encrypted first order identifier to obtain the first order identifier.
In an alternative embodiment, the parsing module 920 is configured to determine a stitched character; and the analysis module 920 is configured to split the second order identifier according to the spliced character to obtain the encrypted first order identifier and the encrypted random salt.
In an optional embodiment, the parsing module 920 is configured to perform inverse solution on the encrypted first order identifier according to a first encryption algorithm to obtain a first order identifier; wherein the first encryption algorithm is an inverse solvable encryption algorithm.
In an optional embodiment, the apparatus further comprises: a comparison module 940 and a sending module 950; the analysis module 920 is configured to perform inverse solution on the encrypted random salt to obtain a first random salt; a comparing module 940 configured to compare the second random salt corresponding to the queried order information with the first random salt; a sending module 950 configured to return the order information to the client if the second random salt is equal to the first random salt.
In an alternative embodiment, the sending module 950 is configured to return the query failure information to the client if the second random salt is not equal to the first random salt.
In an alternative embodiment, the first order identification comprises: the ID is added by oneself.
It should be noted that: in the above embodiment, when the device implements the functions thereof, only the division of the functional modules is illustrated, and in practical applications, the functions may be distributed by different functional modules according to needs, that is, the internal structure of the device may be divided into different functional modules to implement all or part of the functions described above. In addition, the apparatus and method embodiments provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments for details, which are not described herein again.
Fig. 10 shows a block diagram of a terminal 1000 according to an embodiment of the present application. The terminal 1000 can be a smart phone, a tablet computer or a desktop computer.
In general, terminal 1000 can include: a processor 1001 and a memory 1002.
Processor 1001 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so forth. The processor 1001 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 1001 may also include a main processor and a coprocessor, where the main processor is a processor for processing data in an awake state, and is also referred to as a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 1001 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the display screen. In some embodiments, the processor 1001 may further include an AI (Artificial Intelligence) processor for processing a computing operation related to machine learning.
Memory 1002 may include one or more computer-readable storage media, which may be non-transitory. The memory 1002 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in the memory 1002 is used to store at least one instruction for execution by the processor 1001 to implement the methods provided by the method embodiments herein.
In some embodiments, terminal 1000 can also optionally include: a peripheral interface 1003 and at least one peripheral. The processor 1001, memory 1002 and peripheral interface 1003 may be connected by a bus or signal line. Various peripheral devices may be connected to peripheral interface 1003 via a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of radio frequency circuitry 1004, touch screen display 1005, camera 1006, audio circuitry 1007, positioning components 1008, and power supply 1009.
The peripheral interface 1003 may be used to connect at least one peripheral related to I/O (Input/Output) to the processor 1001 and the memory 1002. In some embodiments, processor 1001, memory 1002, and peripheral interface 1003 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1001, the memory 1002, and the peripheral interface 1003 may be implemented on separate chips or circuit boards, which are not limited by this embodiment.
The Radio Frequency circuit 1004 is used for receiving and transmitting RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuitry 1004 communicates with communication networks and other communication devices via electromagnetic signals. The radio frequency circuit 1004 converts an electrical signal into an electromagnetic signal to transmit, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 1004 comprises: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuit 1004 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: the world wide web, metropolitan area networks, intranets, generations of mobile communication networks (2G, 3G, 4G, and 5G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the rf circuit 1004 may further include NFC (Near Field Communication) related circuits, which are not limited in this application.
The display screen 1005 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 1005 is a touch display screen, the display screen 1005 also has the ability to capture touch signals on or over the surface of the display screen 1005. The touch signal may be input to the processor 1001 as a control signal for processing. At this point, the display screen 1005 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, display screen 1005 can be one, providing a front panel of terminal 1000; in other embodiments, display 1005 can be at least two, respectively disposed on different surfaces of terminal 1000 or in a folded design; in still other embodiments, display 1005 can be a flexible display disposed on a curved surface or on a folded surface of terminal 1000. Even more, the display screen 1005 may be arranged in a non-rectangular irregular figure, i.e., a shaped screen. The Display screen 1005 may be made of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), and the like.
The camera assembly 1006 is used to capture images or video. Optionally, the camera assembly 1006 includes a front camera and a rear camera. Generally, a front camera is disposed at a front panel of the terminal, and a rear camera is disposed at a rear surface of the terminal. In some embodiments, the number of the rear cameras is at least two, and each rear camera is any one of a main camera, a depth-of-field camera, a wide-angle camera and a telephoto camera, so that the main camera and the depth-of-field camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize panoramic shooting and VR (Virtual Reality) shooting functions or other fusion shooting functions. In some embodiments, camera assembly 1006 may also include a flash. The flash lamp can be a monochrome temperature flash lamp or a bicolor temperature flash lamp. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp, and can be used for light compensation at different color temperatures.
The audio circuit 1007 may include a microphone and a speaker. The microphone is used for collecting sound waves of a user and the environment, converting the sound waves into electric signals, and inputting the electric signals to the processor 1001 for processing or inputting the electric signals to the radio frequency circuit 1004 for realizing voice communication. For stereo sound collection or noise reduction purposes, multiple microphones can be provided, each at a different location of terminal 1000. The microphone may also be an array microphone or an omni-directional pick-up microphone. The speaker is used to convert electrical signals from the processor 1001 or the radio frequency circuit 1004 into sound waves. The loudspeaker can be a traditional film loudspeaker or a piezoelectric ceramic loudspeaker. When the speaker is a piezoelectric ceramic speaker, the speaker can be used for purposes such as converting an electric signal into a sound wave audible to a human being, or converting an electric signal into a sound wave inaudible to a human being to measure a distance. In some embodiments, the audio circuit 1007 may also include a headphone jack.
A location component 1008 is employed to locate a current geographic location of terminal 1000 for navigation or LBS (location based Service). The positioning component 1008 may be a positioning component based on the GPS (global positioning System) in the united states, the beidou System in china, or the galileo System in russia.
Power supply 1009 is used to supply power to various components in terminal 1000. The power source 1009 may be alternating current, direct current, disposable batteries, or rechargeable batteries. When the power source 1009 includes a rechargeable battery, the rechargeable battery may be a wired rechargeable battery or a wireless rechargeable battery. The wired rechargeable battery is a battery charged through a wired line, and the wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, terminal 1000 can also include one or more sensors 1010. The one or more sensors 1010 include, but are not limited to: acceleration sensor 1011, gyro sensor 1010, pressure sensor 1013, fingerprint sensor 1014, optical sensor 1015, and proximity sensor 1016.
Acceleration sensor 1011 can detect acceleration magnitudes on three coordinate axes of a coordinate system established with terminal 1000. For example, the acceleration sensor 1011 may be used to detect components of the gravitational acceleration in three coordinate axes. The processor 1001 may control the touch display screen 1005 to display a user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 1011. The acceleration sensor 1011 may also be used for acquisition of motion data of a game or a user.
The gyro sensor 1012 may detect a body direction and a rotation angle of the terminal 1000, and the gyro sensor 1012 and the acceleration sensor 1011 may cooperate to acquire a 3D motion of the user on the terminal 1000. From the data collected by the gyro sensor 1012, the processor 1001 may implement the following functions: motion sensing (such as changing the UI according to a user's tilting operation), image stabilization at the time of photographing, game control, and inertial navigation.
Pressure sensor 1013 may be disposed on a side frame of terminal 1000 and/or on a lower layer of touch display 1005. When pressure sensor 1013 is disposed on a side frame of terminal 1000, a user's grip signal on terminal 1000 can be detected, and processor 1001 performs left-right hand recognition or shortcut operation according to the grip signal collected by pressure sensor 1013. When the pressure sensor 1013 is disposed at a lower layer of the touch display screen 1005, the processor 1001 controls the operability control on the UI interface according to the pressure operation of the user on the touch display screen 1005. The operability control comprises at least one of a button control, a scroll bar control, an icon control and a menu control.
The fingerprint sensor 1014 is used to collect a fingerprint of the user, and the processor 1001 identifies the user according to the fingerprint collected by the fingerprint sensor 1014, or the fingerprint sensor 1014 identifies the user according to the collected fingerprint. Upon identifying that the user's identity is a trusted identity, the processor 1001 authorizes the user to perform relevant sensitive operations including unlocking a screen, viewing encrypted information, downloading software, paying, and changing settings, etc. Fingerprint sensor 1014 can be disposed on the front, back, or side of terminal 1000. When a physical key or vendor Logo is provided on terminal 1000, fingerprint sensor 1014 can be integrated with the physical key or vendor Logo.
The optical sensor 1015 is used to collect the ambient light intensity. In one embodiment, the processor 1001 may control the display brightness of the touch display screen 1005 according to the intensity of the ambient light collected by the optical sensor 1015. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 1005 is increased; when the ambient light intensity is low, the display brightness of the touch display screen 1005 is turned down. In another embodiment, the processor 1001 may also dynamically adjust the shooting parameters of the camera assembly 1006 according to the intensity of the ambient light collected by the optical sensor 1015.
Proximity sensor 1016, also known as a distance sensor, is typically disposed on a front panel of terminal 1000. Proximity sensor 1016 is used to gather the distance between the user and the front face of terminal 1000. In one embodiment, when proximity sensor 1016 detects that the distance between the user and the front surface of terminal 1000 gradually decreases, processor 1001 controls touch display 1005 to switch from a bright screen state to a dark screen state; when proximity sensor 1016 detects that the distance between the user and the front of terminal 1000 is gradually increased, touch display screen 1005 is controlled by processor 1001 to switch from a breath-screen state to a bright-screen state.
Those skilled in the art will appreciate that the configuration shown in FIG. 10 is not intended to be limiting and that terminal 1000 can include more or fewer components than shown, or some components can be combined, or a different arrangement of components can be employed.
In an exemplary embodiment, there is also provided a non-transitory computer-readable storage medium having stored therein a computer program which, when executed by a processor, implements the above-described storage method of order information or query method of order information.
In an exemplary embodiment, there is also provided a computer program product for implementing the above-mentioned storage method of order information or the query method of order information when the computer program product is executed by a processor.
It should be understood that reference to "a plurality" herein means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. In addition, the step numbers described herein only exemplarily show one possible execution sequence among the steps, and in some other embodiments, the steps may also be executed out of the numbering sequence, for example, two steps with different numbers are executed simultaneously, or two steps with different numbers are executed in a reverse order to the order shown in the figure, which is not limited by the embodiment of the present application.
The above description is only exemplary of the present application and should not be taken as limiting, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (15)

1. A method for storing order information, the method comprising:
receiving order information from a client;
generating random salt, and storing the random salt and the order information into a database;
performing salting processing on a first order identification corresponding to the order information to obtain a second order identification, wherein the salting processing comprises splicing the first order identification and the random salt;
and sending the second order identification to the client.
2. The method according to claim 1, wherein the step of performing salting processing on the first order identifier corresponding to the order information to obtain a second order identifier comprises:
reading a first order identification corresponding to the order information from the database;
respectively encrypting the first order mark and the random salt;
and splicing the encrypted first order identification and the encrypted random salt to obtain a second order identification.
3. The method of claim 2, wherein said separately encrypting said first order identification and said random salt comprises:
encrypting the first order identification by adopting a first encryption algorithm;
encrypting the random salt by adopting a second encryption algorithm;
wherein the first and second encryption algorithms are inverse solvable encryption algorithms.
4. The method according to claim 2, wherein the splicing the encrypted first order identifier and the encrypted random salt to obtain the second order identifier comprises:
determining a splicing character;
and according to the splicing character, splicing the encrypted first order identification and the encrypted random salt to obtain a second order identification.
5. The method according to any one of claims 1 to 4,
the first order identification comprises: the ID is added by oneself.
6. A method for inquiring order information is characterized in that the method comprises the following steps:
receiving an order query request from a client, wherein the order query request carries a second order identifier, and the second order identifier is an order identifier obtained after the first order identifier is subjected to salt adding treatment;
analyzing the second order identification to obtain the first order identification;
and according to the first order identification, inquiring order information corresponding to the first order identification in a database.
7. The method of claim 6, wherein the second order identification comprises: the first order identification after the encryption processing and the random salt after the encryption processing are spliced;
the analyzing the second order identifier to obtain the first order identifier includes:
splitting the second order identification to obtain the encrypted first order identification and the encrypted random salt;
and performing inverse solution on the encrypted first order identification to obtain the first order identification.
8. The method according to claim 7, wherein the splitting the second order identifier to obtain the encrypted first order identifier and the encrypted random salt comprises:
determining a splicing character;
and splitting the second order identification according to the splicing character to obtain the encrypted first order identification and the encrypted random salt.
9. The method according to claim 7, wherein the inverse solving of the encrypted first order identifier to obtain the first order identifier comprises:
according to a first encryption algorithm, carrying out inverse solution on the encrypted first order identification to obtain the first order identification;
wherein the first encryption algorithm is an inverse solvable encryption algorithm.
10. The method of claim 7, further comprising:
carrying out reverse solution on the encrypted random salt to obtain a first random salt;
comparing the second random salt corresponding to the inquired order information with the first random salt;
under the condition that the second random salt is equal to the first random salt, returning the order information to the client;
and under the condition that the second random salt is not equal to the first random salt, returning query failure information to the client.
11. The method according to claim 10, wherein said inverse solving said encrypted random salt to obtain a first random salt comprises:
according to a second encryption algorithm, carrying out reverse solution on the encrypted random salt to obtain the first random salt;
wherein the second encryption algorithm is an inverse solvable encryption algorithm.
12. An apparatus for storing order information, the apparatus comprising: the device comprises a receiving module, a storage module, a salt adding module and a sending module;
the receiving module is configured to receive order information from a client;
the storage module is configured to generate random salt and store the random salt and the order information into a database;
the salt adding module is configured to add salt to a first order identifier corresponding to the order information to obtain a second order identifier, and the salt adding process includes splicing the first order identifier and the random salt;
the sending module is configured to send the second order identifier to the client.
13. An apparatus for querying order information, the apparatus comprising: the system comprises a receiving module, an analysis module and a query module;
the receiving module is configured to receive an order query request from a client, wherein the order query request carries a second order identifier, and the second order identifier is an order identifier obtained after the first order identifier is subjected to salt adding processing;
the analysis module is configured to analyze the second order identifier to obtain the first order identifier;
the query module is configured to query order information corresponding to the first order identifier in a database according to the first order identifier.
14. A computer device, characterized in that the computer device comprises a processor and a memory, wherein a computer program is stored in the memory, and the computer program is loaded by the processor and executed to implement the storage method of order information according to any one of claims 1 to 5 or the query method of order information according to any one of claims 6 to 11.
15. A non-transitory computer-readable storage medium on which a computer program is stored, the computer program, when executed by a processor, implementing a method of storing order information according to any one of claims 1 to 5 or a method of querying order information according to any one of claims 6 to 11.
CN202010468689.6A 2020-05-28 2020-05-28 Storage method, query method, device, equipment and storage medium of order information Withdrawn CN111680039A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010468689.6A CN111680039A (en) 2020-05-28 2020-05-28 Storage method, query method, device, equipment and storage medium of order information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010468689.6A CN111680039A (en) 2020-05-28 2020-05-28 Storage method, query method, device, equipment and storage medium of order information

Publications (1)

Publication Number Publication Date
CN111680039A true CN111680039A (en) 2020-09-18

Family

ID=72453421

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010468689.6A Withdrawn CN111680039A (en) 2020-05-28 2020-05-28 Storage method, query method, device, equipment and storage medium of order information

Country Status (1)

Country Link
CN (1) CN111680039A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116092623A (en) * 2023-04-12 2023-05-09 四川执象网络有限公司 Health data management method based on basic medical quality control

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5764766A (en) * 1996-06-11 1998-06-09 Digital Equipment Corporation System and method for generation of one-time encryption keys for data communications and a computer program product for implementing the same
CN106294450A (en) * 2015-05-28 2017-01-04 阿里巴巴集团控股有限公司 A kind of intersection record inquiry processing method and equipment
CN109743161A (en) * 2018-12-29 2019-05-10 上海掌门科技有限公司 Information ciphering method, electronic equipment and computer-readable medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5764766A (en) * 1996-06-11 1998-06-09 Digital Equipment Corporation System and method for generation of one-time encryption keys for data communications and a computer program product for implementing the same
CN106294450A (en) * 2015-05-28 2017-01-04 阿里巴巴集团控股有限公司 A kind of intersection record inquiry processing method and equipment
CN109743161A (en) * 2018-12-29 2019-05-10 上海掌门科技有限公司 Information ciphering method, electronic equipment and computer-readable medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116092623A (en) * 2023-04-12 2023-05-09 四川执象网络有限公司 Health data management method based on basic medical quality control
CN116092623B (en) * 2023-04-12 2023-07-28 四川执象网络有限公司 Health data management method based on basic medical quality control

Similar Documents

Publication Publication Date Title
CN108833607B (en) Physical address acquisition method, device and readable medium
CN110602206B (en) Data sharing method and device based on block chain and storage medium
CN108717432B (en) Resource query method and device
CN111339086A (en) Block processing method, and data query method and device based on block chain
CN111949680A (en) Data processing method and device, computer equipment and storage medium
CN112052354A (en) Video recommendation method, video display method and device and computer equipment
CN110597801B (en) Database system and establishing method and device thereof
CN110471614B (en) Method for storing data, method and device for detecting terminal
CN110597868B (en) Information query method, device, terminal and storage medium based on block chain
CN109902089B (en) Query method and device using heterogeneous index, electronic equipment and medium
CN110597840A (en) Partner relationship establishing method, device, equipment and storage medium based on block chain
CN111680039A (en) Storage method, query method, device, equipment and storage medium of order information
CN113987326B (en) Resource recommendation method and device, computer equipment and medium
CN113051485B (en) Group searching method, device, terminal and storage medium
CN112905328B (en) Task processing method, device and computer readable storage medium
CN114329292A (en) Resource information configuration method and device, electronic equipment and storage medium
CN110928867B (en) Data fusion method and device
CN111294320B (en) Data conversion method and device
CN113051494A (en) Information display method and device, electronic equipment and storage medium
CN113204724A (en) Method and device for creating interactive information, electronic equipment and storage medium
CN112364244A (en) Multimedia data recommendation method, device, server and storage medium
CN110968549A (en) File storage method and device, electronic equipment and medium
CN114385723A (en) Data reading method and device, electronic equipment and storage medium
CN111159168A (en) Data processing method and device
CN111125095A (en) Data prefix adding method and device, electronic equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20200918