CN110347545A - A kind of test method and device of business platform cache policy - Google Patents
A kind of test method and device of business platform cache policy Download PDFInfo
- Publication number
- CN110347545A CN110347545A CN201910421374.3A CN201910421374A CN110347545A CN 110347545 A CN110347545 A CN 110347545A CN 201910421374 A CN201910421374 A CN 201910421374A CN 110347545 A CN110347545 A CN 110347545A
- Authority
- CN
- China
- Prior art keywords
- cache
- test data
- database
- strategy factor
- cache database
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3003—Monitoring arrangements specially adapted to the computing system or computing system component being monitored
- G06F11/3037—Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a memory, e.g. virtual memory, cache
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2455—Query execution
- G06F16/24552—Database cache management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Computing Systems (AREA)
- Data Mining & Analysis (AREA)
- Mathematical Physics (AREA)
- Quality & Reliability (AREA)
- Computational Linguistics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The embodiment of the invention provides the test methods and device of a kind of business platform cache policy, and the present invention relates to research and development administrative skill field, method includes: that the update interval time of the cache database of business platform is arranged;Test data is created by default rule, and imports test data into preset test script;Test data is imported into the primary database of business platform using test script, wherein is generated cache instruction after primary database read test data, and will be started to be calculated as the first moment at the time of reading;Away from the first moment to after updating interval time, cache database executes the caching of test data in response to cache instruction;Test data is inquired by the query interface of cache database, whether the cache logic to judge cache database is correct.The cache policy that technical solution provided in an embodiment of the present invention is able to solve want advertisement side's platform in the prior art is difficult to the problem of judging the accuracy of cache logic in test.
Description
[technical field]
The present invention relates to research and development administrative skill field more particularly to a kind of test methods and dress of business platform cache policy
It sets.
[background technique]
Want advertisement side's platform (Demand-Side Platform, abbreviation DSP) refer to for advertiser provide across medium, across
The advertisement launching platform of platform, cross-terminal.Wherein, want advertisement side's platform is codetermined by launching strategy and launching the factor
Bid results.If advertiser A has increased dispensing strategy newly in the front end UI page, want advertisement side's platform is bidded calling when responding
Database do not update the newly-increased dispensing strategy, then DSP platform can not be asked to bidding in time based on newly-increased dispensing strategy
It asks and responds.However, the cache policy of existing want advertisement side's platform is difficult to judge the accurate of cache logic in test
Property.
[summary of the invention]
In view of this, the embodiment of the invention provides the test method and device of a kind of business platform cache policy, to
Solve the problems, such as that the cache policy of want advertisement side's platform in the prior art is difficult to judge the accuracy of cache logic in test.
To achieve the goals above, according to an aspect of the invention, there is provided a kind of survey of business platform cache policy
Method for testing, which comprises
The update interval time of the cache database of business platform is set;Test data is created by default rule, and
The test data is imported into preset test script;Using the test script into the primary database of the business platform
Import the test data, wherein the primary database generates cache instruction after reading the test data, and will start to read
At the time of be calculated as the first moment;After first moment to the update interval time, the cache database is in response to institute
Cache instruction is stated, the caching of the test data is executed;The survey is inquired by the query interface of the cache database
Data are tried, whether the cache logic to judge the cache database is correct.
Further, after described away from first moment to the update interval time, the cache database response
In the cache instruction, the caching of the test data is executed, comprising: deposit the test data in the form of key-value pair
Enter the cache database, wherein the test data includes newly-increased strategy factor, the deletion strategy factor, updates strategy factor
In at least one strategy factor, the identity coding of advertiser associated by each strategy factor is each described as key
Strategy factor is as value.
Further, the query interface by the cache database inquires the test data, described in judgement
Whether the cache logic of cache database is correct, comprising: inquires the advertiser by the query interface of the cache database
Identity coding;Obtain in the cache database with the associated target strategy factor of the identity coding;When the test
When data are the newly-increased strategy factor, judge whether the target strategy factor and the newly-increased strategy factor are identical;If so,
Confirm that the cache database has been stored in the newly-increased strategy factor, cache logic is correct.
Further, the query interface by the cache database inquires the test data, described in judgement
Whether the cache logic of cache database is correct, further includes: inquires the advertisement by the query interface of the cache database
Main identity coding;Obtain in the cache database with the associated target strategy factor of the identity coding;When the survey
When examination data are the update strategy factor, judge whether the target strategy factor and the update strategy factor are identical;Such as
It is to confirm the cache database with the associated former plan of identity coding of the update strategy factor replacement and the advertiser
Slightly the factor, cache logic are correct.
Further, the query interface by the cache database inquires the test data, described in judgement
Whether the cache logic of cache database is correct, further includes: inquires the advertisement by the query interface of the cache database
Main identity coding;When the test data be the deletion strategy because of the period of the day from 11 p.m. to 1 a.m, judge to whether there is in the cache database
The deletion strategy factor;When the deletion strategy is not present in the cache database because of the period of the day from 11 p.m. to 1 a.m, confirm described data cached
The strategy factor has been deleted in library, and cache logic is correct.
Further, after described away from first moment to the update interval time, the cache database response
After the cache instruction, the caching for executing the test data, the method also includes: Xiang Suoshu business platform is defeated
Enter the newly-increased strategy factor, and is gone out by the reality that the bid interface of the business platform obtains the newly-increased strategy factor
Valence;The expectation bid of the newly-increased strategy factor is calculated according to the newly-increased strategy factor and preset service logic;Judge institute
Whether consistent with the expectation bid state practical bid;If so, confirming the practical strategy factor institute called of the business platform
Database be the cache database.
To achieve the goals above, according to an aspect of the invention, there is provided a kind of survey of business platform cache policy
Trial assembly is set, and described device includes: setting unit, the update interval time of the cache database for business platform to be arranged;Creation
Unit for creating test data by default rule, and imports the test data into preset test script;It imports
Unit, for importing the test data into the primary database of the business platform using the test script, wherein described
Primary database generates cache instruction after reading the test data, and will start to be calculated as the first moment at the time of reading;Execute list
Member, after away from first moment to the update interval time, the cache database is held in response to the cache instruction
The caching of the row test data;Query unit, for inquiring the survey by the query interface of the cache database
Data are tried, whether the cache logic to judge the cache database is correct.
Further, the execution unit include execute subelement, for by the test data in the form of key-value pair
Be stored in the cache database, wherein the test data include newly-increased strategy factor, the deletion strategy factor, more new strategy because
At least one strategy factor in son, the identity coding of advertiser associated by each strategy factor is as key, Mei Gesuo
It states strategy factor and is used as value.
To achieve the goals above, according to an aspect of the invention, there is provided a kind of computer non-volatile memories are situated between
Matter, the storage medium include the program of storage, control equipment where the storage medium in described program operation and execute
The test method for the business platform cache policy stated.
To achieve the goals above, according to an aspect of the invention, there is provided a kind of computer equipment, including storage
Device, processor and storage in the memory and the computer program that can run on the processor, the processor
The step of test method of above-mentioned business platform cache policy is realized when executing the computer program.
In the present solution, passing through the update interval time of the cache database of setting business platform, Xiang Suoshu business platform
Primary database in import test data, and the primary database is started and read at the time of, was calculated as the first moment;Away from described
After one moment to the update interval time, the test data is inquired by the query interface of the cache database, to sentence
Break the cache database cache logic it is whether correct.To ensure the accuracy of the cache logic of cache policy, industry is improved
The testing efficiency of business platform cache policy, to guarantee that business platform being capable of efficient operation.
[Detailed description of the invention]
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below will be to needed in the embodiment attached
Figure is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for this field
For those of ordinary skill, without any creative labor, it can also be obtained according to these attached drawings other attached
Figure.
Fig. 1 is a kind of flow chart of the test method of optional business platform cache policy provided in an embodiment of the present invention;
Fig. 2 is a kind of schematic diagram of the test device of optional business platform cache policy provided in an embodiment of the present invention;
Fig. 3 is a kind of schematic diagram of optional computer equipment provided in an embodiment of the present invention.
[specific embodiment]
For a better understanding of the technical solution of the present invention, being retouched in detail to the embodiment of the present invention with reference to the accompanying drawing
It states.
It will be appreciated that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.Base
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts it is all its
Its embodiment, shall fall within the protection scope of the present invention.
The term used in embodiments of the present invention is only to be not intended to be limiting merely for for the purpose of describing particular embodiments
The present invention.In the embodiment of the present invention and the "an" of singular used in the attached claims, " described " and "the"
It is also intended to including most forms, unless the context clearly indicates other meaning.
It should be appreciated that term "and/or" used herein is only a kind of incidence relation for describing affiliated partner, indicate
There may be three kinds of relationships, for example, A and/or B, can indicate: individualism A, exist simultaneously A and B, individualism B these three
Situation.In addition, character "/" herein, typicallys represent the relationship that forward-backward correlation object is a kind of "or".
It will be appreciated that though terminal may be described using term first, second, third, etc. in embodiments of the present invention,
But these terminals should not necessarily be limited by these terms.These terms are only used to for terminal being distinguished from each other out.For example, not departing from the present invention
In the case where scope of embodiments, the first acquisition subelement can also be referred to as the second acquisition subelement, and similarly, second obtains son
Unit can also be referred to as the first acquisition subelement.
Depending on context, word as used in this " if " can be construed to " ... when " or " when ...
When " or " in response to determination " or " in response to detection ".Similarly, depend on context, phrase " if it is determined that " or " if detection
(condition or event of statement) " can be construed to " when determining " or " in response to determination " or " when the detection (condition of statement
Or event) when " or " in response to detection (condition or event of statement) ".
Fig. 1 is a kind of flow chart of the test method of business platform cache policy according to an embodiment of the present invention, such as Fig. 1 institute
Show, this method comprises:
The update interval time of the cache database of business platform is arranged in step S101;
Step S102 creates test data by default rule, and imports test data into preset test script;
Step S103 imports test data into the primary database of business platform using test script, wherein primary database
Cache instruction is generated after read test data, and will start to be calculated as the first moment at the time of reading;
Step S104, away from the first moment to after updating interval time, cache database executes test in response to cache instruction
The caching of data;
Step S105 inquires test data by the query interface of cache database, to judge the caching of cache database
Whether logic is correct.
Business platform for example can be want advertisement side's platform (Demand-Side Platform, DSP), business platform packet
Primary database and cache database are included, primary database is used for storing all data relevant to business platform, cache database
In the storage strategy factor.Cache database is redis database, is stored in a manner of key-value.Redis is using memory as number
According to storage medium, so the ultrahigh in efficiency of data is read and write, considerably beyond primary database.To be arranged and obtain a 256 byte words
For symbol string, its reading speed may be up to 110000 times/s, and writing rate is up to 81000 times/s.The interface of DSP is per second to be connect
A large amount of bid requests are received, and very high to the requirement of the timeliness of response, if directly the interaction of access primary database will lead to too much
Response time greatly increases, and cannot return within the defined short time, then can not just participate in the real-time competing of advertisement transaction platform
Valence.At this moment it is directly read from memory with the data of redis caching, can greatly improve speed and saves server overhead.
In one embodiment, test data is SQL statement, test script python.
In the present solution, by the update interval time for the cache database that business platform is arranged, to the master of business platform
It was calculated as the first moment at the time of importing test data in database, and primary database is started and read;Away from the first moment to update
After interval time, test data is inquired by the query interface of cache database, to judge that the cache logic of cache database is
It is no correct.To ensure the accuracy of the cache logic of cache policy, the testing efficiency of business platform cache policy is improved, to protect
Demonstrate,proving business platform being capable of efficient operation.
In one embodiment, the update interval time of cache database is 5 seconds.It is to be appreciated that test data is
Strategy factor needed for business platform, each strategy factor are associated with advertiser ID;Specifically, strategy factor includes multiple dispensings
The factor.Each advertiser can be arranged the advertisement serving policy of oneself, such as the strategy factor of A advertiser's setting is as shown in table 1;
The strategy factor of table 1:A advertiser
Optionally, after away from the first moment to update interval time, cache database executes test in response to cache instruction
The caching of data, comprising:
Test data is stored in cache database in the form of key-value pair, wherein test data include newly-increased strategy factor,
The deletion strategy factor updates at least one strategy factor in strategy factor, the body of advertiser associated by each strategy factor
Part coding is used as key, and each strategy factor is as value.Cache policy is tested by three kinds of situations, can be covered in practical application
Policy data situation.
Optionally, test data is inquired by the query interface of cache database, to judge that the caching of cache database is patrolled
It whether correct collects, comprising:
The identity coding of advertiser is inquired by the query interface of cache database;Obtain in cache database and identity
Encode the associated target strategy factor;When test data is newly-increased strategy factor, the target strategy factor and newly-increased strategy are judged
Whether the factor is identical;If so, confirmation cache database has been stored in newly-increased strategy factor, cache logic is correct.Such as: inquiry is " wide
It is consistent with the associated newly-increased strategy factor of the advertiser A in test data to accuse the strategy factor that main A " is obtained, that is, shows to cache
Logic of the database when synchronizing newly-increased strategy factor is correct.
Optionally, test data is inquired by the query interface of cache database, to judge that the caching of cache database is patrolled
It whether correct collects, further includes:
The identity coding of advertiser is inquired by the query interface of cache database;Obtain in cache database and identity
Encode the associated target strategy factor;When test data is to update strategy factor, the target strategy factor and more new strategy are judged
Whether the factor is identical;If so, confirmation cache database has used update strategy factor replacement associated with the identity coding of advertiser
Former strategy factor, cache logic are correct.Such as: the advertiser A in strategy factor and test data that inquiry " advertiser A " obtains
Associated update strategy factor is consistent, and has deleted with the identical former strategy factor of strategy factor number is updated, that is, shows
Logic of the cache database when updating strategy factor is correct.
Optionally, test data is inquired by the query interface of cache database, to judge that the caching of cache database is patrolled
It whether correct collects, further includes:
The identity coding of advertiser is inquired by the query interface of cache database;When test data is the deletion strategy factor
When, judge in cache database with the presence or absence of the deletion strategy factor;When in cache database be not present deletion strategy because of the period of the day from 11 p.m. to 1 a.m, really
Recognize the cache database deletion strategy factor, cache logic is correct.Such as: in the strategy factor that inquiry " advertiser B " obtains
There is no the strategy factors consistent with the associated deletion strategy factor of the advertiser B in test data, that is, show data cached
Library is in deletion strategy because the logic of the period of the day from 11 p.m. to 1 a.m is correct.
Optionally, after away from the first moment to update interval time, cache database executes test in response to cache instruction
After the caching of data, method further include:
Newly-increased strategy factor is inputted to business platform, and newly-increased strategy factor is obtained by the bid interface of business platform
Practical bid;The expectation bid of newly-increased strategy factor is calculated according to newly-increased strategy factor and preset service logic;Judgement is practical
Whether bid is consistent with expectation bid;If so, the database where the confirmation practical strategy factor called of business platform is slow
Deposit data library.
Specifically, the expectation bid of newly-increased strategy factor is calculated,
X (expectation bid)=P (k1*a1*b1+k2*a2*b2+....+kn*an*bn)/(k1+k2+...+kn), wherein P
Indicate default bid, an indicate n-th of strategy factor, kn indicate n-th of strategy factor weight, bn indicate n-th strategy because
The matching degree of son.Wherein, the matching degree of strategy factor is the registration of the dispensing factor of the strategy factor.Such as flow channel
Launching the factor is " one account logical, one wallet, portal website, Sina ", and the dispensing factor used of actually bidding is " one account leads to, one money
Packet ", then its matching degree is 67%.Bid when so it is expected matching degree 100% must with bid when actual match degree 67%
It is so different.
It is to be appreciated that the practical bid of newly-increased strategy factor is identical as desired bid, that is, think that business platform is to call
Correct newly-increased strategy factor, and the newly-increased strategy factor to after updating interval time, has been synchronized to away from the first moment
Cache database.If it is different, then show business platform be the strategy factor called be in cache database other are similar
Strategy factor, so practical bid will appear deviation.
The embodiment of the invention provides a kind of test device of business platform cache policy, the device is for executing above-mentioned industry
The test method of business platform cache policy, as shown in Fig. 2, the device includes: setting unit 10, creating unit 20, import unit
30, execution unit 40, query unit 50.
Setting unit 10, the update interval time of the cache database for business platform to be arranged;
Creating unit 20 for creating test data by default rule, and is imported into preset test script and is surveyed
Try data;
Import unit 30, for importing test data into the primary database of business platform using test script, wherein main
Cache instruction is generated after database read test data, and will start to be calculated as the first moment at the time of reading;
Execution unit 40, for after updating interval time, cache database to be held in response to cache instruction away from the first moment
The caching of row test data;
Query unit 50, for inquiring test data by the query interface of cache database, to judge cache database
Cache logic it is whether correct.
Business platform for example can be want advertisement side's platform (Demand-Side Platform, DSP), business platform packet
Primary database and cache database are included, primary database is used for storing all data relevant to business platform, cache database
In the storage strategy factor.Cache database is redis database, is stored in a manner of key-value.Redis is using memory as number
According to storage medium, so the ultrahigh in efficiency of data is read and write, considerably beyond primary database.To be arranged and obtain a 256 byte words
For symbol string, its reading speed may be up to 110000 times/s, and writing rate is up to 81000 times/s.The interface of DSP is per second to be connect
A large amount of bid requests are received, and very high to the requirement of the timeliness of response, if directly the interaction of access primary database will lead to too much
Response time greatly increases, and cannot return within the defined short time, then can not just participate in the real-time competing of advertisement transaction platform
Valence.At this moment it is directly read from memory with the data of redis caching, can greatly improve speed and saves server overhead.
In one embodiment, test data is SQL statement, test script python.
In the present solution, by the update interval time for the cache database that business platform is arranged, to the master of business platform
It was calculated as the first moment at the time of importing test data in database, and primary database is started and read;Away from the first moment to update
After interval time, test data is inquired by the query interface of cache database, to judge that the cache logic of cache database is
It is no correct.To ensure the accuracy of the cache logic of cache policy, the testing efficiency of business platform cache policy is improved, to protect
Demonstrate,proving business platform being capable of efficient operation.
In one embodiment, the update interval time of cache database is 5 seconds.It is to be appreciated that test data is
Strategy factor needed for business platform, each strategy factor are associated with advertiser ID;Specifically, strategy factor includes multiple dispensings
The factor.The advertisement serving policy of oneself can be arranged in each advertiser, as shown in table 1.
Optionally, execution unit 40 includes executing subelement, for test data to be stored in caching in the form of key-value pair
Database, wherein test data includes increasing strategy factor, the deletion strategy factor newly, updating at least one plan in strategy factor
The factor is omited, the identity coding of advertiser associated by each strategy factor is as key, and each strategy factor is as value.Pass through three kinds
Situation tests cache policy, can cover the situation of the policy data in practical application.
Optionally, query unit 50 includes inquiry subelement, obtains subelement, the first judgment sub-unit, the first confirmation
Unit.
Subelement is inquired, the identity coding of advertiser is inquired for the query interface by cache database;It is single to obtain son
Member, for obtain in cache database with the associated target strategy factor of identity coding;First judgment sub-unit, for when survey
Try data are when increasing strategy factor newly, to judge whether the target strategy factor is identical as newly-increased strategy factor;First confirmation subelement,
For if so, confirmation cache database has been stored in newly-increased strategy factor, cache logic to be correct.Such as: inquiry " advertiser A " obtains
Strategy factor it is consistent with the associated newly-increased strategy factor of the advertiser A in test data, that is, show cache database same
Logic when walking newly-increased strategy factor is correct.
Optionally, query unit 50 further includes the second judgment sub-unit, the second confirmation subelement.
Second judgment sub-unit, for judging the target strategy factor and updating when test data is to update strategy factor
Whether strategy factor is identical;Second confirmation subelement, be used for if so, confirmation cache database use update strategy factor replacement and
The associated former strategy factor of the identity coding of advertiser, cache logic are correct.Such as: inquiry " advertiser A " obtain it is tactful because
Son is consistent with the associated update strategy factor of the advertiser A in test data, and numbers identical original with strategy factor is updated
Strategy factor has been deleted, that is, shows that logic of the cache database when updating strategy factor is correct.
Optionally, query unit 50 further includes third judgment sub-unit, third confirmation subelement.
Third judgment sub-unit judges whether deposit in cache database for being deletion strategy because of the period of the day from 11 p.m. to 1 a.m when test data
In the deletion strategy factor;Third confirms subelement, for when there is no deletion strategies because of the period of the day from 11 p.m. to 1 a.m, confirmation caching in cache database
The deletion strategy factor, cache logic are correct for database.Such as: it is not present in the strategy factor that inquiry " advertiser B " obtains
The strategy factor consistent with the associated deletion strategy factor of the advertiser B in test data shows that cache database is being deleted
Logic when except strategy factor is correct.
Optionally, device further includes input unit, computing unit, judging unit, confirmation unit.
Input unit for inputting newly-increased strategy factor to business platform, and is obtained by the bid interface of business platform
The practical bid of newly-increased strategy factor;Computing unit, it is newly-increased for being calculated according to newly-increased strategy factor and preset service logic
The expectation of strategy factor is bid;Judging unit, for judging whether practical bid is consistent with expectation bid;Confirmation unit is used
In if so, the database where the confirmation practical strategy factor called of business platform is cache database.
Specifically, the expectation bid of newly-increased strategy factor is calculated,
X (expectation bid)=P (k1*a1*b1+k2*a2*b2+....+kn*an*bn)/(k1+k2+...+kn), wherein P
Indicate default bid, an indicate n-th of strategy factor, kn indicate n-th of strategy factor weight, bn indicate n-th strategy because
The matching degree of son.Wherein, the matching degree of strategy factor is the registration of the dispensing factor of the strategy factor.Such as flow channel
Launching the factor is " one account logical, one wallet, portal website, Sina ", and the dispensing factor used of actually bidding is " one account leads to, one money
Packet ", then its matching degree is 67%.Bid when so it is expected matching degree 100% must with bid when actual match degree 67%
It is so different.
It is to be appreciated that the practical bid of newly-increased strategy factor is identical as desired bid, that is, think that business platform is to call
Correct newly-increased strategy factor, and the newly-increased strategy factor to after updating interval time, has been synchronized to away from the first moment
Cache database.If it is different, then show business platform be the strategy factor called be in cache database other are similar
Strategy factor, so practical bid will appear deviation.
The embodiment of the invention provides a kind of computer non-volatile memory medium, storage medium includes the program of storage,
Wherein, when program is run, equipment where control storage medium executes following steps:
The update interval time of the cache database of business platform is set;Test data is created by default rule, and
Test data is imported into preset test script;Test number is imported into the primary database of business platform using test script
According to, wherein cache instruction is generated after primary database read test data, and will start to be calculated as the first moment at the time of reading;Away from
First moment, cache database executed the caching of test data in response to cache instruction to after updating interval time;Pass through
The query interface of cache database inquires test data, and whether the cache logic to judge cache database is correct.
Optionally, when program is run, equipment where control storage medium executes following steps: by test data with key assignments
Pair form be stored in cache database, wherein test data include newly-increased strategy factor, the deletion strategy factor, more new strategy because
At least one strategy factor in son, the identity coding of advertiser associated by each strategy factor as key, each strategy because
Son is as value.
Optionally, when program is run, equipment where control storage medium executes following steps: passing through cache database
The identity coding of query interface inquiry advertiser;Obtain cache database in the associated target strategy factor of identity coding;
When test data is newly-increased strategy factor, judge whether the target strategy factor is identical as newly-increased strategy factor;If so, confirmation is slow
Deposit data library has been stored in newly-increased strategy factor, and cache logic is correct.
Optionally, when program is run, equipment where control storage medium executes following steps: passing through cache database
The identity coding of query interface inquiry advertiser;Obtain cache database in the associated target strategy factor of identity coding;
When test data is to update strategy factor, judge whether the target strategy factor and update strategy factor are identical;If so, confirmation is slow
The deposit data library associated former strategy factor of identity coding for updating strategy factor replacement with advertiser, cache logic are correct.
Optionally, when program is run, equipment where control storage medium executes following steps: passing through cache database
The identity coding of query interface inquiry advertiser;When test data is deletion strategy because of the period of the day from 11 p.m. to 1 a.m, judge in cache database whether
There are the deletion strategy factors;When deletion strategy is not present in cache database because of the period of the day from 11 p.m. to 1 a.m, confirm that cache database has deleted plan
Slightly the factor, cache logic are correct.
Fig. 3 is a kind of schematic diagram of computer equipment provided in an embodiment of the present invention.As shown in figure 3, the meter of the embodiment
Machine equipment 100 is calculated to include: processor 101, memory 102 and storage in the memory 102 and can run on processor 101
Computer program 103, the computer program 103 by processor 101 execute when realize embodiment in business platform cache plan
Test method slightly does not repeat one by one herein to avoid repeating.Alternatively, the computer program is realized when being executed by processor 101
The function of each model/unit is not gone to live in the household of one's in-laws on getting married one by one herein in the test device of business platform cache policy to avoid repeating in embodiment
It states.
Computer equipment 100 can be the calculating such as desktop PC, notebook, palm PC and cloud server and set
It is standby.Computer equipment may include, but be not limited only to, processor 101, memory 102.It will be understood by those skilled in the art that Fig. 3
The only example of computer equipment 100 does not constitute the restriction to computer equipment 100, may include than illustrate it is more or
Less component perhaps combines certain components or different components, such as computer equipment can also be set including input and output
Standby, network access equipment, bus etc..
Alleged processor 101 can be central processing unit (Central Processing Unit, CPU), can also be
Other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit
(Application Specific Integrated Circuit, ASIC), field programmable gate array (Field-
Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic,
Discrete hardware components etc..General processor can be microprocessor or the processor is also possible to any conventional processor
Deng.
Memory 102 can be the internal storage unit of computer equipment 100, for example, computer equipment 100 hard disk or
Memory.What memory 102 was also possible to be equipped on the External memory equipment of computer equipment 100, such as computer equipment 100 inserts
Connect formula hard disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash memory
Block (Flash Card) etc..Further, memory 102 can also both including computer equipment 100 internal storage unit or
Including External memory equipment.Memory 102 is for storing other program sum numbers needed for computer program and computer equipment
According to.Memory 102 can be also used for temporarily storing the data that has exported or will export.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description,
The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In several embodiments provided by the present invention, it should be understood that disclosed system, device and method can be with
It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the unit
It divides, only a kind of logical function partition, there may be another division manner in actual implementation, for example, multiple units or group
Part can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, it is shown
Or the mutual coupling, direct-coupling or communication connection discussed can be through some interfaces, device or unit it is indirect
Coupling or communication connection can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme
's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list
Member both can take the form of hardware realization, can also realize in the form of hardware adds SFU software functional unit.
The above-mentioned integrated unit being realized in the form of SFU software functional unit can store and computer-readable deposit at one
In storage media.Above-mentioned SFU software functional unit is stored in a storage medium, including some instructions are used so that a computer
It is each that device (can be personal computer, server or network equipment etc.) or processor (Processor) execute the present invention
The part steps of embodiment the method.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (Read-
Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic or disk etc. it is various
It can store the medium of program code.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all in essence of the invention
Within mind and principle, any modification, equivalent substitution, improvement and etc. done be should be included within the scope of the present invention.
Claims (10)
1. a kind of test method of business platform cache policy, which is characterized in that the described method includes:
The update interval time of the cache database of business platform is set;
Test data is created by default rule, and imports the test data into preset test script;
The test data is imported into the primary database of the business platform using the test script, wherein the main number
Cache instruction is generated after reading the test data according to library, and will start to be calculated as the first moment at the time of reading;
After first moment to the update interval time, the cache database is executed in response to the cache instruction
The caching of the test data;
The test data is inquired by the query interface of the cache database, to judge that the caching of the cache database is patrolled
It whether correct collects.
2. the method according to claim 1, wherein described away from first moment to the update interval time
Afterwards, the cache database executes the caching of the test data in response to the cache instruction, comprising:
The test data is stored in the cache database in the form of key-value pair, wherein the test data includes newly-increased
Strategy factor, the deletion strategy factor update at least one strategy factor in strategy factor, associated by each strategy factor
Advertiser identity coding as key, each strategy factor is as value.
3. according to the method described in claim 2, it is characterized in that, the query interface by the cache database is inquired
Whether the test data, the cache logic to judge the cache database are correct, comprising:
The identity coding of the advertiser is inquired by the query interface of the cache database;
Obtain in the cache database with the associated target strategy factor of the identity coding;
When the test data is the newly-increased strategy factor, the target strategy factor and the newly-increased strategy factor are judged
It is whether identical;
If so, confirming that the cache database has been stored in the newly-increased strategy factor, cache logic is correct.
4. according to the method described in claim 2, it is characterized in that, the query interface by the cache database is inquired
Whether the test data, the cache logic to judge the cache database are correct, further includes:
The identity coding of the advertiser is inquired by the query interface of the cache database;
Obtain in the cache database with the associated target strategy factor of the identity coding;
When the test data is the update strategy factor, the target strategy factor and the update strategy factor are judged
It is whether identical;
It is associated with if so, confirming that the cache database is replaced with the update strategy factor with the identity coding of the advertiser
Former strategy factor, cache logic is correct.
5. according to the method described in claim 2, it is characterized in that, the query interface by the cache database is inquired
Whether the test data, the cache logic to judge the cache database are correct, further includes:
The identity coding of the advertiser is inquired by the query interface of the cache database;
When the test data is the deletion strategy because of the period of the day from 11 p.m. to 1 a.m, judge in the cache database with the presence or absence of the deletion plan
The slightly factor;
When the deletion strategy is not present in the cache database because of the period of the day from 11 p.m. to 1 a.m, it is described to confirm that the cache database has been deleted
Strategy factor, cache logic are correct.
6. according to the method described in claim 2, it is characterized in that, it is described be spaced away from first moment to the update when
Between after, the cache database is in response to the cache instruction, after the caching for executing the test data, the method
Further include:
The newly-increased strategy factor is inputted to the business platform, and described new by the acquisition of the bid interface of the business platform
Increase the practical bid of strategy factor;
The expectation bid of the newly-increased strategy factor is calculated according to the newly-increased strategy factor and preset service logic;
Judge whether the practical bid is consistent with the expectation bid;
If so, the database where confirming the practical strategy factor called of the business platform is the cache database.
7. a kind of test device of business platform cache policy, which is characterized in that described device includes:
Setting unit, the update interval time of the cache database for business datum platform to be arranged;
Creating unit for creating test data by default rule, and imports the test into preset test script
Data;
Import unit, for importing the test data into the primary database of the business platform using the test script,
Wherein, when generating cache instruction after the primary database reading test data, and will start to be calculated as first at the time of reading
It carves;
Execution unit, after away from first moment to the update interval time, the cache database is in response to described
Cache instruction executes the caching of the test data;
Query unit, for inquiring the test data by the query interface of the cache database, to judge the caching
Whether the cache logic of database is correct.
8. device according to claim 7, which is characterized in that the execution unit includes:
Subelement is executed, for the test data to be stored in the cache database in the form of key-value pair, wherein the survey
Examination data include increasing strategy factor, the deletion strategy factor newly, updating at least one strategy factor in strategy factor, each described
The identity coding of advertiser associated by strategy factor is as key, and each strategy factor is as value.
9. a kind of computer non-volatile memory medium, the storage medium includes the program of storage, which is characterized in that described
Equipment perform claim program controls the storage medium when running where requires the caching of business platform described in 1 to 6 any one
The test method of strategy.
10. a kind of computer equipment, including memory, processor and storage are in the memory and can be in the processor
The computer program of upper operation, the processor are realized described in claim 1 to 6 any one when executing the computer program
Business platform cache policy test method the step of.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910421374.3A CN110347545A (en) | 2019-05-21 | 2019-05-21 | A kind of test method and device of business platform cache policy |
PCT/CN2020/087741 WO2020233374A1 (en) | 2019-05-21 | 2020-04-29 | Business platform cache strategy test method and apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910421374.3A CN110347545A (en) | 2019-05-21 | 2019-05-21 | A kind of test method and device of business platform cache policy |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110347545A true CN110347545A (en) | 2019-10-18 |
Family
ID=68173950
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910421374.3A Pending CN110347545A (en) | 2019-05-21 | 2019-05-21 | A kind of test method and device of business platform cache policy |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN110347545A (en) |
WO (1) | WO2020233374A1 (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110929195A (en) * | 2019-11-21 | 2020-03-27 | 望海康信(北京)科技股份公司 | Data caching strategy determining method and device and electronic equipment |
CN111078768A (en) * | 2019-11-25 | 2020-04-28 | 深圳壹账通智能科技有限公司 | Data import method and system based on graphic database and readable storage medium |
WO2020233374A1 (en) * | 2019-05-21 | 2020-11-26 | 深圳壹账通智能科技有限公司 | Business platform cache strategy test method and apparatus |
CN112241369A (en) * | 2020-10-16 | 2021-01-19 | 四川长虹电器股份有限公司 | Automatic interface testing method based on python |
CN112818019A (en) * | 2021-01-29 | 2021-05-18 | 北京思特奇信息技术股份有限公司 | Query request filtering method applied to Redis client and Redis client |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112685275B (en) * | 2020-12-30 | 2024-07-30 | 北京迈格威科技有限公司 | Algorithm policy search method and device, electronic equipment and storage medium |
CN112965905B (en) * | 2021-03-11 | 2024-06-18 | 京东科技信息技术有限公司 | Data testing method, device, equipment and storage medium |
CN113806651B (en) * | 2021-09-18 | 2024-05-24 | 深圳市酷开网络科技股份有限公司 | Data caching method, device, server and storage medium |
CN117251383B (en) * | 2023-11-17 | 2024-03-22 | 深圳开源互联网安全技术有限公司 | Software component detection method, device, equipment and storage medium based on cache |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102902730A (en) * | 2012-09-10 | 2013-01-30 | 新浪网技术(中国)有限公司 | Method and device for reading data based on data cache |
US20160012097A1 (en) * | 2014-07-14 | 2016-01-14 | Fujitsu Limited | Checking freshness of data for a data integration system, dis |
CN105975352A (en) * | 2016-04-28 | 2016-09-28 | 努比亚技术有限公司 | Cache data processing method and server |
CN106294607A (en) * | 2016-07-29 | 2017-01-04 | 北京奇虎科技有限公司 | Data cached update method and updating device |
CN106682193A (en) * | 2016-12-29 | 2017-05-17 | 北京奇虎科技有限公司 | Device and method for data persistent storage on basis of cache |
CN107704573A (en) * | 2017-09-30 | 2018-02-16 | 山东浪潮通软信息科技有限公司 | A kind of intelligent buffer method coupled with business |
CN109582895A (en) * | 2018-12-04 | 2019-04-05 | 山东浪潮通软信息科技有限公司 | A kind of cache implementing method |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070088714A1 (en) * | 2005-10-19 | 2007-04-19 | Edwards Gregory T | Methods and apparatuses for collection, processing, and utilization of viewing data |
CN105740383A (en) * | 2016-01-27 | 2016-07-06 | 中国科学院计算技术研究所 | Method and system for realizing data consistency of database and cache in big data platform |
CN107391359B (en) * | 2016-05-17 | 2020-11-27 | 腾讯科技(深圳)有限公司 | Service testing method and device |
CN108829584B (en) * | 2018-05-24 | 2022-02-11 | 携程计算机技术(上海)有限公司 | Service logic interface mock test method and system |
CN110347545A (en) * | 2019-05-21 | 2019-10-18 | 深圳壹账通智能科技有限公司 | A kind of test method and device of business platform cache policy |
-
2019
- 2019-05-21 CN CN201910421374.3A patent/CN110347545A/en active Pending
-
2020
- 2020-04-29 WO PCT/CN2020/087741 patent/WO2020233374A1/en active Application Filing
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102902730A (en) * | 2012-09-10 | 2013-01-30 | 新浪网技术(中国)有限公司 | Method and device for reading data based on data cache |
US20160012097A1 (en) * | 2014-07-14 | 2016-01-14 | Fujitsu Limited | Checking freshness of data for a data integration system, dis |
CN105975352A (en) * | 2016-04-28 | 2016-09-28 | 努比亚技术有限公司 | Cache data processing method and server |
CN106294607A (en) * | 2016-07-29 | 2017-01-04 | 北京奇虎科技有限公司 | Data cached update method and updating device |
CN106682193A (en) * | 2016-12-29 | 2017-05-17 | 北京奇虎科技有限公司 | Device and method for data persistent storage on basis of cache |
CN107704573A (en) * | 2017-09-30 | 2018-02-16 | 山东浪潮通软信息科技有限公司 | A kind of intelligent buffer method coupled with business |
CN109582895A (en) * | 2018-12-04 | 2019-04-05 | 山东浪潮通软信息科技有限公司 | A kind of cache implementing method |
Non-Patent Citations (1)
Title |
---|
查达永: "一种基于XML数据库查询结果集缓存方案的设计与实现", 《中国优秀博硕士学位论文全文数据库(硕士)》 * |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020233374A1 (en) * | 2019-05-21 | 2020-11-26 | 深圳壹账通智能科技有限公司 | Business platform cache strategy test method and apparatus |
CN110929195A (en) * | 2019-11-21 | 2020-03-27 | 望海康信(北京)科技股份公司 | Data caching strategy determining method and device and electronic equipment |
CN110929195B (en) * | 2019-11-21 | 2023-03-24 | 望海康信(北京)科技股份公司 | Data caching strategy determining method and device and electronic equipment |
CN111078768A (en) * | 2019-11-25 | 2020-04-28 | 深圳壹账通智能科技有限公司 | Data import method and system based on graphic database and readable storage medium |
CN112241369A (en) * | 2020-10-16 | 2021-01-19 | 四川长虹电器股份有限公司 | Automatic interface testing method based on python |
CN112241369B (en) * | 2020-10-16 | 2022-06-21 | 四川长虹电器股份有限公司 | Automatic interface testing method based on python |
CN112818019A (en) * | 2021-01-29 | 2021-05-18 | 北京思特奇信息技术股份有限公司 | Query request filtering method applied to Redis client and Redis client |
CN112818019B (en) * | 2021-01-29 | 2024-02-02 | 北京思特奇信息技术股份有限公司 | Query request filtering method applied to Redis client and Redis client |
Also Published As
Publication number | Publication date |
---|---|
WO2020233374A1 (en) | 2020-11-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110347545A (en) | A kind of test method and device of business platform cache policy | |
CN110782240B (en) | Business data processing method and device, computer equipment and storage medium | |
CN111221726A (en) | Test data generation method and device, storage medium and intelligent equipment | |
CN110428322A (en) | A kind of adaptation method and device of business datum | |
CN110046523B (en) | Intelligent contract checking method and device and electronic equipment | |
CN112733206A (en) | Resource allocation method, device, server and medium | |
CN109062925A (en) | Automatically generate the method, apparatus, computer equipment and storage medium of insert sentence | |
CN111427971A (en) | Business modeling method, device, system and medium for computer system | |
CN109446208A (en) | A kind of date storage method, computer readable storage medium and server | |
CN109992588A (en) | It is a kind of to divide folk prescription method and relevant device based on data processing | |
CN110046944A (en) | Invoice creation method and device, electronic equipment based on block chain | |
CN110162464A (en) | Mcok test method and system, electronic equipment and readable storage medium storing program for executing | |
CN110727857A (en) | Method and device for identifying key features of potential users aiming at business objects | |
CN106156173A (en) | Cheating identification method and device and terminal | |
CN106161389A (en) | Cheating identification method and device and terminal | |
CN104573127B (en) | Assess the method and system of data variance | |
CN107316245A (en) | Expense adjusts method and system | |
CN113778878A (en) | Interface testing method and device, electronic equipment and storage medium | |
CN112199715B (en) | Object generation method based on block chain and cloud computing and digital financial service center | |
CN113360210A (en) | Data reconciliation method and device, computer equipment and storage medium | |
CN116797345A (en) | Task processing method, device, computer equipment and storage medium | |
CN114564856B (en) | Data sharing method based on FMEA and electronic equipment | |
CN113837878B (en) | Data comparison method, device, equipment and storage medium | |
CN111429125B (en) | Account management method and device, storage medium and electronic equipment | |
CN115269642A (en) | Data processing method, device and 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 | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20191018 |