Data storage method and device
By distinguishing standard prices from special prices in the merchant price list and storing standard prices on the platform server, the system pressure and data query performance problems caused by frequent adjustment of commission rates for merchants in the existing technology are solved, and more efficient data storage and query are achieved.
Patent Information
- Application Number
- CN202311248150.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-26
- Publication Date
- 2025-04-04
AI Technical Summary
In the prior art, the commission rate of merchant categories is frequently adjusted, resulting in large workloads of operation personnel, increased pressure on systems and databases, waste of data storage and reduced query performance.
By adding the identification of price types to the merchant price list, distinguishing between standard prices and special prices, the standard prices are uniformly stored in the platform server's price list, and the merchant price list only stores special prices. Priority is given to accessing the merchant price list when querying. If it is not accessible, access the price list of the platform server to obtain the current effective price.
It reduces the workload and system pressure when adjusting the commission rate of merchant categories, reduces the data storage requirements of the database, and improves data query performance.
Smart Images

Figure CN119759895A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the technical field of big data and e-commerce platforms, and particularly to a method and device for storing data. Background Art
[0002] In the prior art, merchants who sell items through the platform need to pay commissions to the platform according to the commission rate or a fixed amount of commission. The commission rates or fixed amounts for items in different categories are different. There is a many-to-many relationship between merchants and categories. One category corresponds to multiple merchants, and one merchant operates multiple categories. For example, merchant a operates the third-level category A, so all versions of A's price information (commission rate or fixed amount) will be saved. Merchant b operates two third-level categories A and B, so all versions of A and B's price information will be saved. If the operator adjusts the category commission rate of the third-level category A, for example, from 5% to 4.5%, then the merchant category commission rate for a specified time period will be manually synchronized to merchants a and b.
[0003] The adjustment of price information of various categories brings huge workload to operators, and the synchronization of price information data of various categories of merchants also puts pressure on the system and database, especially when there are many price information adjustments of categories, the pressure is particularly obvious. It causes huge waste of database storage and greatly reduces data query performance. Summary of the invention
[0004] Embodiments of the present disclosure provide a method and apparatus for storing data.
[0005] In a first aspect, an embodiment of the present disclosure provides a method for storing data, comprising: in response to receiving contract information, parsing the name of a target merchant and price information of each category from the contract information; obtaining a price list of the target merchant; for categories whose price information is a special price, associating the special price with the category and storing it in the price list, and marking the category as a special type; for categories whose price information is a standard price, marking the category in the price list as a standard type, wherein the standard prices of various categories of different merchants are pre-stored in a price list of a platform server, and the price list of the target merchant does not store standard prices.
[0006] In some embodiments, the method further includes: in response to receiving a request to query the price of a target category of a target merchant, accessing a price list of the target merchant; if the access is not possible, accessing a price list of the platform server; and querying a standard price corresponding to the target category from the price list of the platform server.
[0007] In some embodiments, the method further includes: in response to receiving a request to query the price of a target category of a target merchant, accessing a price list of the target merchant; querying the type corresponding to the target category from the price list of the target merchant; if it is a special type, obtaining a special price for the target category.
[0008] In some embodiments, the method further includes: in response to receiving a request to query the price of a target category of a target merchant, accessing a price list of the target merchant; querying the type corresponding to the target category from the price list of the target merchant; if it is a standard type, querying the standard price corresponding to the target category from the price list of the platform server.
[0009] In some embodiments, the price list of the platform server and the price list of the target merchant both include: an effective time period and a creation time; and the method further includes: in response to receiving a request to query the price of a target category of a target merchant, accessing the price list of the target merchant; querying the effective time period corresponding to the target category from the price list of the target merchant; if the current time is not within the effective time period, accessing the price list of the platform server; if the target category in the price list of the platform server corresponds to multiple effective time periods, obtaining the standard price of the target category most recently created.
[0010] In some embodiments, the price list of the platform server and the price list of the target merchant both include: an effective time period and a creation time; and the method further includes: in response to receiving a request to query the price of a target category of a target merchant, accessing the price list of the target merchant; querying the effective time period and type corresponding to the target category from the price list of the target merchant; if there are multiple effective time periods corresponding to special types, obtaining the special price with the most recent creation time of the target category.
[0011] In some embodiments, the price list of the platform server and the price list of the target merchant both include: an effective time period and a creation time; and the method further includes: in response to receiving a request to query the price of a target category of a target merchant, accessing the price list of the target merchant; if the access is not possible, accessing the price list of the platform server; if the target category in the price list of the platform server corresponds to multiple effective time periods, obtaining the standard price of the target category most recently created.
[0012] In a second aspect, an embodiment of the present disclosure provides a device for storing data, comprising: a parsing unit, configured to, in response to receiving contract information, parse out the name of a target merchant and price information of each category from the contract information; an acquisition unit, configured to acquire a price list of the target merchant; a storage unit, configured to, for a category whose price information is a special price, associate the special price with the category and store it in the price list, and mark the category as a special type; a marking unit, configured to, for a category whose price information is a standard price, mark the category in the price list as a standard type, wherein the standard prices of various categories of different merchants are pre-stored in the price list of the platform server, and the price list of the target merchant does not store standard prices.
[0013] In some embodiments, the device also includes a change unit, which is configured to: receive a price change message of a target category; if the price change message does not include the name of the merchant to be changed, modify the price of the target category in the price list of the platform server according to the price change message; otherwise, modify the price of the target category in the price list of the merchant to be changed according to the price change message.
[0014] In some embodiments, the device also includes a query unit, which is configured to: in response to receiving a request to query the price of a target category of a target merchant, access the price list of the target merchant; if the access is not possible, access the price list of the platform server; and query the standard price corresponding to the target category from the price list of the platform server.
[0015] In some embodiments, the device also includes a query unit, which is configured to: in response to receiving a request to query the price of a target category of a target merchant, access the price list of the target merchant; query the type corresponding to the target category from the price list of the target merchant; if it is a special type, obtain the special price of the target category; if it is a standard type, query the standard price corresponding to the target category from the price list of the platform server.
[0016] In some embodiments, the price list of the platform server and the price list of the target merchant both include: an effective time period and a creation time; and the device also includes a query unit, which is configured to: in response to receiving a request to query the price of a target category of a target merchant, access the price list of the target merchant; query the effective time period corresponding to the target category from the price list of the target merchant; if the current time is not within the effective time period, access the price list of the platform server; if the target category in the price list of the platform server corresponds to multiple effective time periods, obtain the standard price of the target category most recently created.
[0017] In some embodiments, the price list of the platform server and the price list of the target merchant both include: an effective time period and a creation time; and the device also includes a query unit, which is configured to: in response to receiving a request to query the price of a target category of a target merchant, access the price list of the target merchant; query the effective time period and type corresponding to the target category from the price list of the target merchant; if there are multiple effective time periods corresponding to special types, obtain the special price with the most recent creation time of the target category.
[0018] In some embodiments, the price list of the platform server and the price list of the target merchant both include: an effective time period and a creation time; and the device also includes a query unit, which is configured to: in response to receiving a request to query the price of a target category of a target merchant, access the price list of the target merchant; if the access is not possible, access the price list of the platform server; if the target category in the price list of the platform server corresponds to multiple effective time periods, obtain the standard price of the target category most recently created.
[0019] In a third aspect, an embodiment of the present disclosure provides an electronic device for storing data, comprising: one or more processors; a storage device on which one or more computer programs are stored, and when the one or more computer programs are executed by the one or more processors, the one or more processors implement a method as described in any one of the first aspects.
[0020] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method as described in any one of the first aspects.
[0021] The method and device for storing data provided by the embodiments of the present disclosure add a price type identifier to the merchant's price list to distinguish whether the price type used is a standard type or a special type. The standard type represents that the standard price in the price list of the platform server is used to calculate the commission at that moment. The special type represents that the special price in the merchant's price list is used to calculate the commission at that moment (the special price agreed upon by the merchant and the platform operator when entering the platform).
[0022] When the platform operator enters the contract for the merchant on the page, he can specify whether the price of a certain category is standard or special. If the standard is selected, the current category price is directly checked and cannot be changed; if the special is selected, the special price can be filled in. In this way, when saving the merchant category commission rate, the standard rate does not need to be stored, and only the special rate can be stored.
[0023] When querying the price of a target category of a specified merchant, first check the merchant's price list. If you can't find it, directly check the price list of the platform server that is currently in effect for this category. If you find the price list of the merchant that is currently in effect, if this category is special, then it means you have found it. If this category is standard, you need to check the platform price list that is currently in effect for this category (that is, the standard price may be adjusted at any time, and you cannot use the special price of this merchant for this type as the price of the category that is currently in effect is the most authoritative).
[0024] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Other features, objects and advantages of the present disclosure will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:
[0026] Figure 1 is an exemplary system architecture diagram in which an embodiment of the present disclosure may be applied;
[0027] Figure 2 is a flow chart of an embodiment of a method for storing data according to the present disclosure;
[0028] Figure 3 is a schematic diagram of an application scenario of the method for storing data according to the present disclosure;
[0029] Figure 4 is a flow chart of another embodiment of a method for storing data according to the present disclosure;
[0030] Figure 5 is a schematic structural diagram of an embodiment of a device for storing data according to the present disclosure;
[0031] Figure 6 It is a structural diagram of a computer system of an electronic device suitable for implementing an embodiment of the present disclosure. DETAILED DESCRIPTION
[0032] The present disclosure is further described in detail below in conjunction with the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It is also necessary to explain that, for ease of description, only the parts related to the relevant invention are shown in the accompanying drawings.
[0033] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present disclosure may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0034] Figure 1 An exemplary system architecture is shown to which an embodiment of a method for storing data or an apparatus for storing data disclosed in the present invention can be applied.
[0035] like Figure 1 As shown, the system architecture may include a merchant terminal, a buyer terminal, a platform server and a database.
[0036] The platform's operators can pre-set standard prices for various categories and generate a price list for the platform server, including standard price information, effective time, creation time, and other information for each category.
[0037] The contract information for the use of the platform signed by the merchant through the merchant terminal and the platform may include the categories of items sold by the merchant and the price information of each category, for example, the standard price or special price of the platform's commission. The contract information may also include the effective time. The merchant's price list is generated based on the contract information. If the contract is a standard price contract, the corresponding category in the merchant's price list is only marked as a standard price, and the specific price does not need to be filled in. If the contract is a special price contract, the corresponding category in the merchant's price list is not only marked as a special price, but also needs to be filled in with a specific price.
[0038] The merchant's price list and the platform server's price list may be stored in a cache and / or a database.
[0039] After a customer purchases a merchant's product from the platform through a buyer's terminal, the platform server will obtain the price corresponding to the category of the product from the platform server's price list or the merchant's price list, and calculate the commission that the merchant needs to pay based on the price.
[0040] Continue to refer Figure 2 , shows a process 200 of an embodiment of a method for storing data according to the present disclosure. The method for storing data comprises the following steps:
[0041] Step 201, in response to receiving the contract information, parse the name of the target merchant and the price information of each category from the contract information.
[0042] In this embodiment, the execution subject of the method for storing data (for example Figure 1The platform server shown in the figure can receive the contract information from the merchant terminal through a wired connection or a wireless connection. The contract information can be a standard contract, and the name of the filled-in target merchant and the price information of each category can be parsed from the contract information through the slot of the contract template. If it is a non-standard contract, the name of the target merchant and the price information of each category can be parsed from the contract information through a natural language model.
[0043] Price information may include price type (standard price or special price) and specific price. Price may be a commission rate or a fixed commission. Contract information may also include effective time period and creation time (time when price is signed).
[0044] The following description takes the commission rate as an example of price information.
[0045] Before explaining the solution of this application, let's first explain what category commission rates and merchant category commission rates are.
[0046] The category commission rate is a time-based commission rate for the third-level category dimension. It has an effective start time and an effective end time. The rate may be different for each effective time period. The operator can enter the rate for a specified time period in the background. Take the third-level category A as an example
[0047]
[0048] Table 1
[0049] Check the category commission rate on 2022.10.01 and it is 3.5%
[0050] Check the category commission rate on July 10, 2023, and find 2 versions: 5% and 4.5%. According to the creation time, take the most recent rate: 4.5%
[0051] The merchant category commission rate is a time-based commission rate for the merchant dimension. After the merchant enters the platform and selects a category, the current category commission rate will be added to the merchant category commission rate. Of course, there are exceptions. Some large merchants will negotiate with the platform for a designated merchant category commission rate when signing a contract. For example, if a merchant has an order amount of 100 yuan for category A (third-level category) and the commission rate is 5%, then the merchant commission earned by the platform is 5 yuan.
[0052] For example, if a merchant B opens two third-level categories: A and B, the commission rates are shown in the following table:
[0053]
[0054] Table 2
[0055] Check the commission rate of merchant B on 2023.06.10. A is 5% and B is 4%.
[0056] Check the commission rate of merchant B on July 10, 2023. B is 4%. A found two versions: 5% and 4.5%. According to the creation time, the most recent rate is 4.5%.
[0057] Step 202, obtaining the price list of the target merchant.
[0058] In this embodiment, if no price list has been established for the target merchant, a blank price list with only a header but no content can be obtained. The established price list is as follows:
[0059]
[0060]
[0061] Table 3
[0062] Check the commission rate of merchant B on 2023.06.10. A is 5% and B is 4%.
[0063] Check the commission rate of merchant B on July 10, 2023. B is 4%. A finds two versions: 5% and 4.5%. According to the creation time, the most recent rate is taken: 4.5%.
[0064] Step 203: For a category whose price information is a special price, the special price is associated with the category and stored in the price table, and the category object is recorded as a special type.
[0065] In this embodiment, new records may be added to the existing price list, and the original data may be retained rather than replaced.
[0066] The solution of this application adds an identifier (standard or special) to the merchant category commission rate. Please see the table above for details. The meaning of this identifier is explained below.
[0067] Special: represents the merchant category commission rate at that moment (the special rate agreed upon by the merchant and the operator when they join the merchant)
[0068] When operators enter contracts for merchants on the page, they can specify whether the commission rate for a certain category is standard or special. If you choose special, you can fill in the special rate.
[0069] Step 204: For a category whose price information is a standard price, record the category object in the price table as a standard type.
[0070] In this embodiment, standard prices of various categories of different merchants are pre-stored in a price list of the platform server, and the price list of the target merchant does not store standard prices.
[0071] Standard: represents the merchant category commission rate at that moment. If you select Standard, you will directly check the current category commission rate and cannot change it. In this way, when saving the merchant category commission rate, the standard rate does not need to be stored, and only the special rate can be stored.
[0072] Every time the standard price changes, there is no need to update the merchant's price list. You only need to update the price list of the platform server. There is no need to synchronize the merchant's price list. At the same time, the data storage of the database will be greatly reduced.
[0073] In some optional implementations of this embodiment, the method further includes: receiving a price change message of a target category; if the price change message does not include the name of the merchant to be changed, modifying the price of the target category in the price list of the platform server according to the price change message; otherwise, modifying the price of the target category in the price list of the merchant to be changed according to the price change message. A price change message is generated when an operator adjusts a price. The price change message does not contain the merchant name if it is a change to a standard price, but must contain the merchant name if it is a change to a special price. To change the standard price of a category, you only need to modify the price list of the platform server without modifying the price lists of all merchants using that category.
[0074] In some optional implementations of this embodiment, the method further includes: in response to receiving a request to query the price of a target category of a target merchant, accessing the price list of the target merchant; if the access is not possible, accessing the price list of the platform server; and querying the standard price corresponding to the target category from the price list of the platform server. After the buyer purchases the item, the platform will deduct the merchant's commission, and it is necessary to query the price of the category to which the item belongs for the merchant. The merchant's price list is searched first, and if the query is not possible, in order to prevent deadlock, the standard price corresponding to the category is directly used.
[0075] In some optional implementations of this embodiment, the method further includes: in response to receiving a request to query the price of a target category of a target merchant, accessing the price list of the target merchant; querying the type corresponding to the target category from the price list of the target merchant; if it is a special type, obtaining the special price of the target category; if it is a standard type, querying the standard price corresponding to the target category from the price list of the platform server. The standard price may be adjusted at any time, and the special price of the merchant category cannot be used as the standard. The standard price currently in effect for the category is the most authoritative.
[0076] Continue to see Figure 3 , Figure 3 FIG. 1 is a schematic diagram of an application scenario of the method for storing data according to this embodiment. Figure 3 In the application scenario, the contract information signed between merchant b and the platform indicates that category A uses standard prices and category B uses special prices. Then, you only need to record the price of category B in merchant b's price list and mark it as a special type. Do not record the price of category A, but only mark it as a standard type. When the platform changes the price of category A, you do not need to modify merchant b's price list, but only modify the price list of the platform server. Other merchants using category A can also directly obtain the latest price information from the price list of the platform server.
[0077] Further references Figure 4 , which shows a process 400 of another embodiment of a method for storing data. The process 400 of the method for storing data includes the following steps:
[0078] Step 401 , in response to receiving a request to query the price of a target category of a target merchant, access a price list of the target merchant.
[0079] In this embodiment, after the buyer purchases an item from a target merchant on the platform, he or she can query the price (commission rate or fixed commission) that should be paid to the platform according to the target category to which the item belongs. Directly access the price list of the target merchant. The price list of the target merchant can be stored in a cache for quick search. The price list of the target merchant can also be backed up in a database.
[0080] Step 402, query the effective time period corresponding to the target category from the price list of the target merchant.
[0081] In this embodiment, the effective time period of the price is agreed upon when the contract is signed, including the effective start time and effective end time. If it expires, a new contract is usually signed and the price may be adjusted. Even after the price is adjusted, only a new record is added, and the original record is not overwritten.
[0082] Step 403: If the current time is not within the effective time period, access the price list of the platform server.
[0083] In this embodiment, if the prices in the merchant's price list are all expired, the prices in the price list of the platform server can be used. The merchant's price list may not be maintained in time and may expire. The price list of the platform server is maintained uniformly to prevent expiration.
[0084] Step 404: If the target category in the price table of the platform server corresponds to multiple effective time periods, the standard price of the target category with the most recent creation time is obtained.
[0085] In this embodiment, for example, the category commission rate on 2023.07.10 is checked, and two versions are found: 5% and 4.5%. The most recent rate is taken according to the creation time: 4.5%.
[0086] The method provided by the above-mentioned embodiment of the present disclosure can use the price list of the platform server when querying the price lists of different merchants, thereby preventing the situation where the commission cannot be deducted and the transaction cannot be completed.
[0087] In some optional implementations of this embodiment, the method also includes: in response to receiving a request to query the price of a target category of a target merchant, accessing a price list of the target merchant; querying the effective time period and type corresponding to the target category from the price list of the target merchant; if there are multiple effective time periods corresponding to special types, obtaining the special price with the most recent creation time of the target category.
[0088] In some optional implementations of this embodiment, the method further includes: in response to receiving a request to query the price of a target category of a target merchant, accessing the price list of the target merchant; if the access is not possible, accessing the price list of the platform server; if the target category in the price list of the platform server corresponds to multiple effective time periods, obtaining the standard price of the target category most recently created.
[0089] Further references Figure 5 As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a device for storing data. Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0090] like Figure 5 As shown, the device 500 for storing data in this embodiment includes: a parsing unit 501, an acquisition unit 502, a storage unit 503, and a marking unit 504. The parsing unit 501 is configured to parse the name of the target merchant and the price information of each category from the contract information in response to receiving the contract information; the acquisition unit 502 is configured to obtain the price list of the target merchant; the storage unit 503 is configured to store the special price and the category in the price list for the category whose price information is a special price, and record the category as a special type; the marking unit 504 is configured to record the category in the price list as a standard type for the category whose price information is a standard price, wherein the standard prices of various categories of different merchants are pre-stored in the price list of the platform server, and the price list of the target merchant does not store the standard price.
[0091] In this embodiment, the specific processing of the parsing unit 501, the obtaining unit 502, the storage unit 503, and the marking unit 504 of the device for storing data 500 can be referred to. Figure 2 Corresponding to step 201, step 202, step 203, and step 204 in the embodiment.
[0092] In some optional implementations of the present embodiment, the device 500 also includes a change unit (not shown in the drawings), which is configured to: receive a price change message of a target category; if the price change message does not include the name of the merchant to be changed, modify the price of the target category in the price list of the platform server according to the price change message; otherwise, modify the price of the target category in the price list of the merchant to be changed according to the price change message.
[0093] In some optional implementations of the present embodiment, the device 500 further includes a query unit (not shown in the drawings), which is configured to: in response to receiving a request to query the price of a target category of a target merchant, access the price list of the target merchant; if the access is not possible, access the price list of the platform server; and query the standard price corresponding to the target category from the price list of the platform server.
[0094] In some optional implementations of the present embodiment, the device 500 further includes a query unit, which is configured to: in response to receiving a request to query the price of a target category of a target merchant, access the price list of the target merchant; query the type corresponding to the target category from the price list of the target merchant; if it is a special type, obtain the special price of the target category; if it is a standard type, query the standard price corresponding to the target category from the price list of the platform server.
[0095] In some optional implementations of this embodiment, the price list of the platform server and the price list of the target merchant both include: an effective time period and a creation time; and the device also includes a query unit, which is configured to: in response to receiving a request to query the price of a target category of a target merchant, access the price list of the target merchant; query the effective time period corresponding to the target category from the price list of the target merchant; if the current time is not within the effective time period, access the price list of the platform server; if the target category in the price list of the platform server corresponds to multiple effective time periods, obtain the standard price of the target category most recently created.
[0096] In some optional implementations of this embodiment, the price list of the platform server and the price list of the target merchant both include: an effective time period and a creation time; and the device also includes a query unit, which is configured to: in response to receiving a request to query the price of a target category of a target merchant, access the price list of the target merchant; query the effective time period and type corresponding to the target category from the price list of the target merchant; if there are multiple effective time periods corresponding to special types, obtain the special price with the most recent creation time of the target category.
[0097] In some optional implementations of this embodiment, the price list of the platform server and the price list of the target merchant both include: an effective time period and a creation time; and the device also includes a query unit, which is configured to: in response to receiving a request to query the price of a target category of a target merchant, access the price list of the target merchant; if the access is not possible, access the price list of the platform server; if the target category in the price list of the platform server corresponds to multiple effective time periods, obtain the standard price of the target category most recently created.
[0098] It should be noted that the collection, collection, updating, analysis, processing, use, transmission, storage and other aspects of user personal information involved in the technical solution of this disclosure are in compliance with the provisions of relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. Necessary measures are taken for user personal information to prevent illegal access to user personal information data and maintain the security of user personal information, network security and national security.
[0099] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device and a readable storage medium.
[0100] An electronic device comprises: one or more processors; a storage device on which one or more computer programs are stored, and when the one or more computer programs are executed by the one or more processors, the one or more processors implement the method described in process 200 or 400.
[0101] A computer-readable medium stores a computer program, wherein the computer program implements the method described in process 200 or 400 when executed by a processor.
[0102] Figure 6A schematic block diagram of an example electronic device 600 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0103] like Figure 6 As shown, the device 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 can also be stored. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0104] A number of components in the device 600 are connected to the I / O interface 605, including: an input unit 606, such as a keyboard, a mouse, etc.; an output unit 607, such as various types of displays, speakers, etc.; a storage unit 608, such as a disk, an optical disk, etc.; and a communication unit 609, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0105] The computing unit 601 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 601 performs the various methods and processes described above, such as a method for storing data. For example, in some embodiments, the method for storing data may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 600 via ROM 602 and / or communication unit 609. When the computer program is loaded into RAM 603 and executed by the computing unit 601, one or more steps of the method for storing data described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform a method for storing data in any other appropriate manner (e.g., by means of firmware).
[0106] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0107] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0108] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0109] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0110] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0111] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the respective computers and having a client-server relationship with each other. The server may be a server of a distributed system, or a server combined with a blockchain. The server may also be a cloud server, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology. The server may be a server of a distributed system, or a server combined with a blockchain. The server may also be a cloud server, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology.
[0112] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0113] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A method for storing data, comprising: In response to receiving the contract information, parsing the name of the target merchant and price information of each category from the contract information; Obtaining a price list of the target merchant; For a category whose price information is a special price, the special price is associated with the category and stored in the price table, and the category object is recorded as a special type; For categories whose price information is standard prices, the category target in the price table is recorded as a standard type; wherein the standard prices of various categories of different merchants are pre-stored in the price table of the platform server, and the price table of the target merchant does not store standard prices.
2. The method according to claim 1, wherein: The method further comprises: Receive price change messages for target categories; If the price change message does not include the name of the merchant to be changed, modifying the price of the target category in the price list of the platform server according to the price change message; Otherwise, the price of the target category in the price list of the merchant to be changed is modified according to the price change message.
3. The method according to claim 1, wherein: The method further comprises: In response to receiving a request to query prices of a target category of a target merchant, accessing a price list of the target merchant; If this is not possible, access the price list of the platform server; The standard price corresponding to the target category is queried from the price table of the platform server.
4. The method according to claim 1, wherein: The method further comprises: In response to receiving a request to query prices of a target category of a target merchant, accessing a price list of the target merchant; Query the type corresponding to the target category from the price list of the target merchant; If it is a special type, obtain the special price of the target category; If it is a standard type, the standard price corresponding to the target category is queried from the price table of the platform server.
5. The method according to claim 1, wherein: The price list of the platform server and the price list of the target merchant both include: an effective time period and a creation time; and The method further comprises: In response to receiving a request to query prices of a target category of a target merchant, accessing a price list of the target merchant; Querying the effective time period corresponding to the target category from the price list of the target merchant; If the current time is not within the effective time period, access the price list of the platform server; If the target category in the price list of the platform server corresponds to multiple effective time periods, the standard price of the target category with the most recent creation time is obtained.
6. The method according to claim 1, wherein: The price list of the platform server and the price list of the target merchant both include: an effective time period and a creation time; and The method further comprises: In response to receiving a request to query prices of a target category of a target merchant, accessing a price list of the target merchant; Querying the effective time period and type corresponding to the target category from the price list of the target merchant; If there are multiple effective time periods corresponding to special types, the special price with the most recent creation time of the target category is obtained.
7. The method according to claim 1, wherein: The price list of the platform server and the price list of the target merchant both include: an effective time period and a creation time; and The method further comprises: In response to receiving a request to query prices of a target category of a target merchant, accessing a price list of the target merchant; If this is not possible, access the price list of the platform server; If the target category in the price list of the platform server corresponds to multiple effective time periods, the standard price of the target category with the most recent creation time is obtained.
8. A device for storing data, comprising: a parsing unit, configured to parse the name of the target merchant and price information of each category from the contract information in response to receiving the contract information; an acquisition unit, configured to acquire a price list of the target merchant; The storage unit is configured to store, for a category whose price information is a special price, the special price and the category in association with each other in the price table, and record the category as a special type; The marking unit is configured to record the category whose price information is a standard price in the price list as a standard type; wherein the standard prices of various categories of different merchants are pre-stored in the price list of the platform server, and the price list of the target merchant does not store the standard price.
9. An electronic device for storing data, comprising: one or more processors; a storage device having one or more computer programs stored thereon, When the one or more computer programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
10. A computer readable medium having a computer program stored thereon, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.