Specific embodiment
With reference to the accompanying drawing, the scheme provided this specification is described.
The maintaining method for the business datum that this specification one or more embodiment provides can be applied to as shown in Figure 1
In scene.In Fig. 1, business data processing system can receive the business datum that user is inputted by man-machine interactive interface.The industry
Business data can refer to the data with corresponding validity period and active states.Business data processing system receive it is above-mentioned
After business datum, which can be written in preset storage unit (e.g., database), it can also be carried out different
Step processing.Such as, the validity period based on business datum generates timed message.Later, when the timed message is triggered, to preset
The business datum to match in storage unit with the business datum carries out come into force label and/or expired label.
Transaction processing system in Fig. 1 can specifically include: data inputting module 102, data dissection process module 104,
Timed message module 106 and data postpositive disposal module 108.
Specifically, it can be and the business datum that user is inputted by man-machine interactive interface received by data inputting module 102.
The business datum can be for example the price agreement data for the material that enterprise and businessman consult in advance.It should also be noted that,
Above-mentioned business datum can have specified format, can be excel format or list format etc. e.g..
Data inputting module 102 can generate corresponding after receiving above-mentioned business datum for the business datum
Business datum ID.Business datum ID and business datum are written in default storage unit later.Further, it is also possible to by above-mentioned
Business datum ID and business datum submit to data dissection process module 104.
Data dissection process module 104 can solve above-mentioned business datum after receiving above-mentioned business datum
Analysis.For by taking the business datum of excel format as an example, it can be parsed by corresponding resolution rules, with acquisition pair
The validity period answered.Validity period herein may include starting and end time.Later, can be based respectively on the time started and
End time generates corresponding timed message, wherein is properly termed as the first timing based on the timed message that the time started generates and disappears
Breath, the timed message generated based on the end time are properly termed as the second timed message.For above-mentioned first timed message, Ke Yisheng
At corresponding message id.In one example, the message id of the first timed message can be with are as follows: START_ business datum ID.Wherein,
" START " for indicating that first timed message was triggered by the time started, business datum ID be can be from data inputting mould
What block 102 received.Similarly, the message id of the second timed message can be with are as follows: END_ business datum ID.Wherein, " END " is used for table
Show that second timed message was triggered by the end time.
After generating above-mentioned message id, data dissection process module 104 corresponding with the first timed message can will disappear
Cease the message body that the first timed message is written in ID.Similarly, message id write-in second corresponding with the second timed message can be determined
When message message body.Later, the first timed message and the after message id can will be written in data dissection process module 104
Two timed message are sent to timed message module 106.
The first timed message received and the second timed message can be buffered in message and delayed by timed message module 106
Deposit queue.For the first timed message or the second timed message in message buffer queue, timed message module 106 can lead to
Message clocked flip-flop is crossed to detect whether it is triggered.Specifically, upon start between when reaching, the first timed message can be by
Triggering.When reaching between when finished, the second timed message can be triggered.
After above-mentioned first timed message or the second timed message are triggered, timed message module 106 can pass through
Message sender sends it to data postpositive disposal module 108.
Data postpositive disposal module 108, can be with after receiving above-mentioned first timed message or the second timed message
Corresponding message body is parsed.In one example, the message id in message body can be parsed, to obtain business
Data ID and " START " label or " END " label.
When being resolved to " START " label, illustrate to be currently received is the first timed message, executes business below and patrols
It collects processing: according to business datum ID, corresponding business datum is determined in preset storage unit.Later, it obtains and determines
At least one candidate Traffic data that business datum matches.Matching herein can refer to object identity having the same with
And object provider etc..Using business datum as price agreement data instance for, it is above-mentioned match can refer to stock number with
And supplier is identical.It is understood that including the business datum of above-mentioned determination in above-mentioned candidate Traffic data.Finally, can
With from least one candidate Traffic data choose the time started apart from current time recently and the end time do not reach also to
Come into force business datum.The label that comes into force is carried out to the business datum to be come into force.Further, it is also possible to the business datum to come into force before into
The expired label of row, to ensure to only have a business datum to come into force for same target.
When being resolved to " END " label, illustrate to be currently received is the second timed message, executes service logic below
Processing: business datum to be come into force is chosen according to the choosing method of above-mentioned business datum to be come into force, and the label that comes into force is carried out to it.This
Outside, expired label can also be carried out to the business datum of reading.
It should be noted that data postpositive disposal module 108 come into force label and/or expired label to business datum
Process is it can be appreciated that be updated to the active states of the business datum in preset storage unit.
Operation system in Fig. 1 can read active states from preset storage unit are as follows: the business of " the currently active "
Data, so as to improve the reading efficiency of business datum.
Fig. 2 is the maintaining method flow chart for the business datum that this specification one embodiment provides.The execution of the method
Main body can be the equipment with processing capacity: server or system or device, can be the business datum in Fig. 1 e.g.
Processing system.As shown in Fig. 2, the method can specifically include:
Step 202, the target service data of user's input are received.
Such as, the target service data that user's input is received by data inputting module 102 be can be.Target service number herein
According to can be data by user's typing, with corresponding validity period and active states.In one example, the target industry
Business data can refer to the price agreement data for the material that enterprise and businessman consult in advance, which can be such as table
Shown in 1.
Table 1
In table 1, the price agreement data of material have corresponding validity period, including starting and end time.In addition,
Also there are corresponding active states.
Step 204, preset storage unit is written into target service data.
Such as, it can be and preset storage unit be written into target service data by data inputting module 102.
Herein, a plurality of business datum is had recorded in preset storage unit, which has corresponding effective
Phase.Using target service data as price agreement data instance for, the business datum in preset storage unit can be such as 1 institute of table
Show.
In one implementation, before preset storage unit is written in target service data, this can first be generated
The corresponding business datum ID of target service data.Later, the target service data and corresponding business datum ID are written pre-
If storage unit.
Step 206, target service data are parsed, to determine the validity period of target service data.
Such as, it can be and target service data and corresponding business datum ID submitted into number by data inputting module 102
According to dissection process module 104.Data dissection process module 104 parses target service data.Target in this specification
Business datum can have specified format, e.g., excel format or list format.When for list format, it can directly determine
Corresponding validity period;When for excel format, target service data can be parsed by corresponding resolution rules, with
Determine corresponding validity period.Above-mentioned validity period may include starting and end time.
Step 208, the timed message triggered by the validity period of target service data is generated.
When validity period includes starting and end time, can be generated respectively by data dissection process module 104 by
First timed message of time started triggering and the second timed message triggered by the end time.
For above-mentioned first timed message, corresponding message id can be generated.In one example, first timed message
Message id can be with are as follows: START_ business datum ID.Wherein, " START " is for indicating that first timed message is by the time started
Triggering, business datum ID, which can be, to be received from data inputting module 102.Similarly, the message id of the second timed message can
With are as follows: END_ business datum ID.Wherein, " END " is for indicating that second timed message was triggered by the end time.
After generating above-mentioned message id, data dissection process module 104 corresponding with the first timed message can will disappear
Cease the message body that the first timed message is written in ID.Similarly, message id write-in second corresponding with the second timed message can be determined
When message message body.Later, the first timed message and the after message id can will be written in data dissection process module 104
Two timed message are sent to timed message module 106.
The first timed message received and the second timed message can be buffered in message and delayed by timed message module 106
Deposit queue.For the first timed message or the second timed message in message buffer queue, timed message module 106 can lead to
Message clocked flip-flop is crossed to detect whether it is triggered.Specifically, upon start between when reaching, the first timed message can be by
Triggering.When reaching between when finished, the second timed message can be triggered.
After above-mentioned first timed message or the second timed message are triggered, timed message module 106 can pass through
Message sender sends it to data postpositive disposal module 108.
Data postpositive disposal module 108, can be with after receiving above-mentioned first timed message or the second timed message
Corresponding message body is parsed.In one example, the message id in message body can be parsed, to obtain business
Data ID and " START " label or " END " label.
When being resolved to " START " label, illustrate to be currently received is the first timed message.When being resolved to " START "
When label, illustrate to be currently received is the second timed message.
Step 210, it when timed message is triggered, reads from preset storage unit and matches with target service data
At least one candidate Traffic data.
Step 212, according to the validity period of candidate Traffic data, candidate Traffic data come into force label and/or expired
Label.
It should be noted that when the first timed message is triggered, the realization process of above-mentioned steps 210 and step 212
It can be such that according to business datum ID, corresponding target service data determined in preset storage unit.Later, obtain with
At least one candidate Traffic data that target service data match.Matching herein can refer to object mark having the same
Knowledge and object provider.Using business datum as price agreement data instance for, it is above-mentioned match can refer to stock number
And supplier is identical.It is understood that including target service data in above-mentioned candidate Traffic data.Finally, can be from
In at least one candidate Traffic data choose the time started apart from current time recently and the end time do not reach also wait come into force
Business datum.The label that comes into force is carried out to the business datum to be come into force.Further, it is also possible to be carried out to the business datum to come into force before
Phase label.
For the price agreement data instance in table 1, it is assumed that current time 2018-04-01, then message buffer queue
In based on the 5th article of price agreement data at the beginning of the timed message that generates be triggered.It is understood that periodically disappearing to this
It is available after the message body of breath is parsed: " START " label and serial number: 5, serial number herein: 5 can be understood as valence
The business datum ID of lattice protocol data.According to the serial number, the 5th article of price agreement data can be determined in table 1.Basis should later
5th article of price agreement data from table 1 it is available to candidate Traffic data may include: the 1st article of price agreement data,
3 articles of price agreement data and the 5th article of price agreement data.Because distance is current at the beginning of the 5th article of price agreement data
Time, and the end time did not reached also recently (i.e. 0 day), it is possible to by the 5th article of price agreement data decimation be industry to be come into force
Business data.Therefore, state setting can be generated are as follows: " the currently active ".Further, it is also possible to by the come into force before the 4th article of valence
The active states of lattice protocol data are arranged are as follows: " out of date ".Active states in table 1 can be as shown in table 2 after updating.
Table 2
When the second timed message is triggered, the realization process of above-mentioned steps 210 and step 212 can be such that according to
The choosing method of above-mentioned business datum to be come into force chooses business datum to be come into force, and carries out the label that comes into force to it.Further, it is also possible to
Expired label is carried out to target service data.
For the price agreement data instance in table 1, it is assumed that current time 2018-02-28, then message buffer queue
In the timed message that generates of the end time based on the 6th article of price agreement data be triggered.It is understood that periodically disappearing to this
It is available after the message body of breath is parsed: " END " label and serial number: 6, serial number herein: 6 can be understood as price
The business datum ID of protocol data.According to the serial number, the 6th article of price agreement data can be determined in table 1.Later according to this
6 articles of price agreement data from table 1 it is available to candidate Traffic data may include: the 2nd article of price agreement data, the 4th
Article price agreement data and the 6th article of price agreement data.Because when distance is current at the beginning of the 4th article of price agreement data
Between recently, and the end time does not reach also, it is possible to by the 4th article of price agreement data decimation be business datum to be come into force.Cause
This, its active states can be arranged are as follows: " the currently active ".Further, it is also possible to by the active states of the 6th article of price agreement data
Setting are as follows: " out of date ".Active states in table 1 can be as shown in table 3 after updating.
Table 3
It should be noted that, although above-mentioned example with simultaneously to candidate Traffic data come into force label and expired label for
Example is illustrated, but can also only carry out coming into force label or expired label in practical applications, this specification to this not
It limits.For by taking the label that only carries out coming into force as an example, it can delete and have expired business datum or be dumped to other storages
In unit.For for only carrying out expired label, when certain business datum is expired (when the end time reaches), if choosing
Data to be come into force be the business datum currently to come into force, then can only carry out it is expired label etc..
For the business datum in preset storage unit, operation system can therefrom read business datum.It read
Journey can be with are as follows: receives the read data request of operation system, which includes object identity.According to object identity, from pre-
If storage unit in read a plurality of business datum.The business datum for the label that come into force is chosen from a plurality of business datum.
The business datum for the label that come into force is returned to operation system.
For being exemplified by Table 1, when object identity be material stock number: when QO0201, can read the 1st, 3 and
5 price agreement data.And because of the active states of the 3rd article of price agreement data are as follows: " the currently active ", so, it can be to industry
Business system returns to the 3rd article of price agreement data.
It can thus be seen that operation system is when reading business datum, at the beginning of not needing according to business datum and
End time judges whether each business datum be effective, and the business datum for the label that come into force can be read directly, thus
The efficiency that operation system reads data can be greatly improved.
To sum up, the maintaining method for the business datum that this specification embodiment provides, by generating timed message come to default
Storage unit in the active states of business datum automatically updated, the maintenance efficiency of business datum can be improved in this, into
And computer resource can be saved and reduce server performance expense.Further, it is also possible to which improving operation system reads data
Efficiency.
Below using business datum as price agreement data instance, its maintenance process is illustrated.
Fig. 3 is the maintaining method schematic diagram for the price agreement data that this specification provides.As shown in figure 3, may include as
Lower four-stage: initial phase, resolution phase, stage to be triggered, logical process stage.
Initial phase: the price agreement data with specified format be can receive.The specified format may include but not
It is limited to excel format or list format etc..Further, it is also possible to which the price agreement data are written in database.
Data resolution phase: parsing the price agreement data of specified format, with obtain it is corresponding at the beginning of and
End time.It is generated respectively by the first timed message of time started triggering and is disappeared by the second timing that the end time triggers
Breath.Further, it is also possible to generate the message id of the first timed message or the second timed message respectively.Wherein, the first timed message
Message id can be with are as follows: START_ price agreement data ID, the message id of the second timed message can be with are as follows: END_ price agreement number
According to ID.Finally, sending the first timed message and the second timed message identified by corresponding message id.
Stage to be triggered: above-mentioned first timed message is handled by distributed timing message-oriented middleware and the second timing disappears
Breath.It is understood that the stage can handle a plurality of when above-mentioned initial phase receives a plurality of price agreement data
First timed message and a plurality of second timed message.At the beginning of certain price agreement data or the end time reaches
When, the first timed message of triggering or the second timed message can be sent to message subscribing by distributed timing message-oriented middleware
End.
The logical process stage: after message subscribing end receives the first timed message or the second timed message, message can be parsed
Body obtains the label of price agreement data ID and " START " or " END ", carries out corresponding business logic processing.Specifically,
If what is be resolved to is " START " label, according to price agreement data ID, price agreement data are read, decision goes out and this valence
Lattice protocol data has the price agreement data of same provider and identical material.From the price agreement data that decision goes out, selection
Time started is also arranged recently and in the price agreement data of validity period, and by its active states to current time are as follows: " currently has
Effect ".Further, it is also possible to by active states before are as follows: the active states of the price agreement data of " the currently active " are arranged are as follows:
" out of date ".If what is be resolved to is " END " label, foundation price agreement data ID reads corresponding price agreement data, and
Its active states is arranged are as follows: " out of date ".Further, it is also possible to which decision goes out and this price agreement data has same provider and phase
With the price agreement data of material.From the price agreement data that decision goes out, selects the time started nearest to current time and go back
It is arranged in the price agreement data of validity period, and by its active states are as follows: " the currently active ".
By the maintaining method of above-mentioned price agreement data, enterprise can be helped to come into force in real time the price between supplier
Protocol data, so that operation system is when reading price agreement data, efficient decision goes out effective price agreement number
According to.Hereby it is achieved that operation system only focuses on the use of price agreement data, patrolled without coming into force for bargain price protocol data
Volume.
Accordingly with the maintaining method of above-mentioned business datum, a kind of business datum that this specification one embodiment also provides
Maintenance device, as shown in figure 4, the apparatus may include:
Receiving unit 402, for receiving the target service data of user's input.
Writing unit 404, for preset storage unit to be written in the received target service data of receiving unit 402.It should
A plurality of business datum is had recorded in preset storage unit, a plurality of business datum has corresponding validity period.
The function of receiving unit 402 and writing unit 404 herein can be by the data inputting module 102 in above-mentioned Fig. 1
To realize.
Resolution unit 406, for being parsed to target service data, to determine the validity period of target service data.
Generation unit 408, what the validity period for generating the target service data obtained by the parsing of resolution unit 406 triggered
Timed message.
Generation unit 408 specifically can be used for:
The first timed message triggered at the beginning of generating by target service data, and generate by target service data
Second timed message of end time triggering.
The function of resolution unit 406 and generation unit 408 herein can be by the data dissection process module in above-mentioned Fig. 1
104 realize.
Reading unit 410, when the timed message for generating when generation unit 408 is triggered, from preset storage unit
At least one candidate Traffic data that middle reading matches with target service data.
Marking unit 412, the validity period of the candidate Traffic data for being read according to reading unit 410, to candidate Traffic
Data carry out come into force label and/or expired label.
The function of reading unit 410 and marking unit 412 herein can be by the data postpositive disposal module in above-mentioned Fig. 1
108 realize.
Marking unit 412 specifically can be used for:
From at least one candidate Traffic data choose the time started apart from current time recently and the end time also not to
The business datum to be come into force reached.
It treats the business datum that comes into force and carries out the label that comes into force.And/or
Expired label is carried out to the business datum to come into force before.
Marking unit 412 also specifically can be used for:
From at least one candidate Traffic data choose the time started apart from current time recently and the end time also not to
The business datum to be come into force reached.
It treats the business datum that comes into force and carries out the label that comes into force.And/or
Expired label is carried out to target service data.
Optionally, which can also include: selection unit 414 and transmission unit 416.
Receiving unit 402 is also used to receive the read data request of operation system, which includes object identity.
Reading unit 410 is also used to read a plurality of business datum from preset storage unit according to object identity.
Selection unit 414 has carried out the label that comes into force for choosing from a plurality of business datum that reading unit 410 is read
Business datum.
Transmission unit 416, for returning to the business number for the label that come into force that selection unit 414 is chosen to operation system
According to.
Optionally, above-mentioned target service data can be the price agreement data of material.The price agreement data can wrap
Include one or more of information: serial number, name of material, stock number, supplier, price, the time started, the end time and
Active states.
Marking unit 412 specifically can be used for:
Set the currently active and/or out of date for the active states of price agreement data.
The function of each functional module of this specification above-described embodiment device can pass through each step of above method embodiment
Rapid to realize, therefore, the specific work process for the device that this specification one embodiment provides does not repeat again herein.
The maintenance device for the business datum that this specification one embodiment provides, receiving unit 402 receive user's input
Target service data.Preset storage unit is written in target service data by writing unit 404.Resolution unit 406 is to target industry
Business data are parsed, to determine the validity period of target service data.Generation unit 408 is generated by the effective of target service data
The timed message of phase triggering.When timed message is triggered, reading unit 410 is read and target industry from preset storage unit
At least one candidate Traffic data that business data match.Marking unit 412 is according to validity periods of candidate Traffic data, to candidate
Business datum carries out come into force label and/or expired label.Thus, it is possible to improve the maintenance efficiency of business datum.
The maintenance device of this specification business datum provided by the above embodiment can be the one of business data processing system
A module or unit.
Accordingly with the maintaining method of above-mentioned business datum, this specification embodiment additionally provides a kind of server, such as Fig. 5
Shown, which may include:
Receiver 502, for receiving the target service data of user's input.
Memory 504, for storing a plurality of business datum, which has corresponding validity period.
At least one processor 506, for memory 504 to be written in target service data.Target service data are carried out
Parsing, to determine the validity period of target service data.Generate the timed message triggered by the validity period of target service data.When fixed
When message when being triggered, at least one candidate Traffic data to match with target service data are read from memory 504.Root
According to the validity period of candidate Traffic data, come into force label and/or expired label are carried out to candidate Traffic data.
The server that this specification one embodiment provides, can be improved the maintenance efficiency of business datum.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment
Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for server
For embodiment, since it is substantially similar to the method embodiment, so being described relatively simple, related place is implemented referring to method
The part explanation of example.
The step of method in conjunction with described in this disclosure content or algorithm can realize in a manner of hardware,
It can be and the mode of software instruction is executed by processor to realize.Software instruction can be made of corresponding software module, software
Module can be stored on RAM memory, flash memory, ROM memory, eprom memory, eeprom memory, register, hard
Disk, mobile hard disk, CD-ROM or any other form well known in the art storage medium in.A kind of illustrative storage Jie
Matter is coupled to processor, to enable a processor to from the read information, and information can be written to the storage medium.
Certainly, storage medium is also possible to the component part of processor.Pocessor and storage media can be located in ASIC.In addition, should
ASIC can be located in server.Certainly, pocessor and storage media can also be used as discrete assembly and be present in server.
Those skilled in the art are it will be appreciated that in said one or multiple examples, function described in the invention
It can be realized with hardware, software, firmware or their any combination.It when implemented in software, can be by these functions
Storage in computer-readable medium or as on computer-readable medium one or more instructions or code transmitted.
Computer-readable medium includes computer storage media and communication media, and wherein communication media includes convenient for from a place to another
Any medium of one place transmission computer program.Storage medium can be general or specialized computer can access it is any
Usable medium.
It is above-mentioned that this specification specific embodiment is described.Other embodiments are in the scope of the appended claims
It is interior.In some cases, the movement recorded in detail in the claims or step can be come according to the sequence being different from embodiment
It executes and desired result still may be implemented.In addition, process depicted in the drawing not necessarily require show it is specific suitable
Sequence or consecutive order are just able to achieve desired result.In some embodiments, multitasking and parallel processing be also can
With or may be advantageous.
Above-described specific embodiment has carried out into one the purpose of this specification, technical scheme and beneficial effects
Step is described in detail, it should be understood that being not used to limit this foregoing is merely the specific embodiment of this specification
The protection scope of specification, all any modifications on the basis of the technical solution of this specification, made, change equivalent replacement
Into etc., it should all include within the protection scope of this specification.