Invention content
In view of this, the present invention provides a kind of for method and device derived from report, can promote user experience and moneySource utilization rate.
Other characteristics and advantages of the present invention will be by the following detailed description apparent from or partially by the present inventionPractice and acquistion.
According to an aspect of the invention, it is proposed that a kind of include for method, this method derived from report:Acquisition task is ledGo out parameter and mission bit stream, mission bit stream includes user information;According to exporting policy, pushing away for task is generated by derived parameterIt delivers letters breath;Export is generated by pushed information and derived parameter;And more new task information, and record the road of exportDiameter.
In a kind of exemplary embodiment of the disclosure, the derived parameter and mission bit stream of task are obtained, including:According to leadingGo out parameter and mission bit stream, judge whether there is the identical task of the derived parameter from same user;If not from sameThe identical task of the derived parameter of user, mission bit stream is stored to the first precalculated position, and derived parameter is stored to second pre-Positioning is put.
In a kind of exemplary embodiment of the disclosure, the first precalculated position is caching cloud, and the second precalculated position is dataCloud.
In a kind of exemplary embodiment of the disclosure, further include:If there is the derived parameter from same user is identicalTask, then according to the state of task, push corresponding message to client.
In a kind of exemplary embodiment of the disclosure, the state of task includes:In ready and preparation.
In a kind of exemplary embodiment of the disclosure, according to exporting policy, the push of task is generated by derived parameterInformation, including:According to exporting policy, pushed information is generated by derived parameter in real time;And according to exporting policy, pass through exportParameter delay generation pushed information.
In a kind of exemplary embodiment of the disclosure, more new task information, and the path of export is recorded, including:Mission bit stream is preserved to downloading task prompt table.
In a kind of exemplary embodiment of the disclosure, further include:Task letter in timing inquiry downloading task prompt tableBreath, and judge whether the corresponding user of mission bit stream is online;When user is online, corresponding message is pushed to client.
According to an aspect of the invention, it is proposed that a kind of for device derived from report, which includes:Receiving module is usedIn the derived parameter and mission bit stream of the task of acquisition, mission bit stream includes user information;Pushing module, for according to export planSlightly, the pushed information of task is generated by derived parameter;Task module, for passing through pushed information and derived parameter generation exportFile;And file module, for more new task information, and record the path of export.
In a kind of exemplary embodiment of the disclosure, further include:Judgment module, for being believed according to derived parameter and taskBreath, judges whether there is the identical task of the derived parameter from same user;Storage module, for not coming from same userDerived parameter identical task when, mission bit stream is stored to the first precalculated position, derived parameter is stored to second and is made a reservation forPosition.
It is according to the present invention to be used for method and device derived from report, user experience and resource utilization can be promoted.
It should be understood that above general description and following detailed description is only exemplary, this can not be limitedInvention.
Specific embodiment
Example embodiment is described more fully with reference to the drawings.However, example embodiment can be real in a variety of formsIt applies, and is not understood as limited to embodiment set forth herein;On the contrary, these embodiments are provided so that the present invention will be comprehensively and completeIt is whole, and the design of example embodiment is comprehensively communicated to those skilled in the art.Identical reference numeral represents in figureSame or similar part, thus repetition thereof will be omitted.
In addition, described feature, structure or characteristic can be incorporated in one or more implementations in any suitable mannerIn example.In the following description, many details are provided to fully understand the embodiment of the present invention so as to provide.However,It will be appreciated by persons skilled in the art that technical scheme of the present invention can be put into practice without one or more in specific detail,Or other methods, constituent element, device, step etc. may be used.In other cases, side known in being not shown in detail or describeMethod, device, realization or operation are to avoid fuzzy each aspect of the present invention.
Attached block diagram shown in figure is only functional entity, not necessarily must be corresponding with physically separate entity.I.e., it is possible to it realizes these functional entitys using software form or is realized in one or more hardware modules or integrated circuitThese functional entitys realize these functional entitys in heterogeneous networks and/or processor device and/or microcontroller device.
Attached flow chart shown in figure is merely illustrative, it is not necessary to including all contents and operation/step,It is not required to perform by described sequence.For example, some operation/steps can also decompose, and some operation/steps can closeAnd or partly merge, therefore the sequence actually performed is possible to be changed according to actual conditions.
It should be understood that although herein various assemblies may be described using term first, second, third, etc., these groupsPart should not be limited by these terms.These terms are to distinguish a component and another component.Therefore, first group be discussed herein belowPart can be described as teaching of second component without departing from disclosure concept.As used herein, term " and/or " including associatedAll combinations for listing any one and one or more in project.
It will be understood by those skilled in the art that attached drawing is the schematic diagram of example embodiment, module or flow in attached drawingNecessary to not necessarily implementing the present invention, therefore it cannot be used for limiting the scope of the invention.
Fig. 1 is according to a kind of flow chart for method derived from report shown in an exemplary embodiment.
As shown in Figure 1, in S102, the derived parameter and mission bit stream of task are obtained, mission bit stream includes user's letterBreath.The newer situation of task data is monitored, obtains the derived parameter and mission bit stream of task, the task may be, for example, that report is ledGo out on missions, in mission bit stream can for example including user information, can also such as including report messages, request time, status information,The present invention is not limited.
In S104, according to exporting policy, the pushed information of task is generated by derived parameter.Exporting policy may be, for example,Export or delay export in real time;Pushed information can be generated in real time by derived parameter for example, according to exporting policy;And rootAccording to exporting policy, it is delayed by derived parameter and generates pushed information.It can also be for example, including exporting policy in pushed information, in real timeDerived information is pushed to execution module, execution module is performed or delayed according to the exporting policy included in derived information in real timeExecution task.The present invention is not limited.
In S106, export is generated by pushed information and derived parameter.It can be for example, being led by exporting work generationGo out file, export work can be for example including inquiring database, data cleansing, data processing etc., by exporting work generation exportFile.
In S108, more new task information, and record the path of export.After export generation, according to textThe relevant information of the content update task of part, while record the storage path of export.
It is according to the present invention to be used for method derived from report, by way of asynchronous export report, break WEB page traditionExport must the former page wait for limitation, can be promoted report export user experience.
It will be clearly understood that the present disclosure describe how formation and using particular example, but the principle of the present invention is not limited toThese exemplary any details.On the contrary, the introduction based on present disclosure, these principles can be applied to many otherEmbodiment.
In a kind of exemplary embodiment of the disclosure, the derived parameter and mission bit stream of task are obtained, including:According to leadingGo out parameter and mission bit stream, judge whether there is the identical task of the derived parameter from same user;If not from sameThe identical task of the derived parameter of user, mission bit stream is stored to the first precalculated position, and derived parameter is stored to second pre-Positioning is put.If there is the identical task of the derived parameter from same user, then according to the state of task, corresponding message is pushedTo client.First precalculated position is caching cloud, and the second precalculated position is data cloud.The state of task includes:It is ready and accurateIn standby.Cache cloud for example including:Redis, Mongdb and Hbase.
Redis is a key-value storage system.It supports that the value types of storage are relatively more, including string(character string), list (chained list), set (set), zset (sorted set- ordered sets) and hash (Hash type).TheseData type all supports push/pop, add/remove and takes intersection union and difference set and more rich operation, and these are graspedAll it is atomicity.On this basis, redis supports the sequence of various different modes.For guaranteed efficiency, data are all slowIt deposits in memory.Newer data periodically can be written disk or modification is operated the additional record text of write-in by redisPart, and it is synchronous to realize master-slave (principal and subordinate) on this basis.
Mongodb is a product between relational database and non-relational database, is that non-relational database is worked asMiddle function is most abundant, is most like relational database.The data structure that he supports is very loose, is the bson forms of similar json,Therefore more complicated data type can be stored.The characteristics of Mongo is maximum is that the query language that he supports is very powerful, languageMethod is somewhat similarly to the query language of object-oriented, can almost realize most work(of similarity relation database list table inquiryCan, but also support to establish data and index.
HBase is a PostgreSQL database distributed, towards row, and HBase is provided on Hadoop and is similar toThe ability of Bigtable.Hadoop is a distributed system architecture developed by Apache funds club.User can be withIn the case where not knowing about distributed low-level details, distributed program is developed.The power of cluster is made full use of to carry out high-speed computationAnd storage.HBase is the sub-project of the Hadoop projects of Apache.HBase is different from general relational database, it is oneIt is suitable for the database of unstructured data storage.HBase unlike another is per-column rather than based on capable pattern.
It is according to the present invention to be used for method derived from report, by judging whether synchronization has same user's the same termsReport export task mode, evade since same user of same time opens with the additional system brought of condition multitask executionPin, can promote resource utilization.
Fig. 2 is a kind of flow chart for method derived from report shown according to another exemplary embodiment.
As shown in Fig. 2, in the present embodiment, after user submits export request, the system that handles task is inquired slow firstDeposit whether have in cloud the user with condition be not carried out complete export task, if any then can for example, return client " XXXX inquireCondition export task be carrying out please paying close attention to pushed information later " etc. prompt messages, otherwise (can be for example, user by critical dataThe information such as information, business module title, task creation time, export state) it stores to caching cloud, derived parameter is stored to dataCloud;Data variation in real-time monitored data cloud, when there is new export task generation, according to exporting policy in real time/delay pushExport task is to task execution module;Task execution module is responsible for derived query database generation export, and file is storedTo file system, and update task status and file path in record buffer memory cloud.Data update situation in caching cloud is monitored in real time,When there is new tasks carrying to complete, active push export completes message to prompt message table, timed task poll prompt messageTable judges whether task owning user is online, if user is currently online, notifies that downloading task is ready for user, can be withStart to download.
Fig. 3 is a kind of flow chart for method derived from report shown according to another exemplary embodiment.
As shown in figure 3, in the present embodiment, user receives export in business module selection/typing derived parameter, systemAfter parameter, the export task with the presence or absence of active user with condition in caching cloud is first determined whether, if any the shape for then judging the recordState returns to such as that " the export task of XXXXX time XXXXX derived parameters is carrying out, please slightly if state is " in preparation "The prompt message of time attention location system pushed information ", prevents from creating identical export task, prompts to use if state is " ready "Whether family Mission Ready is downloaded.Otherwise the information such as user information, module name, report messages, request time, state are storedIt is stored to caching cloud and by derived parameter information to data cloud (for follow-up process use), return " task creation success is exported, it pleaseSubsequent attention location system pushed information ".
1) user is in export page selection/typing derived parameter, submission export request.
2) server-side receives the export request of user, whether there is active user, leading with condition in verification caching cloudIt goes out on missions.If any task record state is then judged, " the export of XXXX time XXXX conditions is returned if state is " in preparation "Task is carrying out, and please then pays close attention to pushed information ";" downloading task prompt message table " is combined if state is " ready "Query Information prompts whether user task is ready downloads.Otherwise by report relevant information (user information, module name, reportInformation, request time, state etc.) it stores to caching cloud, derived parameter information is stored to data cloud.
3) user's " export task creation success, push is exported into result later " is notified.
Fig. 4 is a kind of flow chart for method derived from report shown according to another exemplary embodiment.
As shown in figure 4, in the present embodiment, whether have newly-increased derived parameter in task pushing module monitored data cloud,Derived parameter is pushed to execution module, task holds module according to condition query service database, generation export store toFile system, and update task status and file path in caching cloud.
1) data variation in task pushing module monitored data cloud, it is raw when there is new data (derived parameter) generationExport task pushing module is sent into push task.
2) it after task pushing module receives message, in real time or delays to execution module according to tactful and pushes export ginsengNumber.
3) after task execution module receives the export instruction of pushing module transmission, start to perform formal export work such asDatabase, data processing etc. are inquired, generation export is stored to file system.
4) task status is set to " ready " and records export path in update caching cloud.
Fig. 5 is a kind of flow chart for method derived from report shown according to another exemplary embodiment.
As shown in figure 5, in the present embodiment, monitor data update situation in caching cloud, when cache have in cloud it is new "During thread " data, user is prompted to download file.
1) data update situation in caching cloud is monitored, when there are the downloading task data of new " ready ", preserves thisFor data of being engaged in database " downloading task prompt message table ", state is " not downloading ".
2) state is the task of " not downloading " in timing inquiry " downloading task prompt message table ", and verifies current task instituteWhether online belong to user, if online, PUSH message to client.
3) client obtains the task message of server-side push, prompts user that " the export task that the XXXX times create is accurateIt is standby ready, if to download ".If user clicks " ignore and delete downloading task ", server-side deletes caching cloud and downloading task carriesShow corresponding data in information table.
4) task download module obtains file input stream according to current task information from file system, preserves to user's magneticDisk, update " downloading task prompt message table " current task state are " download ", finally delete current task in caching cloud and rememberRecord.
It is according to the present invention to be used for method derived from report, pass through asynchronous export and the report of synchronized push exports messageMode can effectively promote resource utilization with the experience of General Promotion user, improve system reliability.
It will be appreciated by those skilled in the art that realize that all or part of step of above-described embodiment is implemented as being performed by CPUComputer program.When the computer program is performed by CPU, the above-mentioned work(that the above method provided by the invention is limited is performedEnergy.The program can be stored in a kind of computer readable storage medium, which can be read-only memory, magneticDisk or CD etc..
Further, it should be noted that above-mentioned attached drawing is only the place included by method according to an exemplary embodiment of the present inventionReason schematically illustrates rather than limits purpose.It can be readily appreciated that above-mentioned processing shown in the drawings is not indicated or is limited at theseThe time sequencing of reason.In addition, being also easy to understand, these processing for example can be performed either synchronously or asynchronously in multiple modules.
Following is apparatus of the present invention embodiment, can be used for performing the method for the present invention embodiment.For apparatus of the present invention realityThe details not disclosed in example is applied, please refers to the method for the present invention embodiment.
Fig. 6 is a kind of block diagram for device derived from report shown according to another exemplary embodiment.
Wherein, receiving module 602 is used to obtain the derived parameter and mission bit stream of task, and mission bit stream includes user's letterBreath.
Pushing module 604 is used to generate the pushed information of task by derived parameter according to exporting policy.
Task module 606 is used to generate export by pushed information and derived parameter.
File module 608 is used for more new task information, and records the path of export.
Judgment module 610 is used to, according to derived parameter and mission bit stream, judge whether there is the export ginseng from same userThe identical task of number.
Storage module 612 is used in the identical task of the derived parameter not from same user, and mission bit stream is stored upIt deposits to the first precalculated position, derived parameter is stored to the second precalculated position.
It is according to the present invention to be used for device derived from report, by way of asynchronous export report, break WEB page traditionExport must the former page wait for limitation, can be promoted report export user experience.
It will be appreciated by those skilled in the art that above-mentioned each module can be distributed according to the description of embodiment in device, also may be usedTo carry out respective change uniquely different from one or more devices of the present embodiment.The module of above-described embodiment can be merged intoOne module, can also be further split into multiple submodule.
By the description of above embodiment, those skilled in the art is it can be readily appreciated that example embodiment described hereinIt can be realized, can also be realized in a manner that software is with reference to necessary hardware by software.Therefore, implemented according to the present inventionThe technical solution of example can be embodied in the form of software product, which can be stored in a non-volatile memoriesIn medium (can be CD-ROM, USB flash disk, mobile hard disk etc.) or on network, including some instructions so that a computing device (canTo be personal computer, server, mobile terminal or network equipment etc.) it performs according to the method for the embodiment of the present invention.
By above detailed description, those skilled in the art is it can be readily appreciated that according to embodiments of the present invention is used to reportMethod and device has one or more of the following advantages derived from table.
According to some embodiments, of the invention is used for method derived from report, by way of asynchronous export report, breaksThe limitation that the traditional export of WEB page must be waited in the former page, can promote the experience of report export user.
According to other embodiments, of the invention is used for method derived from report, by judging whether synchronization has togetherThe mode of the report export task of one user's the same terms is evaded since same user of same time is the same as condition multitask execution bandThe overhead come, can promote resource utilization.
According to other embodiments, of the invention is used for method derived from report, passes through asynchronous export and synchronized pushReport exports the mode of message, can effectively promote resource utilization with the experience of General Promotion user, improve system reliability.
It is particularly shown and described exemplary embodiment of the present invention above.It should be appreciated that the present invention is not limited toDetailed construction described herein, set-up mode or implementation method;On the contrary, it is intended to cover included in appended claimsVarious modifications and equivalence setting in spirit and scope.
In addition, structure, ratio, size shown by this specification Figure of description etc., only coordinating specification instituteDisclosure, for skilled in the art realises that with reading, being not limited to the enforceable qualifications of the disclosure, thereforeDo not have technical essential meaning, the modification of any structure, the change of proportionate relationship or the adjustment of size are not influencing the disclosureUnder the technique effect that can be generated and achieved purpose, it should all still fall and obtain and can cover in the technology contents disclosed in the disclosureIn the range of.Meanwhile in this specification it is cited such as " on ", " first ", " second " and " one " term, be also only and be convenient forNarration understands rather than that limit the disclosure enforceable range relativeness is altered or modified, without substantive changeUnder technology contents, when being also considered as the enforceable scope of the present invention.