[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN113010131B - Display content updating method, device, terminal, server and storage medium - Google Patents

Display content updating method, device, terminal, server and storage medium Download PDF

Info

Publication number
CN113010131B
CN113010131B CN202110276286.6A CN202110276286A CN113010131B CN 113010131 B CN113010131 B CN 113010131B CN 202110276286 A CN202110276286 A CN 202110276286A CN 113010131 B CN113010131 B CN 113010131B
Authority
CN
China
Prior art keywords
target data
service instance
data
server
cache
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110276286.6A
Other languages
Chinese (zh)
Other versions
CN113010131A (en
Inventor
刘丹
郭兵
陈福洪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jingdong Technology Holding Co Ltd
Original Assignee
Jingdong Technology Holding 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 Jingdong Technology Holding Co Ltd filed Critical Jingdong Technology Holding Co Ltd
Priority to CN202110276286.6A priority Critical patent/CN113010131B/en
Publication of CN113010131A publication Critical patent/CN113010131A/en
Application granted granted Critical
Publication of CN113010131B publication Critical patent/CN113010131B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/1423Digital output to display device ; Cooperation and interconnection of the display device with other functional units controlling a plurality of local displays, e.g. CRT and flat panel display
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2393Updating materialised views
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24552Database cache management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/26Visual data mining; Browsing structured data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/1454Digital output to display device ; Cooperation and interconnection of the display device with other functional units involving copying of the display data of a local workstation or window to a remote workstation or window so that an actual copy of the data is displayed simultaneously on two or more displays, e.g. teledisplay
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/544Buffers; Shared memory; Pipes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/544Remote
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/548Queue

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Human Computer Interaction (AREA)
  • Computational Linguistics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The disclosure provides a display content updating method, a device, a terminal, a server and a storage medium, and relates to the technical field of data transmission. The display content updating method comprises the following steps: detecting whether target data meeting a data request is stored in cache equipment of a server or not; when detecting that the target data is not stored in the cache device, calling a service instance of the target data, and calculating the target data by the service instance based on a preset calculation frequency; storing the calculated target data in a cache device; when a data request sent by the monitoring equipment is received, the latest stored target data is called from the cache equipment; and sending the latest saved target data to the monitoring equipment so as to update the display content based on the target data by the monitoring equipment. According to the technical scheme, the latest stored target data is prestored by using the caching equipment, and the sending operation of the target data is used as the direct response operation of the data request, so that the response efficiency of the server to the data request is improved.

Description

Display content updating method, device, terminal, server and storage medium
Technical Field
The present disclosure relates to the field of data transmission technologies, and in particular, to a display content updating method, device, terminal, server, and computer readable storage medium.
Background
The service monitoring large screen generally adopts front-end periodic polling (usually 1 s) to call a rear-end interface to acquire service data, and renders a page display chart after returning the data. The back end usually accesses a storage service such as a database to calculate large screen data and returns the large screen data in real time after receiving the request.
In the related art, a service monitoring large screen starts to calculate when receiving a user request, and then processes the calculation request based on a fixed request frequency (for example, 1 s), and because the time points when different users start to request are different, the deadlines of the calculation statistics data are different, so that the calculation results may have differences.
In addition, different front ends trigger different calculation processes, so that the database request amount is increased, a large number of repeated calculations are performed, more server resources are needed, and a larger number of concurrent requests cannot be supported.
It should be noted that the information disclosed in the above background section is only for enhancing understanding of the background of the present disclosure and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
An object of the present disclosure is to provide a display content updating method, apparatus, electronic device, and computer-readable storage medium capable of improving, at least to some extent, a problem in the related art that calculation results may have a difference due to a difference in deadline of calculation statistics.
Other features and advantages of the present disclosure will be apparent from the following detailed description, or may be learned in part by the practice of the disclosure.
According to one aspect of the present disclosure, there is provided a display content updating method including: detecting whether target data meeting a data request is stored in cache equipment of a server or not; when the fact that the target data are not stored in the cache equipment is detected, a service instance of the target data is called, and the service instance calculates the target data based on preset calculation frequency; storing the calculated target data in the cache device; when the data request sent by the monitoring equipment is received, the latest stored target data is called from the cache equipment; and sending the latest saved target data to the monitoring equipment so as to update the display content based on the target data by the monitoring equipment.
In one embodiment, the service instance includes a plurality of service instances, each service instance runs a matched data model of the target data, when detecting that the target data is not stored in the cache device, invoking the service instance of the target data, and calculating the target data by the service instance based on a preset calculation frequency includes: executing preemption operation of computing resources by a plurality of service instances, and determining the service instance preempted to the computing resources as a first service instance; and calling the first service example to calculate the corresponding target data based on the calculation frequency.
In one embodiment, the plurality of service instances performing preemption operations of a computing resource, determining the service instance preempted to the computing resource as a first service instance comprises: writing a resource request identifier to the cache equipment by a plurality of service instances; and determining the service instance successfully written as the first service instance.
In one embodiment, further comprising: and determining the service instance which does not rob the computing resource as a second service instance, and notifying the second service instance based on an MQ message queue when the first service instance completes the computation of the corresponding target data so as to compute the corresponding target data based on the computation frequency by the second service instance.
In one embodiment, the service instance includes a plurality of service instances, each service instance runs a matched data model of the target data, when detecting that the target data is not stored in the cache device, invoking the service instance of the target data, and calculating the target data by the service instance based on a preset calculation frequency includes: and when the fact that the target data are not stored in the cache equipment is detected, calling the corresponding service instance to calculate the target data based on the time sequence of importing the data model.
In one embodiment, further comprising: and receiving the data request sent by the monitoring equipment based on a polling mechanism and/or an http2 multiplexing mechanism so as to send the matched target data based on the data request.
In one embodiment, the cache device of the server includes a remote cache module communicatively coupled to the server and/or a memory module of the server.
According to another aspect of the present disclosure, there is provided a display content updating apparatus including: the detection module is used for detecting whether target data meeting the data request is stored in the cache equipment of the server or not; the calling module is used for calling a service instance of the target data when the fact that the target data is not stored in the cache equipment is detected, and the service instance calculates the target data based on preset calculation frequency; the storage module is used for storing the calculated target data in the cache device; the retrieving module is used for retrieving the latest stored target data from the cache device when receiving the data request of the target data sent by the monitoring device; and the sending module is used for sending the latest stored target data to the monitoring equipment so as to update the display content based on the target data by the monitoring equipment.
According to still another aspect of the present disclosure, there is provided a server including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the display content update method of any one of the above via execution of the executable instructions.
According to still another aspect of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the display content updating method of any one of the above.
According to the display content updating scheme provided by the embodiment of the disclosure, before receiving the data request of the target data sent by the monitoring device, the server updates the target data based on the data updating operation, and stores the updated target data into the cache device, so that when the data request is received, the stored latest stored target data is sent to the monitoring device, the quick response of the server to the data request of the monitoring device is realized, and the sending operation of the target data is used as the direct response operation of the data request by utilizing the cache device to prestore the latest stored target data, so that the response efficiency of the server to the data request is improved.
Further, based on the operation of pre-storing the latest stored target data, only the corresponding service instance needs to be called for executing the updating operation once for a group of target data, so that repeated calculation is reduced, and resource consumption of a server is reduced.
Still further, the setting of the timing calculation module enables the cache device to store only one group of newly stored target data at a certain moment, and even if deviation exists between time points of data requests sent by different monitoring devices, the probability of returning the same target data to different monitoring devices can be improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure. It will be apparent to those of ordinary skill in the art that the drawings in the following description are merely examples of the disclosure and that other drawings may be derived from them without undue effort.
FIG. 1 is a schematic diagram showing a structure of a display content updating system in an embodiment of the present disclosure;
FIG. 2 illustrates a flow chart of a display content update method in an embodiment of the present disclosure;
FIG. 3 illustrates a flow chart of another display content update method in an embodiment of the present disclosure;
FIG. 4 illustrates a flow chart of yet another display content update method in an embodiment of the present disclosure;
FIG. 5 is a schematic diagram showing another display content update system architecture in an embodiment of the present disclosure;
FIG. 6 is a schematic diagram showing an interactive flow of a display content update method according to an embodiment of the present disclosure;
FIG. 7 is a schematic diagram of a display content update apparatus in an embodiment of the present disclosure;
fig. 8 shows a schematic diagram of an electronic device in an embodiment of the disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments may be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus a repetitive description thereof will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software or in one or more hardware modules or integrated circuits or in different networks and/or processor devices and/or microcontroller devices.
According to the scheme, the latest stored target data is prestored by using the caching equipment, and the sending operation of the target data is used as the direct response operation of the data request, so that the response efficiency of the server to the data request is improved. Based on the operation of pre-storing the latest stored target data, the corresponding service instance is only required to be called for executing the updating operation once aiming at a group of target data, so that repeated calculation is reduced, and further the resource consumption of a server is reduced. In addition, the timing calculation module is arranged, so that the cache device only stores a group of latest stored target data at a certain moment, and even if deviation exists between time points of sending data requests by different monitoring devices, the probability of returning the same target data to different monitoring devices can be improved.
For ease of understanding, several terms referred to in this application are first explained below.
http2: the HTTP2 adopts binary format transmission, replaces text format of HTTP1.X, and binary format analysis is more efficient. Multiplexing replaces the http1.X sequence and blocking mechanism, and all the same domain name requests are done concurrently over the same TCP connection. In http1.X, multiple TCP connections are required for multiple requests to be concurrent, and the browser has 6-8 TCP connections all limited in order to control resources.
MQ: MQ (Message Queue) message queue is a "first-in first-out" data structure in the underlying data structure. The method is generally used for solving the problems of application decoupling, asynchronous message, flow peak clipping and the like, and realizing a high-performance, high-availability, scalable and final consistency architecture.
Redis (Remote Dictionary Server), a remote dictionary service, is an open-source log-type, key-Value database written in ANSI C language, supporting network, memory-based and persistent, and provides APIs in multiple languages.
The scheme provided by the embodiment of the application relates to the technologies of data transmission and the like, and is specifically described through the following embodiments.
Fig. 1 shows a schematic structural diagram of a display content updating system according to an embodiment of the present disclosure, including a plurality of terminals 120 and a server cluster 140.
The terminal 120 may be a mobile terminal such as a mobile phone, a game console, a tablet computer, an electronic book reader, a smart glasses, an MP4 (Moving Picture Experts Group Audio Layer IV, dynamic image expert compression standard audio layer 4) player, a smart home device, an AR (Augmented Reality ) device, a VR (Virtual Reality) device, or the terminal 120 may be a personal computer (Personal Computer, PC) such as a laptop portable computer and a desktop computer, etc.
Among them, an application program for providing display content update may be installed in the terminal 120.
The terminal 120 is connected to the server cluster 140 through a communication network. Optionally, the communication network is a wired network or a wireless network.
The server cluster 140 is a server, or is composed of several servers, or is a virtualized platform, or is a cloud computing service center. The server cluster 140 is used to provide background services for providing display content update applications. Optionally, the server cluster 140 takes on primary computing work and the terminal 120 takes on secondary computing work; alternatively, the server cluster 140 takes on secondary computing work and the terminal 120 takes on primary computing work; alternatively, a distributed computing architecture is employed between the terminal 120 and the server cluster 140 for collaborative computing.
In some alternative embodiments, the server cluster 140 is used to store display content update models and the like.
Alternatively, the clients of the applications installed in different terminals 120 are the same, or the clients of the applications installed on both terminals 120 are clients of the same type of application of different control system platforms. The specific form of the client of the application program may also be different based on the difference of the terminal platforms, for example, the application program client may be a mobile phone client, a PC client, or a World Wide Web (Web) client.
Those skilled in the art will appreciate that the number of terminals 120 may be greater or lesser. Such as the above-mentioned terminals may be only one, or the above-mentioned terminals may be several tens or hundreds, or more. The number of terminals and the device type are not limited in the embodiment of the present application.
Optionally, the system may further comprise a management device (not shown in fig. 1), which is connected to the server cluster 140 via a communication network. Optionally, the communication network is a wired network or a wireless network.
Alternatively, the wireless network or wired network described above uses standard communication techniques and/or protocols. The network is typically the Internet, but may be any network including, but not limited to, a local area network (Local Area Network, LAN), metropolitan area network (Metropolitan Area Network, MAN), wide area network (Wide Area Network, WAN), mobile, wired or wireless network, private network, or any combination of virtual private networks. In some embodiments, data exchanged over a network is represented using techniques and/or formats including HyperText Mark-up Language (HTML), extensible markup Language (Extensible MarkupLanguage, XML), and the like. All or some of the links may also be encrypted using conventional encryption techniques such as secure sockets layer (Secure Socket Layer, SSL), transport layer security (Transport Layer Security, TLS), virtual private network (Virtual Private Network, VPN), internet protocol security (Internet ProtocolSecurity, IPsec), etc. In other embodiments, custom and/or dedicated data communication techniques may also be used in place of or in addition to the data communication techniques described above.
Next, each step in the display content updating method in the present exemplary embodiment will be described in more detail with reference to the drawings and examples.
Fig. 2 shows a flowchart of a display content updating method in an embodiment of the present disclosure. The methods provided by embodiments of the present disclosure may be performed by any electronic device having computing processing capabilities, such as, for example, terminal 120 and/or server cluster 140 in fig. 1. In the following illustration, the terminal 120 is exemplified as an execution subject.
As shown in fig. 2, the server cluster 140 performs a display content update method, including the steps of:
in step S202, it is detected whether target data satisfying the data request is stored in the cache device of the server.
Step S204, when detecting that the target data is not stored in the cache device, calling a service instance of the target data, and calculating the target data by the service instance based on a preset calculation frequency.
Step S206, storing the calculated target data in the cache device.
The timing calculation module is arranged in the server, the timing calculation module continuously calculates target data based on preset calculation frequency, and the obtained latest target data is updated into the cache device so as to be convenient to call.
Step S208, when receiving the data request of the target data sent by the monitoring device, the latest stored target data is called from the caching device.
Wherein when a data request of target data sent by the monitoring device is received, the latest target data is called in the cache device as a response operation of the data request,
step S210, the latest saved target data is sent to the monitoring device, so that the monitoring device updates the display content based on the target data.
The latest stored target data may be sent to the monitoring device only once, or may be sent to the monitoring device each time updated target data is obtained based on the calculation frequency.
In this embodiment, before receiving a data request of target data sent by a monitoring device, the server updates the target data based on a data update operation, and stores the updated target data in a cache device, so that when the data request is received, the stored latest saved target data is sent to the monitoring device, quick response to the data request of the monitoring device by the server is realized, and by using the cache device to prestore the latest saved target data, the sending operation of the target data is used as a direct response operation of the data request, thereby improving response efficiency of the server to the data request.
Further, based on the operation of pre-storing the latest stored target data, only the corresponding service instance needs to be called for executing the updating operation once for a group of target data, so that repeated calculation is reduced, and resource consumption of a server is reduced.
Still further, the setting of the timing calculation module enables the cache device to store only one group of newly stored target data at a certain moment, and even if deviation exists between time points of data requests sent by different monitoring devices, the probability of returning the same target data to different monitoring devices can be improved.
As shown in fig. 3, in one embodiment, further describing step S202 and step S204, includes:
in step S302, it is detected whether the target data is already stored in the cache device.
And when detecting that the target data is not stored in the cache device, calling a service instance of the target data to calculate the target data by the service instance based on the calculation frequency.
Specifically, the service instance includes a plurality of service instances, each service instance running a data model of target data, and when detecting that the target data is not stored in the cache device, invoking the service instance of the target data to calculate an implementation of the target data by the service instance based on a calculation frequency, including:
Step S304, when detecting that the target data is not stored in the cache device, the service instances execute the preemption operation of the computing resource, and determine the service instance preempted to the computing resource based on the result of the preemption operation, and record the service instance as a first service instance.
Specifically, the multiple service instances perform a preemption operation of the computing resource, and determine a specific implementation of the service instance preempting the computing resource based on a result of the preemption operation, including: writing a resource request identifier into the cache equipment by the plurality of service instances; a service instance that was successfully written is determined to be the first service instance.
When the service program is provided with a plurality of service instances, the service program is used for supporting, and each service instance is provided with a timing calculation module and ensures that the timing frequency is consistent.
Based on the preemption operation of the computing resource, when a plurality of service instances exist, only one service instance can execute the computing operation in the computing period corresponding to the same computing frequency, so that the response frequency of the data request is ensured.
Step S306, the first service example is called to calculate corresponding target data based on the calculation frequency.
In step S308, the service instance that does not rob to the computing resource is recorded as a second service instance, and when the first service instance completes the computation of the corresponding target data, the second service instance is notified based on the MQ message queue, so that the second service instance computes the corresponding target data based on the computation frequency.
Specifically, the process of updating the target data may be described as that the timing calculation module acquires the target data from the cache device, if the target data is not successfully acquired, the preemption operation of the computing resource is performed, the service instance computing data of the computing resource is preempted and updated to the cache device, and if the computing resource is not preempted, the first service instance computing result is waited for to execute the update operation of the target data.
In addition, for a second service instance that is not robbed to computing resources, an MQ notification mechanism is introduced. After the calculation of the first service instance is completed, the second service instance is informed through the MQ message, and the second service instance immediately executes the update operation after receiving the MQ message, so that the thread blocking is reduced.
In step S310, when it is detected that the target data is stored in the cache device, the target data is directly invoked when a data request is received.
In this embodiment, under the working condition with multiple service instances, if the computing operation of the target data is not completed, the first service instance that performs the updating operation earlier and the second service instance that performs the updating operation later may be determined by preempting resources, so as to ensure the updating efficiency.
Further, by introducing the MQ message mechanism, the update efficiency of the second service instance is improved.
In one embodiment, a cache device of a server includes a remote cache module communicatively coupled to the server and/or a memory module of the server.
The memory module is used for caching the stored target data, and receiving the data request in one calculation period, so that consistency of the returned target data can be ensured, and response efficiency can be improved.
The remote cache module is used for caching the stored target data, and only needs to execute data calculation once in the same calculation period to avoid repeated calculation, and in addition, the remote cache module can also be realized in distributed resource preemption, namely a plurality of servers send resource request identifiers to the remote cache module, and the successful writing is determined as successful resource preemption.
In one embodiment, the service instance includes a plurality of service instances, each service instance runs a data model of matched target data, when detecting that the target data is not stored in the cache device, the service instance of the target data is called, and calculating the target data by the service instance based on a preset calculation frequency includes: and when detecting that the target data is not stored in the cache equipment, calling a corresponding service instance to calculate the target data based on the time sequence of the imported data model.
In this embodiment, the sequence of the target data corresponding to the calculation resource calculation called by the service instance can be determined according to the time sequence of the data model imported to the server, so that only one service instance is ensured to calculate in one calculation period.
As shown in fig. 4, the terminal 120 performs a display content update method including the steps of:
step S402, a data request of the target data is sent to the server.
In step S404, the receiving server retrieves the latest saved target data from the caching device based on the data request.
Step S406, the display content is updated based on the target data.
The target data returned based on the data request can be target data which are stored once or continuously, and real-time dynamic update of the display content can be realized based on the continuously stored target data.
In this embodiment, after the monitoring device sends the data request of the target data, the target data sent by the server is received and is the latest stored target data pre-stored in the cache device, which is beneficial to improving the response efficiency of the server to the data request.
In one embodiment, sending a data request for target data to a server includes: transmitting a data request to a server based on a polling mechanism; or send a data request to the server based on an http2 multiplexing mechanism.
In this embodiment, a polling data module and an interface presentation module may be respectively provided in the monitoring device, and a data request is sent to the server based on the polling data module.
In addition, an http2 multiplexing mechanism can be adopted, so that resource consumption caused by frequently creating threads can be reduced.
As shown in fig. 5, the monitoring devices include a first monitoring device 502, an nth monitoring device 504, and the like, and the monitoring devices are in communication connection with a server 506, where the server 506 includes a data acquisition module 506A and a timing calculation module 506C in addition to a memory module 506B, and the data acquisition module is configured to respond to a data request of the monitoring device, and read the latest stored target data pre-stored in the memory module 506B.
The database 510 is used to store raw data or intermediate data of actual traffic.
Before receiving the data request sent by the monitoring device, if it is detected that the updated target data is not stored in the memory module 506B and/or the remote cache module 508, the timing calculation module 506C is triggered to perform an update operation, and the updated target data is stored in the memory module 506B and/or the remote cache module 508, so that when the data request is received, the updated target device is directly sent to the monitoring device.
In addition, different monitoring devices can correspond to different service instances in the server, and when data requests sent by the different monitoring devices are received, the computing operation is ensured to be executed by only one service instance in one computing period through executing the resource preemption operation.
As shown in fig. 6, a display content update scheme according to one embodiment of the present disclosure includes a first monitoring device 602A and a second monitoring device 602B, a server having a first service instance 604A, a second service instance 604B, and a third service instance 604C loaded thereon, the server being communicatively coupled to a remote caching module 606.
The interaction process of the first service instance 604A includes:
step S602, applying for obtaining target data.
In step S604, the acquisition of the target data fails.
Step S606, preempting the computing resources.
In step S608, the preemption of the computing resources is successful.
In step S610, the target data in the present period is calculated.
Step S612, storing the updated target data in the remote cache module.
In step S614, the updated target data is stored in the memory.
The interaction process of the second service instance 604B includes:
step S602, applying for obtaining target data.
In step S604, the acquisition of the target data fails.
Step S606, preempting the computing resources.
In step S616, the resource preemption fails, and after the first service instance 604A finishes the calculation, the calculation operation is performed.
The interaction process of the third service instance 604C includes:
step S602, applying for obtaining target data.
Step S618, the acquisition of the target data is successful.
In step S614, the updated target data is stored in the memory.
The interaction process between the first monitoring device 602A and the second monitoring device 602B and the server includes:
in step S620, target data is requested.
Step S622, the target data is returned.
It is noted that the above-described figures are only schematic illustrations of processes involved in a method according to an exemplary embodiment of the invention, and are not intended to be limiting. It will be readily appreciated that the processes shown in the above figures do not indicate or limit the temporal order of these processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, for example, among a plurality of modules.
Those skilled in the art will appreciate that the various aspects of the invention may be implemented as a system, method, or program product. Accordingly, aspects of the invention may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may be referred to herein as a "circuit," module "or" system.
A display content updating apparatus 700 according to this embodiment of the present invention is described below with reference to fig. 7. The display content updating apparatus 700 shown in fig. 7 is merely an example, and should not impose any limitation on the functions and the scope of use of the embodiment of the present invention.
The display content updating apparatus 700 is expressed in the form of a hardware module. The components of display content updating apparatus 700 may include, but are not limited to: a detection module 702, configured to detect whether target data satisfying a data request is stored in a cache device of a server; a calling module 704, configured to, when detecting that the target data is not stored in the cache device, call a service instance of the target data, and calculate the target data by the service instance based on a preset calculation frequency; a storage module 706, configured to store the calculated target data in a cache device; a retrieving module 708, configured to, when receiving a data request of the target data sent by the monitoring device, retrieve the latest saved target data from the cache device; and a sending module 710, configured to send the latest saved target data to the monitoring device, so that the monitoring device updates the display content based on the target data.
In one embodiment, the service instance includes a plurality of service instances, each running a data model of matching target data, the calling module 704 is further configured to: executing preemption operation of the computing resource by the plurality of service instances, and determining the service instance preempted to the computing resource as a first service instance; and calling the first service example to calculate corresponding target data based on the calculation frequency.
In one embodiment, the calling module 704 is further configured to: writing a resource request identifier into the cache equipment by the plurality of service instances; a service instance that was successfully written is determined to be the first service instance.
In one embodiment, further comprising: and a notification module 712, configured to determine a service instance that does not rob to the computing resource as a second service instance, and notify the second service instance based on the MQ message queue when the first service instance completes the computation of the corresponding target data, so that the second service instance computes the corresponding target data based on the computation frequency.
In one embodiment, the calling module 704 is further configured to: and when detecting that the target data is not stored in the cache equipment, calling a corresponding service instance to calculate the target data based on the time sequence of the imported data model.
In one embodiment, further comprising: a receiving module 714 configured to: the receiving monitoring device sends a data request based on a polling mechanism and/or an http2 multiplexing mechanism to send matched target data based on the data request. An electronic device 800 according to such an embodiment of the invention is described below with reference to fig. 8. Including the terminals and servers described in this disclosure, the electronic device 800 shown in fig. 8 is merely an example, and should not be construed as limiting the functionality and scope of use of embodiments of the present invention.
As shown in fig. 8, the electronic device 800 is embodied in the form of a general purpose computing device. Components of electronic device 800 may include, but are not limited to: the at least one processing unit 810, the at least one memory unit 820, and a bus 830 connecting the various system components, including the memory unit 820 and the processing unit 810.
Wherein the storage unit stores program code that is executable by the processing unit 810 such that the processing unit 810 performs steps according to various exemplary embodiments of the present invention described in the above section of the "exemplary method" of the present specification. For example, the processing unit 810 may perform steps S202 to S210 as shown in fig. 2, and other steps defined in the display content updating method of the present disclosure.
The storage unit 820 may include readable media in the form of volatile storage units, such as Random Access Memory (RAM) 8201 and/or cache memory 8202, and may further include Read Only Memory (ROM) 8203.
Storage unit 820 may also include a program/utility 8204 having a set (at least one) of program modules 8205, such program modules 8205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
Bus 830 may be one or more of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 800 may also communicate with one or more external devices 860 (e.g., keyboard, pointing device, bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device, and/or any device (e.g., router, modem, etc.) that enables the electronic device 800 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 840. Also, electronic device 800 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet, through network adapter 850. As shown, network adapter 850 communicates with other modules of electronic device 800 via bus 830. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with an electronic device, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, including several instructions to cause a computing device (may be a personal computer, a server, a terminal device, or a network device, etc.) to perform the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present disclosure, a computer-readable storage medium having stored thereon a program product capable of implementing the method described above in the present specification is also provided. In some possible embodiments, the aspects of the invention may also be implemented in the form of a program product comprising program code for causing a terminal device to carry out the steps according to the various exemplary embodiments of the invention as described in the "exemplary method" section of this specification, when the program product is run on the terminal device.
A program product for implementing the above-described method according to an embodiment of the present invention may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The computer readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
It should be noted that although in the above detailed description several modules or units of a device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit in accordance with embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
Furthermore, although the steps of the methods in the present disclosure are depicted in a particular order in the drawings, this does not require or imply that the steps must be performed in that particular order or that all illustrated steps be performed in order to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step to perform, and/or one step decomposed into multiple steps to perform, etc.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, including several instructions to cause a computing device (may be a personal computer, a server, a mobile terminal, or a network device, etc.) to perform the method according to the embodiments of the present disclosure.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any adaptations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (10)

1. A display content updating method applied to a server, the server being in communication connection with a monitoring device, comprising:
detecting whether target data meeting a data request is stored in cache equipment of a server or not;
when the fact that the target data are not stored in the cache equipment is detected, a service instance of the target data is called, the service instance calculates the target data based on preset calculation frequency, and only one service instance executes calculation operation in a calculation period corresponding to the same calculation frequency;
storing the calculated target data in the cache device, wherein a timing calculation module is arranged in the server and is used for continuously calculating the target data based on the calculation frequency and updating the obtained latest target data into the cache device;
when the data request sent by the monitoring equipment is received, the latest stored target data is called from the cache equipment;
and sending the latest saved target data to the monitoring equipment so as to update the display content based on the target data by the monitoring equipment.
2. The display content updating method according to claim 1, wherein the service instance includes a plurality of service instances, each of the service instances running a matched data model of the target data, the calling the service instance of the target data when the target data is detected not to be stored in the cache device, and calculating the target data by the service instance based on a preset calculation frequency includes:
when the fact that the target data are not stored in the cache equipment is detected, a plurality of service instances execute preemption operation of computing resources, and the service instance preempted to the computing resources is determined to be a first service instance;
and calling the first service example to calculate the corresponding target data based on the calculation frequency.
3. The display content updating method according to claim 2, wherein the plurality of the service instances perform a preemption operation of a computing resource, and wherein determining the service instance preempted to the computing resource as a first service instance comprises:
writing a resource request identifier to the cache equipment by a plurality of service instances;
and determining the service instance successfully written as the first service instance.
4. The display content updating method according to claim 2, characterized by further comprising:
and determining the service instance which does not rob the computing resource as a second service instance, and notifying the second service instance based on an MQ message queue when the first service instance completes the computation of the corresponding target data so as to compute the corresponding target data based on the computation frequency by the second service instance.
5. The display content updating method according to claim 1, wherein the service instance includes a plurality of service instances, each of the service instances running a matched data model of the target data, the calling the service instance of the target data when the target data is detected not to be stored in the cache device, and calculating the target data by the service instance based on a preset calculation frequency includes:
and when the fact that the target data are not stored in the cache equipment is detected, calling the corresponding service instance to calculate the target data based on the time sequence of importing the data model.
6. The display content updating method according to any one of claims 1 to 5, characterized by further comprising:
And receiving the data request sent by the monitoring equipment based on a polling mechanism and/or an http2 multiplexing mechanism so as to send the matched target data based on the data request.
7. The method for updating display content according to any one of claims 1 to 5, wherein,
the cache device of the server comprises a remote cache module and/or a memory module of the server, wherein the remote cache module and/or the memory module are in communication connection with the server, so that the remote cache module and/or the memory module respond to the data request.
8. A display content updating apparatus applied to a server in communication with a monitoring device, comprising:
the detection module is used for detecting whether target data meeting the data request is stored in the cache equipment of the server or not;
the calling module is used for calling a service instance of the target data when the fact that the target data is not stored in the cache equipment is detected, and calculating the target data by the service instance based on a preset calculation frequency, wherein only one service instance executes calculation operation in a calculation period corresponding to the same calculation frequency;
the storage module is used for storing the calculated target data in the cache equipment, wherein a timing calculation module is arranged in the server and is used for continuously calculating the target data based on the calculation frequency and updating the obtained latest target data into the cache equipment;
The retrieving module is used for retrieving the latest stored target data from the cache device when receiving the data request of the target data sent by the monitoring device;
and the sending module is used for sending the latest stored target data to the monitoring equipment so as to update the display content based on the target data by the monitoring equipment.
9. A server, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the display content updating method of any of claims 1-7 via execution of the executable instructions.
10. A computer-readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the display content updating method of any one of claims 1 to 7.
CN202110276286.6A 2021-03-15 2021-03-15 Display content updating method, device, terminal, server and storage medium Active CN113010131B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110276286.6A CN113010131B (en) 2021-03-15 2021-03-15 Display content updating method, device, terminal, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110276286.6A CN113010131B (en) 2021-03-15 2021-03-15 Display content updating method, device, terminal, server and storage medium

Publications (2)

Publication Number Publication Date
CN113010131A CN113010131A (en) 2021-06-22
CN113010131B true CN113010131B (en) 2024-04-05

Family

ID=76407217

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110276286.6A Active CN113010131B (en) 2021-03-15 2021-03-15 Display content updating method, device, terminal, server and storage medium

Country Status (1)

Country Link
CN (1) CN113010131B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114268558B (en) * 2021-12-22 2023-06-06 建信金融科技有限责任公司 Method, device, equipment and medium for generating monitoring graph
CN114610785A (en) * 2022-01-24 2022-06-10 北京声智科技有限公司 Data processing method and device and electronic equipment
CN114979289B (en) * 2022-05-19 2024-03-19 北京达佳互联信息技术有限公司 Data distribution method, apparatus, system, device, medium and program product
CN115002527B (en) * 2022-05-30 2024-05-07 平安科技(深圳)有限公司 Data transmission optimization method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8271889B1 (en) * 2007-11-26 2012-09-18 Adobe Systems Incorporated Automatically updated user interfaces for a mobile device
CN102934081A (en) * 2010-04-13 2013-02-13 Et国际有限公司 Runspace method, system and apparatus
CN105100051A (en) * 2015-05-29 2015-11-25 北京京东尚科信息技术有限公司 Method and system for realizing data resource access right control
CN109542645A (en) * 2018-11-20 2019-03-29 北京锐安科技有限公司 A kind of method, apparatus, electronic equipment and storage medium calling service
US10809956B1 (en) * 2016-11-17 2020-10-20 Pinterest, Inc. Supplemental content items

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8271889B1 (en) * 2007-11-26 2012-09-18 Adobe Systems Incorporated Automatically updated user interfaces for a mobile device
CN102934081A (en) * 2010-04-13 2013-02-13 Et国际有限公司 Runspace method, system and apparatus
CN105100051A (en) * 2015-05-29 2015-11-25 北京京东尚科信息技术有限公司 Method and system for realizing data resource access right control
US10809956B1 (en) * 2016-11-17 2020-10-20 Pinterest, Inc. Supplemental content items
CN109542645A (en) * 2018-11-20 2019-03-29 北京锐安科技有限公司 A kind of method, apparatus, electronic equipment and storage medium calling service

Also Published As

Publication number Publication date
CN113010131A (en) 2021-06-22

Similar Documents

Publication Publication Date Title
CN113010131B (en) Display content updating method, device, terminal, server and storage medium
US7673029B2 (en) Grid automation bus to integrate management frameworks for dynamic grid management
CN110825479A (en) Page processing method and device, terminal equipment, server and storage medium
EP4207688A1 (en) Asynchronous bookkeeping method and apparatus for blockchain, medium, and electronic device
CN112882709A (en) Rendering method, device and equipment based on container engine system and storage medium
CN113761412A (en) Application page display method and device, electronic equipment, medium and application system
US20130124971A1 (en) Real time web script refresh using asynchronous polling without full web page reload
CN111917661B (en) Data transmission method, device, electronic equipment and computer readable storage medium
CN114221995A (en) Service calling method and device and electronic equipment
CN111338834B (en) Data storage method and device
CN115277657B (en) Method and equipment for operating and maintaining database protocol
CN111274104B (en) Data processing method, device, electronic equipment and computer readable storage medium
CN112394907A (en) Container-based delivery system construction method, application delivery method and delivery system
CN112202605A (en) Service configuration method, device, equipment and storage medium
CN113472638B (en) Edge gateway control method, system, device, electronic equipment and storage medium
US20170302764A1 (en) Unifying realtime and static data for presenting over a web service
CN113810264B (en) Information transmission method, device, electronic equipment and storage medium
CN115328609A (en) Cloud desktop data processing method and system
CN116032867A (en) Session processing method and device, electronic equipment and storage medium
CN110061907B (en) Method and equipment for drawing resources and distributing resources
CN113835816A (en) Virtual machine desktop display method, device, equipment and readable storage medium
CN113761051A (en) Message pushing method, data acquisition method, device, system, equipment and medium
US20240152504A1 (en) Data interaction method, apparatus, and electronic device
CN113452670B (en) Phishing blocking method, device, equipment and medium based on SDN network
CN114513548B (en) Directional call information processing method and device

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
CB02 Change of applicant information

Address after: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant after: Jingdong Technology Holding Co.,Ltd.

Address before: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant before: Jingdong Digital Technology Holding Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant