CN109684211B - Order scheduling system pressure testing method and device based on shop dimensions - Google Patents

Order scheduling system pressure testing method and device based on shop dimensions Download PDF

Info

Publication number
CN109684211B
CN109684211B CN201811552956.7A CN201811552956A CN109684211B CN 109684211 B CN109684211 B CN 109684211B CN 201811552956 A CN201811552956 A CN 201811552956A CN 109684211 B CN109684211 B CN 109684211B
Authority
CN
China
Prior art keywords
information
shop
pressure measurement
order
pressure
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811552956.7A
Other languages
Chinese (zh)
Other versions
CN109684211A (en
Inventor
吴文辉
张英龙
王东石
朱占磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing SF Intra City Technology Co Ltd
Original Assignee
Beijing SF Intra City 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 SF Intra City Technology Co Ltd filed Critical Beijing SF Intra City Technology Co Ltd
Priority to CN201811552956.7A priority Critical patent/CN109684211B/en
Publication of CN109684211A publication Critical patent/CN109684211A/en
Application granted granted Critical
Publication of CN109684211B publication Critical patent/CN109684211B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • 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
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0631Resource planning, allocation, distributing or scheduling for enterprises or organisations
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Human Resources & Organizations (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Strategic Management (AREA)
  • Economics (AREA)
  • Computer Hardware Design (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Finance (AREA)
  • General Business, Economics & Management (AREA)
  • Marketing (AREA)
  • General Engineering & Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Development Economics (AREA)
  • Educational Administration (AREA)
  • Game Theory and Decision Science (AREA)
  • Operations Research (AREA)
  • Tourism & Hospitality (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Measuring Fluid Pressure (AREA)

Abstract

The embodiment of the invention provides a method and a device for testing the pressure of an order scheduling system based on store dimensions, wherein the method comprises the following steps: according to a preset acquisition period, acquiring a unique identification of a basic shop, coordinate information of the basic shop, knight information of the basic shop, peak order information of the basic shop and order information needing immediate scheduling of the basic shop; generating a pressure measurement template according to the information; configuring pressure measurement and initializing pressure measurement; updating knight information, updating order state and placing an order for a new order according to the configured pressure measurement pressure; and if the pressure measurement is judged to be finished, acquiring a pressure measurement result. According to the order scheduling system pressure testing method and device based on store dimensions, reliable real-time data are guaranteed during pressure measurement through regular online data acquisition, and temporary generation is not needed; during pressure testing, the complete pressure testing process is realized by configuring the pressure to be tested, implementing the pressure testing and collecting the pressure testing result.

Description

Order scheduling system pressure testing method and device based on shop dimensions
Technical Field
The embodiment of the invention relates to the technical field of system testing, in particular to a method and a device for testing pressure of an order scheduling system based on shop dimensions.
Background
Along with the abundance of the system in the field of intelligent logistics, in order to ensure that the system can stably operate for a long time in various scenes, the pressure test of the system is a very critical ring.
In the prior art, for a pressure test of scheduling service taking a shop as a dimension, shop data, order data, construction of knight data and the like are generally required to be temporarily generated; and there is no complete test flow.
Disclosure of Invention
In order to solve the problem in the pressure test of the existing order scheduling service, the embodiment of the invention provides a method and a device for testing the pressure of an order scheduling system based on store dimensions.
In a first aspect, an embodiment of the present invention provides a method for testing pressure of an order scheduling system based on store dimensions, where the method includes: the automatic acquisition process specifically comprises the following steps: acquiring basic shop information and the number of total online shops according to a preset acquisition period, wherein the basic shop information comprises a unique identifier of a basic shop, coordinate information of the basic shop, knight information of the basic shop and peak order information of the basic shop; obtaining order information which needs to be immediately scheduled by the basic shop according to the peak value order information of the basic shop; generating a pressure measurement template according to the basic shop information, the on-line total shop quantity and the order information of the basic shop needing to be immediately scheduled, wherein the pressure measurement template comprises pressure measurement shop information, pressure measurement knight information and pressure measurement order information; the pressure testing process specifically comprises the following steps: configuring pressure measurement and initializing pressure measurement; updating knight information, updating order state and placing an order for a new order according to the configured pressure measurement pressure; and if the pressure measurement is judged to be finished, acquiring a pressure measurement result.
In a second aspect, an embodiment of the present invention provides an order scheduling system stress testing apparatus based on store dimensions, including: the automatic collection sub-device is specifically used for: acquiring basic shop information and the number of total online shops according to a preset acquisition period, wherein the basic shop information comprises a unique identifier of a basic shop, coordinate information of the basic shop, knight information of the basic shop and peak order information of the basic shop; obtaining order information which needs to be immediately scheduled by the basic shop according to the peak value order information of the basic shop; generating a pressure measurement template according to the basic shop information, the on-line total shop quantity and the order information of the basic shop needing to be immediately scheduled, wherein the pressure measurement template comprises pressure measurement shop information, pressure measurement knight information and pressure measurement order information; the pressure testing sub-device is specifically used for: configuring pressure measurement and initializing pressure measurement; updating knight information, updating order state and placing an order for a new order according to the configured pressure measurement pressure; and if the pressure measurement is judged to be finished, acquiring a pressure measurement result.
In a third aspect, an embodiment of the present invention provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the method provided in the first aspect when executing the program.
In a fourth aspect, an embodiment of the present invention provides a non-transitory computer readable storage medium, on which a computer program is stored, which when executed by a processor, implements the steps of the method as provided in the first aspect.
According to the order scheduling system pressure testing method and device based on the shop dimension, provided by the embodiment of the invention, the on-line data is collected periodically, and shop information, knight information and order information for pressure testing are generated, so that reliable real-time data during pressure testing are ensured, and temporary generation is not needed; during pressure testing, the complete pressure testing process is realized by configuring the pressure to be tested, implementing the pressure testing and collecting the pressure testing result.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a flow chart of a method for stress testing of an order scheduling system based on store dimensions according to an embodiment of the present invention;
FIG. 2 is a flow chart illustrating an automatic collection of a method for stress testing of an order scheduling system based on store dimensions according to another embodiment of the present invention;
FIG. 3 is a pressure testing flowchart of a pressure testing method of the order scheduling system based on the store dimension according to another embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a pressure testing apparatus of an order scheduling system based on store dimensions according to an embodiment of the present invention;
fig. 5 is a schematic physical structure diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a flowchart of a pressure testing method for an order scheduling system based on store dimensions according to an embodiment of the present invention. As shown in fig. 1, the method includes:
step 101, an automatic acquisition process, specifically comprising: acquiring basic shop information and the number of total online shops according to a preset acquisition period, wherein the basic shop information comprises a unique identifier of a basic shop, coordinate information of the basic shop, knight information of the basic shop and peak order information of the basic shop; obtaining order information which needs to be immediately scheduled by the basic shop according to the peak value order information of the basic shop; generating a pressure measurement template according to the basic shop information, the on-line total shop quantity and the order information of the basic shop needing to be immediately scheduled, wherein the pressure measurement template comprises pressure measurement shop information, pressure measurement knight information and pressure measurement order information;
and carrying out the automatic acquisition process according to a preset acquisition period. The acquisition period may be set by filling in a configuration file, for example, set to acquire once in 7 days.
According to a preset acquisition period, basic shop information and the number of on-line total shops are obtained, wherein the basic shop information comprises a unique identification of a basic shop, coordinate information of the basic shop, knight information of the basic shop and peak order information of the basic shop. The basic store information refers to information of one real store obtained from the internet, and the basic store is used as an actual store for generating a simulated store which is higher than the total number of the online actual stores for performing the stress test. The unique identification of the base store may be a store ID, the coordinate information of the base store may be latitude and longitude information, the knight information of the base store includes an average number of knights (in days) of the base store, and the peak order information of the base store includes a peak order number of the base store. The total online store quantity refers to the actual total amount of stores on the order scheduling system line.
And obtaining the order information which needs to be immediately scheduled by the basic shop according to the peak order information of the basic shop. The order information needing to be immediately scheduled by the base shop comprises the order quantity needing to be immediately scheduled by the base shop. The peak order quantity of the base store may reflect the order quantity that the base store needs to schedule immediately, and the order quantity that the base store needs to schedule immediately may be set to a value greater than the peak order quantity of the base store for stress testing. According to the relation between the peak order quantity of the basic shop and the order quantity required to be immediately scheduled by the basic shop, the order information required to be immediately scheduled by the basic shop can be obtained according to the peak order information of the basic shop.
And generating a pressure measurement template according to the basic shop information, the on-line total shop quantity and the order information of the basic shop needing immediate dispatching, wherein the pressure measurement template comprises pressure measurement shop information, pressure measurement knight information and pressure measurement order information. The pressure test shop information refers to shop information for pressure tests, the pressure test rider information refers to rider information for pressure tests, and the pressure test order information refers to order information for pressure tests.
The basic store information comprises a unique identification of a basic store, coordinate information of the basic store and knight information of the basic store, and the pressure measuring store information and the pressure measuring knight information can be obtained according to the basic store information and the number of the on-line main shops; and obtaining the pressure measurement order information according to the basic shop information, the on-line total shop quantity and the order information of the basic shop needing to be immediately scheduled.
Step 102, a pressure test process, which specifically comprises: configuring pressure measurement and initializing pressure measurement; updating knight information, updating order state and placing an order for a new order according to the configured pressure measurement pressure; and if the pressure measurement is judged to be finished, acquiring a pressure measurement result.
According to the requirement of the pressure test, the pressure test can be carried out at any time when the pressure test is required, and the pressure test shop information, the pressure test rider information and the pressure test order information which are obtained by the automatic acquisition process are utilized in the pressure test. Because the automatic acquisition cycle is carried out, the data information obtained by the latest completed acquisition cycle can be utilized during the pressure test.
The pressure test is firstly carried out with the configuration of the pressure measurement and the initialization of the pressure measurement. The configuration of the pressure measurement is mainly used for setting the rule condition of the pressure measurement; the pressure measurement initialization is mainly used for loading relevant information for pressure measurement. And updating knight information, updating order state and placing an order according to the configured pressure measurement, namely implementing the pressure test. According to the configuration of the pressure measurement pressure, the information of the pressure measurement shop, the information of the pressure measurement knight and the information of the pressure measurement order, the operation of updating the knight information, updating the order state and placing an order of a new order is carried out on the basis of an order scheduling system, and a series of processes of actually placing the order, assigning the order, dispatching the order, completing the order and the like are simulated so as to carry out pressure test.
And judging that the pressure measurement is finished according to set conditions, such as the maximum number of stores reaching the pressure measurement, the pressure measurement is actively stopped, the next single round reaches the maximum, and the like. And if the pressure test is judged to be finished, acquiring a pressure test result, wherein the pressure test result is used for reflecting whether the order scheduling system can stably work under the applied pressure, so that the performance of the system is judged according to the pressure test result, and the pressure test is completed.
According to the embodiment of the invention, the on-line data is regularly acquired, and the shop information, the knight information and the order information for pressure measurement are generated, so that reliable real-time data are ensured during pressure measurement, and temporary generation is not needed; during pressure testing, the complete pressure testing process is realized by configuring the pressure to be tested, implementing the pressure testing and collecting the pressure testing result.
Further, based on the above embodiment, the obtaining of the order information that needs to be immediately scheduled by the base store according to the peak order information of the base store specifically includes: and acquiring the peak order quantity of the basic shop according to the peak order information of the basic shop, and acquiring order information of a first preset multiple of the peak order quantity of the basic shop at a peak moment as order information needing to be immediately scheduled by the basic shop.
The number of orders at peak hours is more reflective of whether the system can withstand stress. The peak order information of the basic shop comprises the peak order quantity of the basic shop, and the order information needing to be immediately scheduled by the basic shop comprises the order quantity needing to be immediately scheduled by the basic shop. The number of orders that the base store needs to be scheduled immediately may be set to a first preset multiple of the peak number of orders for the base store. The first preset multiple may be 1.5 times. The peak hours include the time periods when peak order quantities occur. Therefore, the order information of the first preset multiple of the peak order quantity of the basic shop at the peak time can be collected as the order information needing to be immediately scheduled by the basic shop.
On the basis of the embodiment, the reliability of the pressure measurement order information is improved by acquiring the order information of the first preset multiple of the peak order quantity of the basic shop at the peak time as the order information needing to be immediately scheduled by the basic shop.
Further, based on the above embodiment, the process of generating the press measurement shop information, the press measurement knight information, and the press measurement order information specifically includes: performing coordinate offset on the coordinate information of the basic shop to generate a preset number of coordinate offset data pairs; the preset number is the number of the total online shops multiplied by a second preset multiple; according to the preset number of coordinate offset data pairs, respectively carrying out coordinate offset on the coordinate information of the basic shop to obtain the pressure-measuring shop information; and respectively carrying out corresponding coordinate offset on the knight information of the basic shop and the order information of the basic shop needing immediate scheduling to obtain the pressure measurement knight information and the pressure measurement order information.
The pressure test performed in the embodiment of the present invention performed the pressure test using a larger number of stores than the number of actual on-line main stores. And generating a pressure measurement template according to the basic shop information, the on-line total shop quantity and the order information of the basic shop needing to be immediately scheduled. The pressure test can be performed by "copying" the base store information and generating a simulated store laid out at a plurality of coordinate positions as a pressure test store.
Since the base store information includes the coordinate information of the base store, the coordinate information of the base store is subjected to coordinate offset first, and a preset number of coordinate offset data pairs are generated. The preset number is determined according to the number of shops to be subjected to the pressure test. The preset number may be set to a value greater than the number of on-line total stores, and thus, the preset number may be determined according to the number of on-line total stores. The preset number is the number of the total online stores multiplied by a second preset multiple, and the second preset multiple may be 1.5 times. For example, if the number of total shops on the line is 100, 150 coordinate offset data pairs may be generated.
And respectively carrying out coordinate offset on the coordinate information of the basic shop according to the preset number of coordinate offset data pairs to obtain the pressure measuring shop information. For example, from the generated 150 coordinate offset data pairs, coordinate offset is performed on the coordinate information of the base store, and 150 simulated stores can be obtained. Shifting the coordinates of the coordinate information of the base store corresponds to changing the position information of the base store. Since the coordinate offset pair may include (0,0), the generated pressure measurement store may include the base store. Each pressure testing shop can generate a corresponding unique identifier according to the form of the unique identifier of the basic shop. The pressure test store information may include an address of the pressure test store and a unique identifier.
And according to the preset number of coordinate offset data pairs, respectively carrying out corresponding coordinate offset on the knight information of the basic shop and the order information of the basic shop needing immediate scheduling to obtain the pressure measurement knight information and the pressure measurement order information, so that the relative positions of the pressure measurement knight information and the pressure measurement order information and the pressure measurement shop information are kept unchanged.
On the basis of the embodiment, the coordinate offset is carried out on the coordinate information of the basic shop, so that the pressure measurement shop information, the pressure measurement rider information and the pressure measurement order information are obtained, and sufficient pressure measurement data capable of simulating real data is guaranteed.
Further, based on the above embodiment, the configuring of the pressure measurement pressure specifically includes: configuring the number of the starting shops, the maximum number of the shops, the number of the shops increased per round, the number of orders per round, the order number of orders per shop once, the number of knights per shop and the upper limit of the number of orders of a single knight.
Before pressure measurement is carried out, relevant configuration information of the pressure measurement needs to be set, and the configuration can be called as the configuration for carrying out the pressure measurement. The configuration of the pressure measurement pressure specifically includes: configuring the number of the starting shops, the maximum number of the shops, the number of the shops increased per round, the number of orders per round, the order number of orders per shop once, the number of knights per shop and the upper limit of the number of orders of a single knight.
The number of the starting shops and the maximum number of the shops refer to the number of the shops set in the first round of pressure measurement and the number of the shops set in the last round of pressure measurement when the pressure test is performed in a mode of gradually increasing the pressure. The number of stores increased in each round refers to the number of stores increased in the latter round compared with the former round when the pressure test is performed in a mode of gradually increasing the pressure. The number of orders of each round sets the number of orders of one round of pressure test. The number of orders placed at a time per store sets the number of orders placed for a single store in a round of pressure testing. The number of knights per store and the single knight order number upper limit set the number of knights per store in the stress test and the maximum number of orders that can be assigned by each knight.
On the basis of the embodiment, the embodiment of the invention enables the pressing to be followed by the chapter through the configuration of the pressure measurement, thereby ensuring the normal operation of the pressure test.
Further, based on the above embodiment, the performing pressure measurement initialization specifically includes: and loading the pressure measurement shop information, the pressure measurement knight information and the pressure measurement order information.
The pressure measurement initialization specifically includes: and loading the pressure measurement shop information, the pressure measurement knight information and the pressure measurement order information. The step of loading the pressure testing shop information, the pressure testing rider information and the pressure testing order information means that the periodically generated pressure testing shop information, the pressure testing rider information and the pressure testing order information are obtained to be used for pressure testing, and pressure testing preparation is made.
If the pressure test is carried out in a mode of gradually increasing the pressure, the pressure test shop information, the pressure test rider information and the pressure test order information corresponding to the shop with the maximum number can be obtained at one time, and the pressure test shop information, the pressure test rider information and the pressure test order information can be obtained according to the requirement of each round of pressure test.
On the basis of the embodiment, the embodiment of the invention carries out pressure measurement initialization by loading the pressure measurement shop information, the pressure measurement rider information and the pressure measurement order information, and provides a basis for implementing pressure measurement.
Further, based on the above embodiment, the collecting of the pressure measurement result specifically includes: collecting data records of pressure measurement, including collecting order quantity information, order assignment condition record information, memory use information of a machine and cpu use condition information; collecting logs of a scheduling system, including collecting error logs and time consumed by each round; the elapsed time for each round comprises an assignment elapsed time; and collecting scheduling conditions, including collecting the residual information of each round of orders and the statistical information of the assigned quantity of the orders.
The pressure test refers to the pressure test of the order scheduling system, and the pressure test result can reflect the performance condition of the order scheduling system facing the applied scheduling pressure.
The collecting of the pressure measurement result specifically comprises: collecting a data record of pressure measurement, wherein the data record comprises order quantity information, order assignment condition record information, memory use information of a machine and cpu use condition information; collecting logs of a scheduling system, including collecting error logs and time consumed by each round; the elapsed time for each round comprises an assignment elapsed time; and collecting scheduling conditions, including collecting the residual information of each round of orders and the statistical information of the assigned quantity of the orders.
On the basis of the embodiment, the embodiment of the invention ensures the comprehensiveness of the pressure measurement result by collecting the data record of the pressure measurement, the log of the scheduling system and the scheduling condition.
Further, according to the above embodiment, the unique identifier of the base store and the coordinate information of the base store are obtained by reading a configuration file.
Information of the online basic stores, including the unique identification of the basic stores and the coordinate information of the basic stores, can be configured in a mode of writing configuration files. Accordingly, when the pressing is performed, the unique identification of the base store and the coordinate information of the base store can be read in a mode of reading the configuration file.
On the basis of the embodiment, the unique identification of the basic store and the coordinate information of the basic store are acquired by reading the configuration file, so that the convenience of acquiring the information of the basic store is improved.
Fig. 2 is a flow chart illustrating automatic collection of a method for stress testing of an order scheduling system based on store dimensions according to another embodiment of the present invention. As shown in fig. 2, the steps of the automatic acquisition process include:
step 201: a user configures information of an online basic shop in a mode of filling a configuration file; the period of automatic acquisition is configured (e.g., once in 7 days).
Step 202: through the command line, the automatic collector is started.
Step 203: and acquiring an acquisition period from the configuration file, and circularly acquiring according to the acquisition period.
Step 204: and acquiring the basic shop information in the configuration file.
Step 205: judging whether the basic store information is complete, if not, jumping to step 215, and completing one round of acquisition; otherwise jump to 206.
Step 206: the total system store number SMax is acquired and saved.
Step 207: the average number of knights per day for the base store is obtained and saved.
Step 208: the peak order quantity, OMax, of the base store is obtained and saved.
Step 209: and acquiring order information of the basic shop, which needs to be subjected to order scheduling immediately.
Step 210: according to the peak value OMax of the order of the shop collected in the step 208, the order information at the peak moment is collected, and the quantity of the collected orders is 1.5 times of the OMax.
Step 211: based on the coordinate information (lat, lng) of the base store, the total store number SMax 1.5 times is randomly shifted in coordinates, and SMax 1.5 pieces of shift information are generated and stored.
And step 212, performing the same offset on the base store according to the offset generated in the step 211 to generate SMax 1.5 new store shop _ list.
Step 213: the order information generated in step 210 is offset the same from the coordinate offset information generated in step 211 so that the relative position of the order to the store remains the same.
Step 214: store information of step 212 and order information of step 213 are saved.
Step 215: and jumping to the step 203 after one round of acquisition is completed, and circulating.
Fig. 3 is a pressure testing flowchart of a pressure testing method of an order scheduling system based on store dimensions according to another embodiment of the present invention. As shown in fig. 2, the steps of the pressure test procedure include:
step 301: the user configures the pressure measurement by filling in a configuration file, such as: the number of starting shops shop _ start; the maximum number of stores shop _ max; the number shop _ step increased in each round; how many times each round of ordering, how many times each shop of ordering; how many knight in each shop, how many orders can be assigned on the knight at most, and the like.
Step 302: according to the configuration in the step 301, initializing data before pressure measurement, including pre-generating rider information rider _ list according to shop information shop _ list stored by an automatic acquisition device and the number of riders in a single shop; and acquiring orders of order _ num from the order information stored by the automatic acquisition device according to the order quantity order _ num of the single store which is set in the step 301 and is placed once.
Step 303: and judging the pressure measurement process, judging whether the pressure measurement is finished, wherein the judgment logic comprises the conditions of whether the number of shops reaches the maximum value, whether the pressure measurement is actively stopped, whether the next round reaches the maximum value and the like. If the pressure measurement is finished, skipping to step 312 for pressure measurement result acquisition; otherwise, go to step 304.
Step 304: the system pressure measurement operation comprises three sub-operations of calling 305, 308 and 309. Three operations are performed in parallel.
Step 305: the system updates the operation of the knight information, simulates the knight to return to the shop, and refreshes the updating time.
Step 306: and judging whether the updating is needed, if so, jumping to the step 307 for updating, and otherwise, jumping to the step 303. The judgment condition is defined by a user, and can be set to be periodically updated or updated only once.
And 307, updating the rider information by using the rider _ list initialized in the step 302.
Step 308: and performing order state updating operation to simulate that the order is completely delivered. After the operation is completed, the process goes to step 303.
Step 309: and (5) placing a new order.
Step 310: and judging whether a new order is required to be placed or not, if not, jumping to the step 303, and if so, jumping to the step 311.
Step 311: and performing order simulation placing for each store according to each store order _ num initialized in the step 302 and the store information shop _ list.
Step 312: and (4) performing pressure measurement data recording, including recording data such as the use condition (CPU, memory and the like) of the machine, the order placing condition of a new order, the order placing period, the order placing time each time, the order placing quantity, the shop condition of each round and the like.
Step 313: collecting logs of scheduling service, including collecting error logs, scheduling time consumption (assignment time, etc.)
Step 314: and analyzing and recording the scheduling condition, including analyzing the data such as the order pressing condition of each new order, the scheduling condition of the order, the order pressing condition under different pressure conditions and the like.
Step 315: and finishing the pressure measurement.
The order scheduling system pressure testing method based on store dimensions provided by the embodiment of the invention is further explained through two application scenarios.
Scene one: there is now a test task that needs to verify the stability of the system, which is the operation of the system, under 500 stores, 10 knights at each store, and 10 maximum orders are placed at each time. The system was used for pressure testing. The automatic acquisition sub-device is used for finding a reference shop from the line, taking the coordinate information of the reference shop, and then taking order information at the peak of the shop, wherein the number of orders is more than 10. Then, using a pressure testing sub-device, and setting the starting shop number shop _ start to be 500; the maximum shop number shop _ max is 500; the number shop _ step increased every round is 0; each round of ordering is performed for 10 times, the ordering period is 30 s/time, and each shop orders 10 times; 10 knight per store. Initialization was performed, 500 stores, 500 knight, 10, 500 order information. And after the initialization is finished, performing pressure test, and simultaneously performing operations such as knight information updating, order state updating, new order placing and the like. The knight information only needs to be updated once before the pressure measurement, and the order state is updated every 30 s. New orders are placed, 500 stores at a time. The pressure measurements were observed and recorded. The method comprises the data of whether each order can be normally assigned, whether the order is pressed, whether an error log is generated, whether the memory and the CPU of the machine are normally used and the like.
Scene two: there is now a test task that requires verification of the stability of the system, which is the running condition of the system, under 50-500 stores, 10 knights in each store, 10 orders placed in each maximum order. The system was used for pressure testing. Setting the starting shop number shop _ start to 50; the maximum shop number shop _ max is 500; the number shop _ step increased for each round is 50; each round of ordering is performed for 10 times, the ordering period is 30 s/time, and each shop orders 10 times; 10 knight per store. Initialization was performed, 500 stores, 500 knight, 10, 500 order information. Then, a pressure test was performed. At the place where the new order is placed, according to the number of stores in the round, for example, the first round, the placing of 50 stores is performed, and the second round, the placing of 100 stores is performed. And finally, collecting a pressure measurement result.
According to the embodiment of the invention, the on-line data is regularly acquired, and the shop information, the knight information and the order information for pressure measurement are generated, so that reliable real-time data are ensured during pressure measurement, and temporary generation is not needed; the order and shop information used by pressure measurement are automatically acquired, so that the real-time performance and reliability of the order are guaranteed; during pressure testing, the complete pressure testing process is realized by configuring the pressure to be tested, implementing the pressure testing and collecting the pressure testing result.
Fig. 4 is a schematic structural diagram of a pressure testing apparatus of an order scheduling system based on store dimensions according to an embodiment of the present invention. As shown in fig. 4, the apparatus includes an automatic acquisition sub-apparatus 10 and a pressure test sub-apparatus 20, wherein:
the automatic acquisition sub-device 10 is particularly intended for: acquiring basic shop information and the number of total online shops according to a preset acquisition period, wherein the basic shop information comprises a unique identifier of a basic shop, coordinate information of the basic shop, knight information of the basic shop and peak order information of the basic shop; obtaining order information which needs to be immediately scheduled by the basic shop according to the peak value order information of the basic shop; generating a pressure measurement template according to the basic shop information, the on-line total shop quantity and the order information of the basic shop needing to be immediately scheduled, wherein the pressure measurement template comprises pressure measurement shop information, pressure measurement knight information and pressure measurement order information;
the pressure test sub-assembly 20 is specifically configured to: configuring pressure measurement and initializing pressure measurement; updating knight information, updating order state and placing an order for a new order according to the configured pressure measurement pressure; and if the pressure measurement is judged to be finished, acquiring a pressure measurement result.
According to the embodiment of the invention, the on-line data is regularly acquired, and the shop information, the knight information and the order information for pressure measurement are generated, so that reliable real-time data are ensured during pressure measurement, and temporary generation is not needed; during pressure testing, the complete pressure testing process is realized by configuring the pressure to be tested, implementing the pressure testing and collecting the pressure testing result.
Further, based on the above embodiment, when the automatic acquisition sub-apparatus 10 is configured to obtain order information that needs to be immediately scheduled by the base store according to the peak order information of the base store, the automatic acquisition sub-apparatus is specifically configured to: and acquiring the peak order quantity of the basic shop according to the peak order information of the basic shop, and acquiring order information of a first preset multiple of the peak order quantity of the basic shop at a peak moment as order information needing to be immediately scheduled by the basic shop.
On the basis of the embodiment, the reliability of the pressure measurement order information is improved by acquiring the order information of the first preset multiple of the peak order quantity of the basic shop at the peak time as the order information needing to be immediately scheduled by the basic shop.
Further, based on the above embodiment, the automatic acquisition sub-apparatus 10, when being configured to generate the pressure measurement shop information, the pressure measurement knight information, and the pressure measurement order information, is specifically configured to: performing coordinate offset on the coordinate information of the basic shop to generate a preset number of coordinate offset data pairs; the preset number is the number of the total online shops multiplied by a second preset multiple; according to the preset number of coordinate offset data pairs, respectively carrying out coordinate offset on the coordinate information of the basic shop to obtain the pressure-measuring shop information; and respectively carrying out corresponding coordinate offset on the knight information of the basic shop and the order information of the basic shop needing immediate scheduling to obtain the pressure measurement knight information and the pressure measurement order information.
On the basis of the embodiment, the coordinate offset is carried out on the coordinate information of the basic shop, so that the pressure measurement shop information, the pressure measurement rider information and the pressure measurement order information are obtained, and sufficient pressure measurement data capable of simulating real data is guaranteed.
Further, based on the above embodiment, the pressure testing sub-device 20, when configured to perform pressure testing, is specifically configured to: configuring the number of the starting shops, the maximum number of the shops, the number of the shops increased per round, the number of orders per round, the order number of orders per shop once, the number of knights per shop and the upper limit of the number of orders of a single knight.
On the basis of the embodiment, the embodiment of the invention enables the pressing to be followed by the chapter through the configuration of the pressure measurement, thereby ensuring the normal operation of the pressure test.
Further, based on the above embodiment, when the pressure testing sub-device 20 is used for performing pressure testing initialization, it is specifically configured to: and loading the pressure measurement shop information, the pressure measurement knight information and the pressure measurement order information.
On the basis of the embodiment, the embodiment of the invention carries out pressure measurement initialization by loading the pressure measurement shop information, the pressure measurement rider information and the pressure measurement order information, and provides a basis for implementing pressure measurement.
Further, based on the above embodiment, when the pressure test sub-device 20 collects the pressure test result, it is specifically configured to: collecting data records of pressure measurement, including collecting order quantity information, order assignment condition record information, memory use information of a machine and cpu use condition information; collecting logs of a scheduling system, including collecting error logs and time consumed by each round; the elapsed time for each round comprises an assignment elapsed time; and collecting scheduling conditions, including collecting the residual information of each round of orders and the statistical information of the assigned quantity of the orders.
On the basis of the embodiment, the embodiment of the invention ensures the comprehensiveness of the pressure measurement result by collecting the data record of the pressure measurement, the log of the scheduling system and the scheduling condition.
Further, based on the above-described embodiment, the automatic acquisition sub-apparatus 10 acquires the unique identifier of the base store and the coordinate information of the base store by reading a configuration file.
On the basis of the embodiment, the unique identification of the basic store and the coordinate information of the basic store are acquired by reading the configuration file, so that the convenience of acquiring the information of the basic store is improved.
The pressure testing device of the order scheduling system based on the shop dimension comprises an automatic acquisition sub-device, a pressure testing sub-device and the like. Through the automatic acquisition sub-device, on-line data is acquired regularly, reliable real-time data of pressure measurement is guaranteed, and temporary generation is not needed. The pressure testing sub-device realizes a complete pressure testing process, facilitates the implementation of a pressure testing scheme, can monitor logs, and finally outputs a pressure testing result and a scheduling condition, thereby facilitating the analysis of results.
The apparatus provided in the embodiment of the present invention is used for the method, and specific functions may refer to the method flow described above, which is not described herein again.
Fig. 5 is a schematic physical structure diagram of an electronic device according to an embodiment of the present invention. As shown in fig. 5, the electronic device may include: a processor (processor)810, a communication Interface 820, a memory 830 and a communication bus 840, wherein the processor 810, the communication Interface 820 and the memory 830 communicate with each other via the communication bus 840. The processor 810 may call logic instructions in the memory 830 to perform the following method: the automatic acquisition process specifically comprises the following steps: acquiring basic shop information and the number of total online shops according to a preset acquisition period, wherein the basic shop information comprises a unique identifier of a basic shop, coordinate information of the basic shop, knight information of the basic shop and peak order information of the basic shop; obtaining order information which needs to be immediately scheduled by the basic shop according to the peak value order information of the basic shop; generating a pressure measurement template according to the basic shop information, the on-line total shop quantity and the order information of the basic shop needing to be immediately scheduled, wherein the pressure measurement template comprises pressure measurement shop information, pressure measurement knight information and pressure measurement order information; the pressure testing process specifically comprises the following steps: configuring pressure measurement and initializing pressure measurement; updating knight information, updating order state and placing an order for a new order according to the configured pressure measurement pressure; and if the pressure measurement is judged to be finished, acquiring a pressure measurement result.
In addition, the logic instructions in the memory 830 may be implemented in software functional units and stored in a computer readable storage medium when the logic instructions are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (9)

1. A pressure testing method for an order scheduling system based on store dimensions is characterized by comprising the following steps:
the automatic acquisition process specifically comprises the following steps: acquiring basic shop information and the number of total online shops according to a preset acquisition period, wherein the basic shop information comprises a unique identifier of a basic shop, coordinate information of the basic shop, knight information of the basic shop and peak order information of the basic shop; obtaining order information which needs to be immediately scheduled by the basic shop according to the peak value order information of the basic shop; generating a pressure measurement template according to the basic shop information, the on-line total shop quantity and the order information of the basic shop needing to be immediately scheduled, wherein the pressure measurement template comprises pressure measurement shop information, pressure measurement knight information and pressure measurement order information;
the generation process of the pressure measurement shop information, the pressure measurement knight information and the pressure measurement order information specifically comprises the following steps:
performing coordinate offset on the coordinate information of the basic shop to generate a preset number of coordinate offset data pairs; the preset number is the number of the total online shops multiplied by a second preset multiple;
according to the preset number of coordinate offset data pairs, respectively carrying out coordinate offset on the coordinate information of the basic shop to obtain the pressure-measuring shop information; respectively carrying out corresponding coordinate offset on the knight information of the basic shop and the order information of the basic shop needing to be immediately scheduled to obtain the pressure measurement knight information and the pressure measurement order information;
the pressure testing process specifically comprises the following steps: configuring pressure measurement and initializing pressure measurement; updating knight information, updating order state and placing an order for a new order according to the configured pressure measurement pressure; and if the pressure measurement is judged to be finished, acquiring a pressure measurement result.
2. The method as claimed in claim 1, wherein the obtaining of the order information that the base store needs to be immediately scheduled according to the peak order information of the base store specifically comprises:
and acquiring the peak order quantity of the basic shop according to the peak order information of the basic shop, and acquiring order information of a first preset multiple of the peak order quantity of the basic shop at a peak moment as order information needing to be immediately scheduled by the basic shop.
3. The method according to claim 1, wherein the configuring of the piezometric pressure comprises:
configuring the number of the starting shops, the maximum number of the shops, the number of the shops increased per round, the number of orders per round, the order number of orders per shop once, the number of knights per shop and the upper limit of the number of orders of a single knight.
4. The method according to claim 1, wherein the performing pressure measurement initialization specifically comprises:
and loading the pressure measurement shop information, the pressure measurement knight information and the pressure measurement order information.
5. The method according to claim 1, wherein the collecting of the pressure measurement result specifically comprises:
collecting data records of pressure measurement, including collecting order quantity information, order assignment condition record information, memory use information of a machine and cpu use condition information;
collecting logs of a scheduling system, including collecting error logs and time consumed by each round; the elapsed time for each round comprises an assignment elapsed time;
and collecting scheduling conditions, including collecting the residual information of each round of orders and the statistical information of the assigned quantity of the orders.
6. The method of claim 1, wherein the unique identification of the base store and the coordinate information of the base store are obtained by reading a configuration file.
7. An order scheduling system pressure test device based on shop dimension, characterized by comprising:
the automatic collection sub-device is specifically used for: acquiring basic shop information and the number of total online shops according to a preset acquisition period, wherein the basic shop information comprises a unique identifier of a basic shop, coordinate information of the basic shop, knight information of the basic shop and peak order information of the basic shop; obtaining order information which needs to be immediately scheduled by the basic shop according to the peak value order information of the basic shop; generating a pressure measurement template according to the basic shop information, the on-line total shop quantity and the order information of the basic shop needing to be immediately scheduled, wherein the pressure measurement template comprises pressure measurement shop information, pressure measurement knight information and pressure measurement order information;
the generation process of the pressure measurement shop information, the pressure measurement knight information and the pressure measurement order information specifically comprises the following steps:
performing coordinate offset on the coordinate information of the basic shop to generate a preset number of coordinate offset data pairs; the preset number is the number of the total online shops multiplied by a second preset multiple;
according to the preset number of coordinate offset data pairs, respectively carrying out coordinate offset on the coordinate information of the basic shop to obtain the pressure-measuring shop information; respectively carrying out corresponding coordinate offset on the knight information of the basic shop and the order information of the basic shop needing to be immediately scheduled to obtain the pressure measurement knight information and the pressure measurement order information;
the pressure testing sub-device is specifically used for: configuring pressure measurement and initializing pressure measurement; updating knight information, updating order state and placing an order for a new order according to the configured pressure measurement pressure; and if the pressure measurement is judged to be finished, acquiring a pressure measurement result.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method according to any of claims 1 to 6 are implemented when the processor executes the program.
9. A non-transitory computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 6.
CN201811552956.7A 2018-12-18 2018-12-18 Order scheduling system pressure testing method and device based on shop dimensions Active CN109684211B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811552956.7A CN109684211B (en) 2018-12-18 2018-12-18 Order scheduling system pressure testing method and device based on shop dimensions

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811552956.7A CN109684211B (en) 2018-12-18 2018-12-18 Order scheduling system pressure testing method and device based on shop dimensions

Publications (2)

Publication Number Publication Date
CN109684211A CN109684211A (en) 2019-04-26
CN109684211B true CN109684211B (en) 2022-04-08

Family

ID=66186856

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811552956.7A Active CN109684211B (en) 2018-12-18 2018-12-18 Order scheduling system pressure testing method and device based on shop dimensions

Country Status (1)

Country Link
CN (1) CN109684211B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111309570A (en) * 2019-11-19 2020-06-19 天津网之易创新科技有限公司 Pressure testing method, medium, device and computing equipment
CN111813674B (en) * 2020-07-06 2021-02-23 北京嘀嘀无限科技发展有限公司 Method and device for pressure measurement of order splitting service, electronic equipment and storage medium
CN113807909A (en) * 2021-01-13 2021-12-17 北京沃东天骏信息技术有限公司 Order pressure measuring method and device, electronic equipment and storage medium
CN113177000A (en) * 2021-05-21 2021-07-27 拉扎斯网络科技(上海)有限公司 Order scheduling system testing method and device, storage medium and computer equipment
CN113592539A (en) * 2021-06-30 2021-11-02 杭州拼便宜网络科技有限公司 Shop order trend prediction method and device based on artificial intelligence and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106708818A (en) * 2015-07-17 2017-05-24 阿里巴巴集团控股有限公司 Pressure testing method and system
CN107967204A (en) * 2017-11-21 2018-04-27 百度在线网络技术(北京)有限公司 Line pushes method, system and the terminal device surveyed
CN108304322A (en) * 2018-01-12 2018-07-20 深圳壹账通智能科技有限公司 A kind of method for testing pressure and terminal device
CN108512715A (en) * 2017-02-28 2018-09-07 菜鸟智能物流控股有限公司 Load pressure test method of service link and related device
CN108563574A (en) * 2018-04-13 2018-09-21 上海宝尊电子商务有限公司 A kind of full-automatic displaying Test data generation system of full link pressure survey of electric business

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104899505A (en) * 2014-03-07 2015-09-09 北京奇虎科技有限公司 Software detection method and software detection device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106708818A (en) * 2015-07-17 2017-05-24 阿里巴巴集团控股有限公司 Pressure testing method and system
CN108512715A (en) * 2017-02-28 2018-09-07 菜鸟智能物流控股有限公司 Load pressure test method of service link and related device
CN107967204A (en) * 2017-11-21 2018-04-27 百度在线网络技术(北京)有限公司 Line pushes method, system and the terminal device surveyed
CN108304322A (en) * 2018-01-12 2018-07-20 深圳壹账通智能科技有限公司 A kind of method for testing pressure and terminal device
CN108563574A (en) * 2018-04-13 2018-09-21 上海宝尊电子商务有限公司 A kind of full-automatic displaying Test data generation system of full link pressure survey of electric business

Also Published As

Publication number Publication date
CN109684211A (en) 2019-04-26

Similar Documents

Publication Publication Date Title
CN109684211B (en) Order scheduling system pressure testing method and device based on shop dimensions
CN104317618B (en) A kind of firmware partition treating method and apparatus
CN107943707B (en) Behavior tree testing method and device, storage medium and terminal
CN108600311B (en) Method and device for simulating interface data by client
CN107733735B (en) Script recording system and method implanted in pressure measurement device
CN109992515B (en) Test method and device and electronic equipment
CN107908548A (en) A kind of method and apparatus for generating test case
CN112015660A (en) Service testing method and device, electronic equipment and storage medium
CN111694748B (en) Pressure testing method and device
CN114153822A (en) Data migration method and device, electronic equipment and storage medium
CN110597728A (en) Method, device and system for constructing test data
CN108572914B (en) Method and device for generating log for pressure test
CN107273112A (en) A kind of present list method for information display and device
CN111984519B (en) Test method and device for service system
CN106959872A (en) Using loading method and device
CN116089439A (en) Dynamic form modification method and device
CN105893192A (en) Method and device for recording test data
CN110069395B (en) Method and device for simulating asynchronous interface, storage medium and computer equipment
CN111159006B (en) Automatic testing method and device
CN106407109A (en) Automatic test method and device for realizing popularization information control
CN111414194A (en) Interface information generation method and system, electronic equipment and storage medium
CN111400245A (en) Art resource migration method and device
CN113434215B (en) Information loading method and device, storage medium and processor
CN115018390B (en) Animation project file production value evaluation method, device and system
CN110109842B (en) Method and device for testing numerical system

Legal Events

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