CN108989429A - The method, apparatus of real-time update page data, electronic equipment - Google Patents

The method, apparatus of real-time update page data, electronic equipment Download PDF

Info

Publication number
CN108989429A
CN108989429A CN201810797555.1A CN201810797555A CN108989429A CN 108989429 A CN108989429 A CN 108989429A CN 201810797555 A CN201810797555 A CN 201810797555A CN 108989429 A CN108989429 A CN 108989429A
Authority
CN
China
Prior art keywords
data
message
message queue
page
new information
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
Application number
CN201810797555.1A
Other languages
Chinese (zh)
Inventor
赖云辉
龙觉刚
孙成
叶俊锋
罗先贤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201810797555.1A priority Critical patent/CN108989429A/en
Priority to PCT/CN2018/108084 priority patent/WO2020015186A1/en
Publication of CN108989429A publication Critical patent/CN108989429A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/55Push-based network services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the present application provides a kind of method, apparatus of real-time update page data, electronic equipment.This method comprises: receiving the message queue that server is sent;The new information in message queue is extracted, data to be written and the corresponding station location marker of data to be written are determined according to new information;Position to be updated corresponding with station location marker in current page is determined by DOM Document Object Model DOM, and the data at position to be updated are updated to data to be written.The embodiment of the present application realizes orientation and accurately obtains the position for needing the data and more new data that update in the page, Local hydrodynamic unit page data is realized by DOM, so that operator can obtain latest news without the manual refreshing page, it avoids operator from leading to work delays because omitting newest data, while alleviating the workload of operator.

Description

The method, apparatus of real-time update page data, electronic equipment
Technical field
This application involves web data processing technology fields, specifically, this application involves a kind of real-time update page numbers According to method, apparatus, electronic equipment.
Background technique
Internet has incorporated the every aspect of people's life and work.For example, people increasingly be unable to do without network in life Shopping is ordered and is taken out, and in order to cope with a large amount of orders generated in the short time, each household appliances manufacturer platform all establishes operation system, side Just order information is got in time.For another example, in order to easily carry out business administration and collaborative work, more and more enterprises pass through Office automation OA system carries out the work such as enterprises workflow examination and approval, affairs circulation, document approvals, realizes automation, nothing The network office and communication way of paper.
In existing operation system or OA system, main menu bar generally has similar " my order ", " my task " etc. It is available to currently pending order or task to click these options for option.Much better operation system can be in menu The other mark of item works as the quantity of order to be processed, such as " [my order (12)] ", to prompt quantity on order or task quantity, and still, The quantity of newest backlog could be obtained by still needing to operator's manual refreshing page.
Existing operation system or OA system have the following problems: operator need to put hits menu item or hand brush manually New page just can get latest news, cumbersome, once operator does not have instant refresh page, it is likely that and it can omit and appoint Business, dallies over one's work.In addition, either clicking menu item or the manual refreshing page, the number for re-reading full page is required According to so that operation system generates meaningless consumption.
Summary of the invention
This application provides a kind of method, apparatus of real-time update page data, electronic equipment and computer-readable storages Medium can solve the problem of needing operator's manual refreshing page ability available latest news.The technical solution is such as Under:
In a first aspect, this application provides a kind of methods of real-time update page data, this method comprises:
Receive the message queue that server is sent;
The new information in message queue is extracted, data to be written and the corresponding position of data to be written are determined according to new information Set mark;
Position to be updated corresponding with station location marker in current page is determined by DOM Document Object Model DOM, it will be to more The data of new position are updated to data to be written.
Second aspect, this application provides the methods of another real-time update page data, this method comprises:
The new information that backstage generates is received, and new information is put into corresponding message queue, new information in message-oriented middleware Station location marker including new data and the position to be updated being used to indicate in current web page;
When meeting preset condition, the message queue in message-oriented middleware is sent to front end corresponding with message queue, So that front end updates current page according to the new information in message queue.
The third aspect, this application provides a kind of device of real-time update page data, which includes:
Receiving module, for receiving the message queue of server transmission;
Extraction module determines data to be written and to be written according to new information for extracting the new information in message queue Enter the corresponding station location marker of data;
Update module, for corresponding with station location marker to more in current page by DOM Document Object Model DOM determination Data at position to be updated are updated to data to be written by new position.
Fourth aspect, this application provides a kind of device of real-time update page data, which includes:
Message storage module, the new information generated for receiving backstage, and new information is put into message-oriented middleware and is corresponded to Message queue, new information includes the station location marker of new data and the position to be updated being used to indicate in current web page;
Message transmission module, for when meeting preset condition, the message queue in message-oriented middleware being sent to and being disappeared The corresponding front end of queue is ceased, so that front end updates current page according to the new information in message queue.
5th aspect, this application provides a kind of electronic equipment, which includes: one or more processors;
Memory;
One or more application program, wherein one or more application programs be stored in memory and be configured as by One or more processors execute, and one or more application program is configured to: executing the application first aspect or second aspect Shown in real-time update page data method.
6th aspect, this application provides a kind of computer readable storage medium, stores on computer readable storage medium There is computer program, which realizes real-time update page shown in the application first aspect or second aspect when being executed by processor The method of face data.
Technical solution provided by the embodiments of the present application has the benefit that orientation accurately obtains the number for needing to update Accordingly and position of the more new data in the page, Local hydrodynamic unit page data is realized by DOM, so that operator is not necessarily to hand Dynamic refresh page can obtain latest news, avoid operator from leading to work delays because omitting latest data, alleviate simultaneously The workload of operator.
Detailed description of the invention
In order to more clearly explain the technical solutions in the embodiments of the present application, institute in being described below to the embodiment of the present application Attached drawing to be used is needed to be briefly described.
Fig. 1 is a kind of flow diagram of the method for real-time update page data provided by the embodiments of the present application;
Fig. 2 is the flow diagram of the method for another real-time update page data provided by the embodiments of the present application;
Fig. 3 is a kind of structural schematic diagram of the device of real-time update page data provided by the embodiments of the present application;
Fig. 4 is the structural schematic diagram of the device of another real-time update page data provided by the embodiments of the present application;
Fig. 5 is the structural schematic diagram of a kind of electronic equipment provided by the embodiments of the present application;
Fig. 6 is the structural schematic diagram of another electronic equipment provided by the embodiments of the present application.
Specific embodiment
Embodiments herein is described below in detail, examples of the embodiments are shown in the accompanying drawings, wherein from beginning to end Same or similar label indicates same or similar element or element with the same or similar functions.Below with reference to attached The embodiment of figure description is exemplary, and is only used for explaining the application, and cannot be construed to the limitation to the application.
Those skilled in the art of the present technique are appreciated that unless expressly stated, singular " one " used herein, " one It is a ", " described " and "the" may also comprise plural form.It is to be further understood that being arranged used in the description of the present application Diction " comprising " refer to that there are the feature, integer, step, operation, element and/or component, but it is not excluded that in the presence of or addition Other one or more features, integer, step, operation, element, component and/or their group.It should be understood that when we claim member Part is " connected " or when " coupled " to another element, it can be directly connected or coupled to other elements, or there may also be Intermediary element.In addition, " connection " used herein or " coupling " may include being wirelessly connected or wirelessly coupling.It is used herein to arrange Diction "and/or" includes one or more associated wholes for listing item or any cell and all combinations.
How the technical solution of the application and the technical solution of the application are solved with specifically embodiment below above-mentioned Technical problem is described in detail.These specific embodiments can be combined with each other below, for the same or similar concept Or process may repeat no more in certain embodiments.Below in conjunction with attached drawing, embodiments herein is described.
Embodiment one
The embodiment of the present application provides a kind of method of real-time update page data, as shown in Figure 1, this method comprises: step Rapid S101 and step S102.
Step S101, the new information that backstage generates is received, and new information is put into corresponding message team in message-oriented middleware Column, new information includes the station location marker of new data and the position to be updated being used to indicate in current web page.
Wherein, after backstage generates new information, it is immediately sent to server, each new information all carries a theme, Each theme corresponds at least one message queue, the corresponding front end of each message queue.Server receives backstage and generates New information after, new information is stored in message-oriented middleware in corresponding message queue by the theme carried according to new information.
Wherein, ActiveMQ, RabbitMQ, Kafka, Jafka, RocketMQ etc. can be selected in message-oriented middleware, herein not It limits.After message queue is sent to front end, message-oriented middleware can empty the message in the message queue sent, wait clothes Message queue is written in the new information that business device generates backstage.
Wherein, new data is the data to be updated into the page, and the new data in the present embodiment specifically refers to generate frequency Higher one kind data, such as: order data, task data.Position to be updated is the position that some in the page needs more new data, Such as some cell in table a certain in webpage, for showing the cell of backlog in menu bar or taskbar.Page Each display area (cell in such as table) has corresponded to a label in HMTL in face.
Step S102, when meeting preset condition, the message queue in message-oriented middleware is sent to and message queue pair The front end answered, so that front end updates current page according to the new information in message queue.
Wherein, when meeting preset condition, according to the corresponding theme of message queue, before message queue is sent to accordingly End.Front end extracts new information after receiving message queue from message queue, is determined according to the station location marker in new information Position to be updated in current web page passes through AJAX (Asynchronous Javascript And XML, asynchronous page dynamic Refreshing) data of the position to be updated in current web page are updated to new data by technology, page data is automatically updated to realize.
Wherein, AJAX is a kind of for creating the technology of quick dynamic web page, and AJAX makes backstage and server only need to be into The exchange of row low volume data, can make webpage realize asynchronous refresh, it means that can be the case where not reloading entire webpage Under, the part of webpage is updated.
For example, in ordering system, display mode of the order data in current web page are as follows: shown in menu item currently to The quantity on order of processing.The above method is applied in ordering system, detailed process are as follows: from the background by the new order data of generation Be sent to server, be sent in the new information of server include: new order data, the corresponding theme of the order data and Station location marker, wherein station location marker indicates display position of the order data in the page;Server receives what backstage generated After new information, new information is stored in message-oriented middleware in corresponding message queue by the theme carried according to new information, server When meeting preset condition, the message queue in message-oriented middleware is sent to corresponding front end;Front end gets new message After queue, new order data and station location marker are extracted from new message queue, and station location marker is determined by AJAX technology Position to be updated in the current web page of instruction shows the corresponding label of currently pending quantity on order, presses in menu item According to newly-increased quantity on order, quantity after the quantity on order of the position to be updated in current web page to be updated to newly-increased order, with Realization automatically updates page data.
The method of the real-time update page data of the present embodiment, a large amount of new informations for being generated backstage by intermediary message part Corresponding message queue is dumped to, and message queue is forwarded to corresponding front end immediately, so that front end can in real time, automatically Ground updates some data in the page, so that operator can obtain latest news without the manual refreshing page, avoids operating Personnel lead to work delays because omitting newest data, while alleviating the workload of operator.In addition, message-oriented middleware has Exception handling, operation system need to only place data into corresponding message queue, when system is abnormal and restores different Chang Hou, message-oriented middleware can retransmit message automatically, therefore, message be forwarded by message-oriented middleware, without having to worry about suspension power-off etc. Abnormal conditions improve the stability of operation system.
Embodiment two
The embodiment of the present application provides alternatively possible implementation, further includes implementing on the basis of example 1 Method shown in example two.
Wherein, front end can request of the timing to server transmission acquisition message queue.It can be according to new data in practical business Generation frequency sets itself regularly send the time interval of request, such as: when data update it is more frequent when, front end can be every 0.5s sends the request for obtaining message queue to server.
On this basis, step S102 is specifically included: when receiving the request of acquisition message queue of front end transmission, being led to Cross the front end that corresponding message queue is sent to request by message-oriented middleware.
The above-mentioned mode that message queue is actively obtained by front end is easy to produce meaningless consumption.For this purpose, being used in the present embodiment The long connection mechanism of websocket is realized by server forward end active push message queue, is avoided because of the continuous poll clothes in front end Business device and generate meaningless consumption.
Optionally, on the basis of establishing long connection, step S102 is specifically included: by being connected with the length that front end is established, Message queue in message-oriented middleware is sent to front end corresponding with message queue by timing.
Wherein, the time interval for regularly sending message queue can be determining according to the generation frequency of new data in practical business, Generation frequency is higher, and time interval is shorter.
Optionally, on the basis of establishing long connection, step S102 is specifically included: when message queue changes, being led to The long connection established with front end is crossed, the message queue in message-oriented middleware is actively sent to front end corresponding with message queue.
Wherein, it can set when the new data that server detects in message queue reaches certain amount, pass through server The long connection established with front end, is actively sent to front end corresponding with message queue for the message queue in message-oriented middleware.
Optionally, step S102 is specifically included: the message queue in message-oriented middleware is cached in Redis server, Message queue is sent to the corresponding front end of message queue by Redis server.
Distributed caching is realized by Redis server, and the message queue in message-oriented middleware is cached to Redis service In device, message queue is then pushed to by front end by Redis server.Using the high availability of Redis server, to adapt to Different data types and application scenarios, meanwhile, the distributed nature of Redis server reduces the probability of loss of data, mentions The high reliability of system.
Embodiment three
On the basis of embodiment one, two, the embodiment of the present application also provides a kind of method of real-time update page data, As shown in Fig. 2, this method comprises: step S201, step S202 and step S203.
Step S201, the message queue that server is sent is received.
Step S202, the new information in message queue is extracted, data to be written and number to be written are determined according to new information According to corresponding station location marker.
It wherein, include the station location marker of new data and the position to be updated being used to indicate in current web page in new information. It is determined according to new data and needs the data updated into current page, i.e., data to be written.It include at least in one message queue One new information.
Step S203, position to be updated corresponding with station location marker in current page is determined by DOM Document Object Model DOM It sets, the data at position to be updated is updated to data to be written.
Wherein, the application programming that DOM (DOM Document Object Model, Document Object Model) is HTML and XML connects Mouthful, full page is mapped as the file being made of Hierarchy nodes by DOM, easily to obtain, modify, add or delete net Element in the page page.
The method of the real-time update page data of the present embodiment is applied to front end, with embodiment one, two applied to service The method at device end cooperates, to realize that the new data generated according to backstage carries out real-time update to the page of front end.This implementation The explanation of related terms in example can join the relevant explanation in part embodiment one and embodiment two, and details are not described herein.
For example, display mode of the order data in current page is to show currently in menu item in ordering system Quantity on order to be processed, the new data that backstage generates can be newly-increased order, and be to reduce order.By above method application Into ordering system when front end, detailed process are as follows: after front end gets the new message queue of server transmission, from what is received New order data and station location marker are extracted in message queue, according in message queue increase newly order or reduction order with And the quantity on order that current page is shown, calculate current quantity on order (data i.e. to be written);Then, front end utilizes AJAX skill Art is determined the position to be updated in the current web page of station location marker instruction by DOM, i.e., shown in menu item currently pending The corresponding label of quantity on order, the quantity on order of the position to be updated in current web page is updated to data to be written, with reality Now automatically update the quantity on order in page menus column.
Some ordering systems, which are more than, shows quantity on order, also shows specific order data, such as specific kinds of goods model, Item quantity, supply of material time limit etc..At this point, after front end gets the new message queue of server transmission, from what is newly received New order data and station location marker are extracted in message queue, and order data is extracted from new data as number to be written According to;Then, using AJAX technology, the position to be updated in the current web page of station location marker instruction is determined by DOM, i.e., currently The corresponding label in the position of order data is shown in the page, by the quantity on order of the position to be updated in current web page be updated to Data are written, to realize the order data for automatically updating and increasing newly or deleting in the page.
The method of the real-time update page data of the present embodiment, orientation accurately obtain the data and update for needing to update Position of the data in the page realizes Local hydrodynamic unit page data by DOM, so that operator is not necessarily to the manual refreshing page Latest news can be obtained, avoids operator from leading to work delays because omitting newest data, while alleviating operator Workload.In addition, the data that front end updates needed for can accurately obtaining, without in order to which single newest data are by full page weight It is new to refresh one time, reduce the consumption of operation system.
Example IV
The embodiment of the present application provides alternatively possible implementation, further includes implementing on the basis of embodiment three Method shown in example four.
If the new information of backstage production is excessive in the short time, will lead to front end can not quickly consume new information.To solve The method of the above problem, the real-time update page data of the present embodiment is further comprising the steps of: when what is received in the unit time When the quantity of message queue is more than threshold value, multiple consumer objects are created, consume the message received in turn by each consumer objects Queue.
Wherein, consumer objects are the object for handling message queue.Consumption, which refers to, handles message by the consumer objects of creation Queue executes the relevant operation of step S202, step S203.
The quantity that message queue is received by detecting, is adaptively created the consumer objects of respective numbers, before improving The ability for a large amount of new datas that end reply backstage generates.
The method of the present embodiment is further comprising the steps of: obtaining preset configuration file, includes type mark in configuration file Know.
The data type that front end needs to extract from message queue can be arranged by configuration file in user, to facilitate user's root It is quickly adjusted according to different business demands.
In the present embodiment, the format for the new information that backstage is sent is key-value, and value is new data, and key is new number According to corresponding type identification.The structure of new information is not required, new information may be tree construction, it is also possible to JSON structure, Or extended formatting.
Correspondingly, step S202 is specifically included: being extracted from the new information of message queue and the type in configuration file Corresponding new data is identified, data to be written are determined according to new data.
After front end successfully gets message queue, from the success block of AJAX, (success block indicates that AJAX is successfully obtained Get the processing code block after message) in the queue message that will acquire extract, configuration is found from queue message Type identification in file, the value value after extracting type identification, determines number to be written further according to the value extracted According to.Therefore, no matter the data that backstage provides are tree construction or JSON structure, can rapidly realize the extraction of data, and User can be conveniently set up according to practical business demand by configuration file, change the data type for needing to extract.
Optionally, step S202 is specifically included: extracting the ID mark in new information, ID is identified as each mark in current page The unique identification of label.Wherein, label is html tag.
Correspondingly, step S203 is specifically included: target labels corresponding with ID mark is inquired by DOM, by target mark Data in label are updated to data to be written.
Optionally, before step S201 further include: periodically send the request for obtaining message queue to server.
Wherein, the time interval of request can be regularly sent according to the generation frequency sets itself of new data in practical business, Such as: when data update is more frequent, front end can send the request of acquisition message queue every 0.5s to server.Server After the request of acquisition message queue for receiving front end transmission, corresponding message queue is sent to by request by message-oriented middleware Front end.
The above-mentioned mode that message queue is actively obtained by front end is easy to produce meaningless consumption.For this purpose, being used in the present embodiment The long connection mechanism of websocket is realized by server forward end active push message queue, is avoided because of the continuous poll clothes in front end Business device and generate meaningless consumption.
On the basis of establishing long connection, step S201 is specifically included: by the long connection established with server, receiving clothes The message queue that business device is sent.
Embodiment five
Based on embodiment one, two identical inventive concepts, present embodiments provide a kind of real-time update page data Device, shown in Fig. 3, the device 30 of the real-time update page data may include: message storage module 301 and message transmission module 302。
Message storage module 301, the new information generated for receiving backstage, and new information is put into it is right in message-oriented middleware The message queue answered, new information include the station location marker of new data and the position to be updated being used to indicate in current web page;
Message transmission module 302, for when meeting preset condition, by the message queue in message-oriented middleware be sent to The corresponding front end of message queue, so that front end updates current page according to the new information in message queue.
The device of real-time update page data provided in this embodiment is a large amount of new by what is generated from the background by intermediary message part Message dumps to corresponding message queue, and message queue is forwarded to corresponding front end immediately so that front end can in real time, Some data in the page are automatically updated, so that operator can obtain latest news without the manual refreshing page, avoid Operator leads to work delays because omitting newest data, while alleviating the workload of operator.In addition, among message Part has exception handling, and operation system need to only place data into corresponding message queue, when system is abnormal and extensive After multiple exception, message-oriented middleware can retransmit message automatically, therefore, forward message by message-oriented middleware, disconnected without having to worry about suspension The abnormal conditions such as electricity improve the stability of operation system.
Optionally, message transmission module 302 is specifically used for the long connection by establishing with front end, periodically by message-oriented middleware In message queue be sent to front end corresponding with message queue.
Optionally, message transmission module 302 is specifically used for when message queue changes, and passes through the length established with front end Connection, is actively sent to front end corresponding with message queue for the message queue in message-oriented middleware.
Optionally, message transmission module 302, for when meeting preset condition, by the message queue in message-oriented middleware It is cached in Redis server, message queue is sent to by the corresponding front end of message queue by Redis server, so that preceding End updates current page according to the new information in message queue.
The device of the real-time update page data of the present embodiment uses the real-time update page data with embodiment one, two The identical inventive concept of method, identical technical effect can be obtained, details are not described herein.
Embodiment six
Based on implement three, four identical inventive concepts, the embodiment of the present application provides a kind of real-time update page data Device, as shown in figure 4, the device 40 of the real-time update page data may include: receiving module 401, extraction module 402 with And update module 403.
Receiving module 401, for receiving the message queue of server transmission.
Extraction module 402, for extracting the new information in message queue, according to new information determine data to be written and to The corresponding station location marker of data is written.
Update module 403, for by DOM Document Object Model DOM determine in current page it is corresponding with station location marker to Position is updated, the data at position to be updated are updated to data to be written.
The device of real-time update page data provided in this embodiment, orientation accurately obtain need the data that update and Position of the more new data in the page realizes Local hydrodynamic unit page data by DOM, so that operator is not necessarily to manual refreshing The page can obtain latest news, avoid operator from leading to work delays because omitting newest data, while alleviating operation The workload of personnel.In addition, the data that front end updates needed for can accurately obtaining, without in order to which single newest data are by entire page Face is refreshed one time again, reduces the consumption of operation system.
Optionally, the device of the present embodiment further includes Object Creation module 404, for disappearing when what is received in the unit time When ceasing the quantity of queue more than threshold value, multiple consumer objects are created, consume the message team received in turn by each consumer objects Column.
Optionally, the device of the present embodiment further includes that configuration file obtains module 405, for obtaining preset configuration text Part.It wherein, include type identification in configuration file.
The format for the new information that backstage generates is key-value, wherein value is new data, and key is corresponding for new data Type identification.
Correspondingly, extraction module 402 is specifically used for: extracting from the new information of message queue and the class in configuration file Type identifies corresponding new data, determines data to be written according to new data.
Optionally, extraction module 402 is specifically used for: extracting the ID mark in new information.Wherein, ID is identified as current page In each label unique identification.
Optionally, update module 403 is specifically used for: by DOM Document Object Model DOM, inquiring mesh corresponding with ID mark Mark label;Data in target labels are updated to data to be written.
Optionally, receiving module 401 is specifically used for: by the long connection established with server, receiving what server was sent Message queue.
The device of the real-time update page data of the present embodiment uses the real-time update page data with embodiment three, four The identical inventive concept of method, identical technical effect can be obtained, details are not described herein.
Embodiment seven
The embodiment of the present application provides a kind of electronic equipment, as shown in figure 5, electronic equipment shown in fig. 5 500 includes: place Manage device 501 and memory 503.Wherein, processor 501 is connected with memory 503, is such as connected by bus 502.Optionally, electric Sub- equipment 500 can also include transceiver 504.It should be noted that transceiver 504 is not limited to one in practical application, the electricity The structure of sub- equipment 500 does not constitute the restriction to the embodiment of the present application.
Wherein, processor 501 is applied in the embodiment of the present application, for realizing 301 He of message storage module shown in Fig. 3 The function of message transmission module 302.Transceiver 504 includes Receiver And Transmitter.
Processor 501 can be CPU, general processor, DSP, ASIC, FPGA or other programmable logic device, crystalline substance Body pipe logical device, hardware component or any combination thereof.It, which may be implemented or executes, combines described by present disclosure Various illustrative logic blocks, module and circuit.Processor 501 is also possible to realize the combination of computing function, such as wraps It is combined containing one or more microprocessors, DSP and the combination of microprocessor etc..
Bus 502 may include an access, and information is transmitted between said modules.Bus 502 can be pci bus or EISA Bus etc..Bus 502 can be divided into address bus, data/address bus, control bus etc..For convenient for indicating, in Fig. 5 only with one slightly Line indicates, it is not intended that an only bus or a type of bus.
Memory 503 can be ROM or can store the other kinds of static storage device of static information and instruction, RAM Or the other kinds of dynamic memory of information and instruction can be stored, it is also possible to EEPROM, CD-ROM or other CDs Storage, optical disc storage (including compression optical disc, laser disc, optical disc, Digital Versatile Disc, Blu-ray Disc etc.), magnetic disk storage medium Or other magnetic storage apparatus or can be used in carry or store have instruction or data structure form desired program generation Code and can by any other medium of computer access, but not limited to this.
Compared with prior art, electronic equipment provided by the embodiments of the present application is generated backstage by intermediary message part A large amount of new informations dump to corresponding message queue, and message queue is forwarded to corresponding front end immediately, so that front end energy Enough in real time, some data being automatically updated in the page, so that operator can obtain newest disappear without the manual refreshing page Breath avoids operator from leading to work delays because omitting newest data, while alleviating the workload of operator.In addition, Message-oriented middleware has exception handling, and operation system need to only place data into corresponding message queue, when system occurs Exception and after restoring exception, message-oriented middleware can retransmit message automatically, therefore, message be forwarded by message-oriented middleware, without load The abnormal conditions such as heart suspension power-off, improve the stability of operation system.
Embodiment eight
The embodiment of the present application provides a kind of electronic equipment, as shown in fig. 6, electronic equipment shown in fig. 6 600 includes: place Manage device 601 and memory 603.Wherein, processor 601 is connected with memory 603, is such as connected by bus 602.Optionally, electric Sub- equipment 600 can also include transceiver 604.It should be noted that transceiver 604 is not limited to one in practical application, the electricity The structure of sub- equipment 600 does not constitute the restriction to the embodiment of the present application.
Wherein, processor 601 is applied in the embodiment of the present application, for realizing receiving module 401 shown in Fig. 4, extracts The function of module 402 and update module 403.Transceiver 604 includes Receiver And Transmitter.
Processor 601 can be CPU, general processor, DSP, ASIC, FPGA or other programmable logic device, crystalline substance Body pipe logical device, hardware component or any combination thereof.It, which may be implemented or executes, combines described by present disclosure Various illustrative logic blocks, module and circuit.Processor 601 is also possible to realize the combination of computing function, such as wraps It is combined containing one or more microprocessors, DSP and the combination of microprocessor etc..
Bus 602 may include an access, and information is transmitted between said modules.Bus 602 can be pci bus or EISA Bus etc..Bus 602 can be divided into address bus, data/address bus, control bus etc..For convenient for indicating, in Fig. 6 only with one slightly Line indicates, it is not intended that an only bus or a type of bus.
Memory 603 can be ROM or can store the other kinds of static storage device of static information and instruction, RAM Or the other kinds of dynamic memory of information and instruction can be stored, it is also possible to EEPROM, CD-ROM or other CDs Storage, optical disc storage (including compression optical disc, laser disc, optical disc, Digital Versatile Disc, Blu-ray Disc etc.), magnetic disk storage medium Or other magnetic storage apparatus or can be used in carry or store have instruction or data structure form desired program generation Code and can by any other medium of computer access, but not limited to this.
Compared with prior art, electronic equipment provided by the embodiments of the present application, orientation accurately obtain the number for needing to update Accordingly and position of the more new data in the page, Local hydrodynamic unit page data is realized by DOM, so that operator is not necessarily to hand Dynamic refresh page can obtain latest news, avoid operator from leading to work delays because omitting newest data, mitigate simultaneously The workload of operator.In addition, the data that front end updates needed for can accurately obtaining, without in order to which individually newest data will Full page refreshes one time again, reduces the consumption of operation system.
Embodiment nine
The embodiment of the present application provides a kind of computer readable storage medium, is stored on the computer readable storage medium Computer program realizes the method for real-time update page data shown in embodiment one when the program is executed by processor.
The embodiment of the present application provides a kind of computer readable storage medium, compared with prior art, passes through intermediary message A large amount of new informations that backstage generates are dumped to corresponding message queue by part, and immediately by message queue be forwarded to it is corresponding before End so that front end can in real time, some data for being automatically updated in the page so that operator is not necessarily to the manual refreshing page Latest news can be obtained, avoids operator from leading to work delays because omitting newest data, while alleviating operator Workload.In addition, message-oriented middleware has exception handling, operation system only need to place data into corresponding message queue i.e. Can, after system is abnormal and restores exception, message-oriented middleware can retransmit message automatically, therefore, be turned by message-oriented middleware Message is sent out, without having to worry about abnormal conditions such as suspension power-off, improves the stability of operation system.
Optionally, the embodiment of the present application also provides a kind of computer readable storage medium, the computer-readable storage mediums It is stored with computer program in matter, real-time update page data shown in embodiment two is realized when which is executed by processor Method, details are not described herein.
Embodiment ten
The embodiment of the present application provides a kind of computer readable storage medium, is stored on the computer readable storage medium Computer program realizes the method for real-time update page data shown in embodiment three when the program is executed by processor.
The embodiment of the present application provides a kind of computer readable storage medium, and compared with prior art, orientation accurately obtains The position of data and more new data that needs update in the page is taken, Local hydrodynamic unit page data is realized by DOM, so that Operator can obtain latest news without the manual refreshing page, and operator is avoided to cause to be delayed because omitting newest data Work, while alleviating the workload of operator.In addition, the data that front end updates needed for can accurately obtaining, without for list A newest data refresh full page one time again, reduce the consumption of operation system.
Optionally, the embodiment of the present application also provides a kind of computer readable storage medium, the computer-readable storage mediums It is stored with computer program in matter, real-time update page data shown in example IV is realized when which is executed by processor Method, details are not described herein.
It should be understood that although each step in the flow chart of attached drawing is successively shown according to the instruction of arrow, These steps are not that the inevitable sequence according to arrow instruction successively executes.Unless expressly stating otherwise herein, these steps Execution there is no stringent sequences to limit, can execute in the other order.Moreover, at least one in the flow chart of attached drawing Part steps may include that perhaps these sub-steps of multiple stages or stage are not necessarily in synchronization to multiple sub-steps Completion is executed, but can be executed at different times, execution sequence, which is also not necessarily, successively to be carried out, but can be with other At least part of the sub-step or stage of step or other steps executes in turn or alternately.
The above is only some embodiments of the application, it is noted that for the ordinary skill people of the art For member, under the premise of not departing from the application principle, several improvements and modifications can also be made, these improvements and modifications are also answered It is considered as the protection scope of the application.

Claims (10)

1. a kind of method of real-time update page data characterized by comprising
Receive the message queue that server is sent;
The new information in the message queue is extracted, determines that data to be written and data to be written are corresponding according to the new information Station location marker;
Position to be updated corresponding with the station location marker in current page is determined by DOM Document Object Model DOM, it will be described Data at position to be updated are updated to the data to be written.
2. the method according to claim 1, wherein the method also includes: when what is received in the unit time When the quantity of message queue is more than threshold value, multiple consumer objects are created, consume the message received in turn by each consumer objects Queue.
3. the method according to claim 1, wherein the method also includes: obtain preset configuration file, institute Stating includes type identification in configuration file;
The format of the new information is key-value, wherein value is new data, and key is the corresponding type of the new data Mark;
The new information extracted in the message queue, determines data to be written according to the new information, comprising:
From extracting new data corresponding with the type identification in the configuration file in the new information of the message queue;
Data to be written are determined according to the new data.
4. the method according to claim 1, wherein described determine that data to be written are corresponding according to the new information Station location marker, comprising: extract the ID mark in the new information, the ID is identified as the unique of each label in current page Mark;
It is described that position to be updated corresponding with the station location marker in current page is determined by DOM Document Object Model DOM, it will Data at the position to be updated are updated to the data to be written, comprising:
Target labels corresponding with ID mark are inquired by DOM;
Data in the target labels are updated to the data to be written.
5. a kind of method of real-time update page data characterized by comprising
The new information that backstage generates is received, and the new information is put into corresponding message queue in message-oriented middleware, it is described new Message includes the station location marker of new data and the position to be updated being used to indicate in current web page;
When meeting preset condition, the message queue in message-oriented middleware is sent to front end corresponding with the message queue, So that the front end updates current page according to the new information in the message queue.
6., will be in message-oriented middleware the method according to claim 1, wherein described when meeting preset condition Message queue be sent to front end corresponding with the message queue, comprising:
By the long connection established with the front end, periodically the message queue in message-oriented middleware is sent to and the message team Arrange corresponding front end;
Or,
It, actively will be in the message-oriented middleware by the long connection established with the front end when message queue changes Message queue is sent to front end corresponding with the message queue.
7. a kind of device of real-time update page data characterized by comprising
Receiving module, for receiving the message queue of server transmission;
Extraction module, for extracting the new information in the message queue, according to the new information determine data to be written and The corresponding station location marker of data to be written;
Update module, for corresponding with the station location marker to more in current page by DOM Document Object Model DOM determination Data at the position to be updated are updated to the data to be written by new position.
8. a kind of device of real-time update page data characterized by comprising
Message storage module, the new information generated for receiving backstage, and the new information is put into message-oriented middleware and is corresponded to Message queue, the new information includes the station location marker of new data and the position to be updated being used to indicate in current web page;
Message transmission module, for the message queue in message-oriented middleware being sent to and is disappeared with described when meeting preset condition The corresponding front end of queue is ceased, so that the front end updates current page according to the new information in the message queue.
9. a kind of electronic equipment, characterized in that it comprises:
One or more processors;
Memory;
One or more application program, wherein one or more of application programs are stored in the memory and are configured To be executed by one or more of processors, one or more of application programs are configured to: being executed according to claim 1 To the method for real-time update page data described in any one of 6.
10. a kind of computer readable storage medium, which is characterized in that the computer readable storage medium is for storing computer Instruction, when run on a computer, allows computer to execute reality described in any one of the claims 1 to 6 The method of Shi Gengxin page data.
CN201810797555.1A 2018-07-19 2018-07-19 The method, apparatus of real-time update page data, electronic equipment Pending CN108989429A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201810797555.1A CN108989429A (en) 2018-07-19 2018-07-19 The method, apparatus of real-time update page data, electronic equipment
PCT/CN2018/108084 WO2020015186A1 (en) 2018-07-19 2018-09-27 Method and apparatus for real-time update of page data and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810797555.1A CN108989429A (en) 2018-07-19 2018-07-19 The method, apparatus of real-time update page data, electronic equipment

Publications (1)

Publication Number Publication Date
CN108989429A true CN108989429A (en) 2018-12-11

Family

ID=64548731

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810797555.1A Pending CN108989429A (en) 2018-07-19 2018-07-19 The method, apparatus of real-time update page data, electronic equipment

Country Status (2)

Country Link
CN (1) CN108989429A (en)
WO (1) WO2020015186A1 (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110213302A (en) * 2019-07-11 2019-09-06 创新奇智(北京)科技有限公司 A kind of method, computer-readable medium and system pushing welcome's message
CN110311959A (en) * 2019-06-19 2019-10-08 广州华多网络科技有限公司 The method, apparatus and data processing system of message push and renewal of the page
CN111177489A (en) * 2019-12-26 2020-05-19 贝壳技术有限公司 Object data display method and system
CN111563102A (en) * 2020-04-10 2020-08-21 中国联合网络通信集团有限公司 Cache updating method, server, system and storage medium
CN111797154A (en) * 2020-07-03 2020-10-20 紫光云技术有限公司 Json-based real-time extraction method
CN112417009A (en) * 2020-10-12 2021-02-26 南京江北新区生物医药公共服务平台有限公司 Visual display method and device for medical data
CN112565356A (en) * 2020-11-24 2021-03-26 北京百度网讯科技有限公司 Data storage method and device and electronic equipment
CN113378622A (en) * 2021-04-06 2021-09-10 青岛以萨数据技术有限公司 Specific person identification method, device, system and medium
CN113535862A (en) * 2021-07-20 2021-10-22 江苏创源电子有限公司 Business data pushing method and device, electronic equipment and storage medium
CN113590253A (en) * 2021-10-08 2021-11-02 深圳市信润富联数字科技有限公司 Server-side-based communication interaction method, device and storage medium
CN114721759A (en) * 2022-03-31 2022-07-08 珠海豹趣科技有限公司 Android desktop view display method and device and electronic equipment
CN116048828A (en) * 2022-05-26 2023-05-02 荣耀终端有限公司 Method for processing drawing message, electronic device and storage medium

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111401819B (en) * 2020-04-08 2023-07-11 上海东普信息科技有限公司 Intersystem data pushing method and system
CN111831954B (en) * 2020-07-20 2023-11-03 汉海信息技术(上海)有限公司 Content data updating method, device, computer equipment and storage medium
CN114070563B (en) * 2020-07-31 2023-09-05 中移(苏州)软件技术有限公司 Data processing method, device, terminal and storage medium
CN111880955A (en) * 2020-08-04 2020-11-03 北京立通智联科技有限公司 Message processing method, device, terminal and medium for Internet of things equipment
CN113407528A (en) * 2020-11-20 2021-09-17 广东美云智数科技有限公司 Authority data synchronization method, management device and storage medium
CN112486473B (en) * 2020-11-30 2022-09-13 中国电子科技集团公司第二十八研究所 Kafka and Redis-based quasi-real-time target track display method
CN112596925B (en) * 2020-12-25 2024-02-23 中国农业银行股份有限公司 Transaction data transmission method and device
CN112887445B (en) * 2021-01-22 2023-04-07 北京金山云网络技术有限公司 Method and device for updating domain name information and domain name server
CN112925661B (en) * 2021-03-09 2024-04-19 广州虎牙科技有限公司 Message processing method, device, computer equipment and storage medium
CN113179304B (en) * 2021-04-22 2022-10-28 平安消费金融有限公司 Message issuing method, system, device and storage medium
CN113221049B (en) * 2021-04-27 2023-09-01 北京奇艺世纪科技有限公司 Page updating method and device, electronic equipment and storage medium
CN115267282A (en) * 2021-04-29 2022-11-01 内蒙古电力(集团)有限责任公司电力营销服务与运营管理分公司 Display method and device of electric energy meter and electronic equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080104025A1 (en) * 2006-10-31 2008-05-01 Gautam Dharamshi Method and system for efficient execution and rendering of client/server interactive applications
CN101782912A (en) * 2009-06-23 2010-07-21 北京搜狗科技发展有限公司 Method and system for information prompt
CN102523177A (en) * 2011-12-19 2012-06-27 北京新媒传信科技有限公司 Method and system for realization of message push service
CN102916994A (en) * 2011-08-02 2013-02-06 华为技术有限公司 Page viewing method, server and terminal
CN105095233A (en) * 2014-04-29 2015-11-25 广州市动景计算机科技有限公司 Local web image updating method, device and system
WO2016091124A1 (en) * 2014-12-11 2016-06-16 华为技术有限公司 File intercepting method and device
CN106598659A (en) * 2016-12-08 2017-04-26 浪潮(苏州)金融技术服务有限公司 Data file construction method, method and device for updating application program

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070100844A1 (en) * 2005-10-28 2007-05-03 International Business Machines Corporation System and method for dynamically updating web pages using messaging-oriented middleware
CN101114936A (en) * 2007-09-06 2008-01-30 华为技术有限公司 Topological diagram display process, system and device
CN103593396A (en) * 2013-10-08 2014-02-19 北京奇虎科技有限公司 Network resource extracting method and device based on browser

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080104025A1 (en) * 2006-10-31 2008-05-01 Gautam Dharamshi Method and system for efficient execution and rendering of client/server interactive applications
CN101782912A (en) * 2009-06-23 2010-07-21 北京搜狗科技发展有限公司 Method and system for information prompt
CN102916994A (en) * 2011-08-02 2013-02-06 华为技术有限公司 Page viewing method, server and terminal
CN102523177A (en) * 2011-12-19 2012-06-27 北京新媒传信科技有限公司 Method and system for realization of message push service
CN105095233A (en) * 2014-04-29 2015-11-25 广州市动景计算机科技有限公司 Local web image updating method, device and system
WO2016091124A1 (en) * 2014-12-11 2016-06-16 华为技术有限公司 File intercepting method and device
CN106598659A (en) * 2016-12-08 2017-04-26 浪潮(苏州)金融技术服务有限公司 Data file construction method, method and device for updating application program

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110311959B (en) * 2019-06-19 2022-04-26 广州方硅信息技术有限公司 Method and device for message pushing and page updating and data processing system
CN110311959A (en) * 2019-06-19 2019-10-08 广州华多网络科技有限公司 The method, apparatus and data processing system of message push and renewal of the page
CN110213302A (en) * 2019-07-11 2019-09-06 创新奇智(北京)科技有限公司 A kind of method, computer-readable medium and system pushing welcome's message
CN111177489A (en) * 2019-12-26 2020-05-19 贝壳技术有限公司 Object data display method and system
CN111563102A (en) * 2020-04-10 2020-08-21 中国联合网络通信集团有限公司 Cache updating method, server, system and storage medium
CN111797154A (en) * 2020-07-03 2020-10-20 紫光云技术有限公司 Json-based real-time extraction method
CN112417009A (en) * 2020-10-12 2021-02-26 南京江北新区生物医药公共服务平台有限公司 Visual display method and device for medical data
CN112565356A (en) * 2020-11-24 2021-03-26 北京百度网讯科技有限公司 Data storage method and device and electronic equipment
CN112565356B (en) * 2020-11-24 2023-04-21 北京百度网讯科技有限公司 Data storage method and device and electronic equipment
CN113378622A (en) * 2021-04-06 2021-09-10 青岛以萨数据技术有限公司 Specific person identification method, device, system and medium
CN113535862A (en) * 2021-07-20 2021-10-22 江苏创源电子有限公司 Business data pushing method and device, electronic equipment and storage medium
CN113590253B (en) * 2021-10-08 2022-02-15 深圳市信润富联数字科技有限公司 Server-side-based communication interaction method, device and storage medium
CN113590253A (en) * 2021-10-08 2021-11-02 深圳市信润富联数字科技有限公司 Server-side-based communication interaction method, device and storage medium
CN114721759A (en) * 2022-03-31 2022-07-08 珠海豹趣科技有限公司 Android desktop view display method and device and electronic equipment
CN114721759B (en) * 2022-03-31 2023-11-24 珠海豹趣科技有限公司 Android desktop view display method and device and electronic equipment
CN116048828A (en) * 2022-05-26 2023-05-02 荣耀终端有限公司 Method for processing drawing message, electronic device and storage medium
CN116048828B (en) * 2022-05-26 2023-10-20 荣耀终端有限公司 Method for processing drawing message, electronic device and storage medium

Also Published As

Publication number Publication date
WO2020015186A1 (en) 2020-01-23

Similar Documents

Publication Publication Date Title
CN108989429A (en) The method, apparatus of real-time update page data, electronic equipment
CN108536761B (en) Report data query method and server
CN102750312B (en) Across the recovery of the tenant data of tenant's movement
CN105095365A (en) Information flow data processing method and device
CN107122379A (en) Collect the Transaction Information associated with the data file being locally stored
US8489694B2 (en) Peer-to-peer collaboration of publishers in a publish-subscription environment
CN101917394B (en) Middleware system for sharing data in mobile phone equipment and working method
CN106603711B (en) Communication method, system and message server
CN111818117A (en) Data updating method and device, storage medium and electronic equipment
CN105306585A (en) Data synchronization method for plurality of data centers
CN103209153A (en) Method, device and system for processing messages
CN109285586A (en) Chemical reagent inventory management method, electronic equipment and computer readable storage medium
US9667737B2 (en) Publisher-assisted, broker-based caching in a publish-subscription environment
CN110493122A (en) A kind of synchronous method of session information, calculates equipment and storage medium at device
CN102347847A (en) Contact state releasing method and system
CN113347269A (en) Data updating method of industrial system, electronic equipment and storage medium
US20120221650A1 (en) Broker facilitated peer-to-peer publisher collaboration in a publish-subscription environment
CN109657005A (en) A kind of data cache method of distributed cluster system, device and equipment
CN110737655A (en) Method and device for reporting data
CN103475520A (en) Service processing control method and device in distribution network
CN108847949A (en) Message informing method, device, electronic equipment and storage medium based on cloud platform
CN102739562B (en) Method and device for sending collection information
CN111555894A (en) Data processing method, device, equipment and storage medium
CN201854301U (en) Middleware system for sharing data on mobile phones
CN103268264B (en) A kind of multi event synchronization RFID middleware system of low coupling and its implementation

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20181211

RJ01 Rejection of invention patent application after publication