CN114647656A - Method, device and equipment for updating data and storage medium - Google Patents

Method, device and equipment for updating data and storage medium Download PDF

Info

Publication number
CN114647656A
CN114647656A CN202210306830.1A CN202210306830A CN114647656A CN 114647656 A CN114647656 A CN 114647656A CN 202210306830 A CN202210306830 A CN 202210306830A CN 114647656 A CN114647656 A CN 114647656A
Authority
CN
China
Prior art keywords
data
service
identifier
updating
target service
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
CN202210306830.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.)
Qingdao Juhaolian Technology Co ltd
Original Assignee
Qingdao Juhaolian Technology 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 Qingdao Juhaolian Technology Co ltd filed Critical Qingdao Juhaolian Technology Co ltd
Priority to CN202210306830.1A priority Critical patent/CN114647656A/en
Publication of CN114647656A publication Critical patent/CN114647656A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • 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/2457Query processing with adaptation to user needs
    • G06F16/24578Query processing with adaptation to user needs using ranking
    • 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/248Presentation of query results
    • 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/25Integrating or interfacing systems involving database management systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The present application relates to the field of data processing technologies, and in particular, to a method, an apparatus, a device, and a storage medium for updating data. The method is used for solving the problem that the real-time performance of the display data is low due to large-data-volume transmission, and comprises the following steps: determining each data updating message according with the current available concurrent thread number based on the data identification of the data updating message in the data updating message queue, wherein each data updating message comprises a service identification and a data identification, each service identification corresponds to at least one display area, and the data identification represents the data updating priority of corresponding target service data in all target service data of the service identification; then, target service data corresponding to each data updating message is obtained by calling at least one query interface, and after the target service data is obtained through any query interface, data displayed in a display area corresponding to the service identification is updated based on the target service data; in this way, the real-time performance of the presented data can be improved.

Description

Method, device and equipment for updating data and storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a method, an apparatus, a device, and a storage medium for updating data.
Background
By means of continuous maturity of technologies such as the internet of things and big data, the smart fields such as smart communities, smart streets and smart cities are rapidly developed, and accordingly, the display requirements and interaction requirements for monitoring large screens become more and more complex.
In the prior art, a monitoring large screen usually establishes a long connection channel for data query with a server when first querying, and interacts with the server through the long connection channel to obtain all data to be displayed, so that all the data to be displayed are displayed in a partitioned manner in the monitoring large screen. Correspondingly, after determining that the original data change exists, the server sends the changed original data to the large monitoring screen in a timed or real-time mode, so that the large monitoring screen updates the displayed data of the corresponding display area based on the changed original data pushed by the server, and real-time updating of the sub-service type of the front-end display data is achieved.
However, in the prior art, the service data transmission between the large monitoring screen and the server is realized through the long connection channels, but because the communication capacity of each long connection channel is limited by data bearing, generally, the maximum data bearing capacity of each long connection channel is 1M, when the server determines that the data volume needing to be pushed to the large monitoring screen exceeds the maximum communication capacity and needs to be pushed through the long connection channels at the same time, a large amount of data simultaneously rush into the long connection channels, so that the instantaneous concurrency rate is increased, and the problem of data blocking occurs, thus the large monitoring screen cannot timely receive changed original data, and the real-time performance of the data displayed by the large monitoring screen is reduced.
Disclosure of Invention
The embodiment of the application provides a method, a device, equipment and a storage medium for updating data, which are used for solving the problem that the real-time performance of monitoring large-screen display data is low due to data blockage caused when a large amount of data simultaneously rush into a transmission channel.
The embodiment of the application provides the following specific technical scheme:
in a first aspect, an embodiment of the present application provides a method for updating data, which is applied to a display device, and the method includes:
receiving data updating messages pushed by a server, and adding the data updating messages into a data updating message queue, wherein each data updating message comprises a service identifier and a data identifier, each service identifier corresponds to at least one display area in the display equipment, the data identifier is a data identifier of target service data corresponding to the data updating message, and the data identifier represents data updating priorities of the corresponding target service data in all target service data corresponding to the service identifiers;
determining each data updating message according with the current available concurrent thread number based on the data identification corresponding to the data updating message in the data updating message queue;
based on the determined data updating messages, sending data acquisition requests corresponding to the data updating messages by calling at least one query interface, wherein each data acquisition request comprises a service identifier and a data identifier corresponding to the data updating message, and the service identifiers corresponding to different query interfaces are different;
and after target service data sent by the server is acquired through any one of the query interfaces, updating data displayed in a display area corresponding to the service identifier based on the target service data.
According to the method, due to the fact that the types of data to be displayed in the existing display equipment are numerous, in the embodiment of the application, the target business data are subjected to business subdivision, the display areas correspond to the business identifications, and the business characteristics of the display areas in the display equipment are enhanced; further, the traditional method for transmitting the target service data through the long connecting channel between the display equipment and the server is converted into the method for transmitting the data updating message through the long connecting channel; the target service data is pushed by the server, the inquiry interface is called by the display equipment, and the corresponding target service data is actively acquired from the server, so that the transmission pressure of the long connecting channel for transmitting the target service data is reduced, the target service data can be acquired from the server in a targeted manner according to the data updating priority (namely, the data identifier included in the corresponding data updating message) of all the target service data in the corresponding service identifier, and the real-time performance and the strong service relevance of the data displayed in each display area in the display equipment are improved.
Optionally, before receiving the data update message pushed by the server, the method further includes:
responding to the login operation of a user, and determining a query interface corresponding to each service identifier based on the service identifier corresponding to each display area in the display equipment;
acquiring to-be-displayed service data corresponding to each service identifier in the server by calling a query interface corresponding to each service identifier;
and displaying each service data to be displayed acquired through each query interface in a display area corresponding to the service identifier.
According to the method, the corresponding query interfaces are called, and the business data to be displayed in each display area in the display equipment is sequentially acquired from the server, so that the data transmission load of the long connecting channel is reduced, the data transmission data can be improved, and the first-round display efficiency of the display equipment is improved.
Optionally, the determining, based on the data identifier corresponding to the data update message in the data update message queue, each data update message that conforms to the current available number of concurrent threads includes:
determining a first total number of data updating messages in the data updating message queue, and judging whether the first total number is greater than the current available concurrent thread number;
after the first total number is determined to be larger than the current available concurrent thread number, traversing each data updating message in the data updating message queue, and sequentially selecting each data updating message corresponding to each service identifier with the same data updating priority according to the sequence of the data updating priority from high to low until the second total number of the selected data updating messages reaches the current available concurrent thread number;
and selecting the data updating messages corresponding to different service identifications with the same data updating priority according to the receiving time sequence of the corresponding data updating messages.
According to the method, the data identification represents the data updating priority of all the target service data of each target service data in the corresponding service identification, so that the display equipment can clearly know the data updating priority of the target service data corresponding to each data updating message through the data identification, the current available number of concurrent threads is determined in time by judging the actual situation of the concurrent threads in the current display equipment, then the corresponding data updating messages are sequentially selected from the data updating message queue according to the sequence of the data updating priorities from top to bottom, the corresponding query interfaces are called, and the corresponding target service data are obtained from the server in parallel, so that the real-time performance of the data displayed in the display area is realized. Optionally, the current available number of concurrent threads is determined by performing the following operations:
judging whether the current concurrent thread number reaches a concurrent thread threshold value;
and when the current concurrent thread number does not reach the concurrent thread threshold value, determining the difference value between the concurrent thread threshold value and the current concurrent thread number as the current available concurrent thread number.
According to the method, the display equipment can determine the number of the data updating messages which can be acquired in real time according to the actual situation of the current concurrent thread, so that the display equipment actively acquires the data updating messages from the server, and the real-time performance of the data displayed in the display area is realized.
Optionally, after receiving the data update message pushed by the server, the method further includes:
if the data updating priority of the target service data corresponding to the data identification is determined to be special processing based on the data identification included in the data updating message, the target service data corresponding to the data updating message is acquired by calling a query interface corresponding to the service identification included in the data updating message preferentially;
and after the target service data is acquired through the query interface, updating the data displayed in the display area corresponding to the service identifier based on the target service data.
According to the method, the data updating priority of special processing is set for the special target service data, so that after the display equipment receives the data updating message which is pushed by the server through the long connecting channel and is specially processed, the display equipment can timely acquire the target service data corresponding to the data updating message from the server by calling the query interface corresponding to the service identifier included in the data updating message at the first time, and therefore the acquired target service data are timely displayed in the display area corresponding to the service identifier, and the real-time performance of the data displayed in the display area in the display equipment is improved.
In a second aspect, an embodiment of the present application provides a method for updating data, where the method is applied to a server, and the method includes:
after generating a new data update message, sending the data update message to a display device, where the data update message includes service identifiers and data identifiers, each service identifier corresponds to at least one display area in the display device, the data identifier is a data identifier of target service data corresponding to the data update message, and the data identifier represents data update priorities of the corresponding target service data in all target service data corresponding to the service identifiers; the display equipment calls a query interface corresponding to the service identifier included in the data updating message, and target service data corresponding to the data updating message is acquired from a server;
after receiving a data acquisition request sent by the display device through the query interface, querying corresponding target service data based on the data acquisition request, wherein service identifications corresponding to different query interfaces are different;
and sending the inquired target service data to the display equipment through the inquiry interface, so that the display equipment updates the data displayed in the display area of the service identifier based on the target service data after acquiring the target service data sent by the server through the inquiry interface.
Optionally, each data update message is generated by performing the following steps:
after receiving original data collected by connected data collection equipment, analyzing the original data to generate target service data corresponding to a service identifier associated with the original data;
determining a data identifier corresponding to the target service data based on the target service data and a data updating priority configuration rule corresponding to the service identifier;
and generating a data updating message corresponding to the target service data based on the service identifier and the data identifier.
In a third aspect, an embodiment of the present application provides an apparatus for updating data, where the apparatus is applied to a display device, and the apparatus includes:
the receiving module is used for receiving data updating messages pushed by a server and adding the data updating messages into a data updating message queue, wherein each data updating message comprises a service identifier and a data identifier, each service identifier corresponds to at least one display area in the display equipment, the data identifier is a data identifier of target service data corresponding to the data updating message, and the data identifier represents the data updating priority of the corresponding target service data in all target service data corresponding to the service identifier;
the determining module is used for determining each data updating message which accords with the current available concurrent thread number based on the data identification corresponding to the data updating message in the data updating message queue;
the calling module is used for sending data acquisition requests corresponding to the data updating messages by calling at least one query interface based on the determined data updating messages, wherein each data acquisition request comprises a service identifier and a data identifier corresponding to the data updating message, and the service identifiers corresponding to different query interfaces are different;
and the updating module is used for updating the data displayed in the display area corresponding to the service identifier based on the target service data after the target service data sent by the server is obtained through any one of the query interfaces.
Optionally, before receiving the data update message pushed by the server, the receiving module is further configured to:
responding to the login operation of a user, and determining a query interface corresponding to each service identification based on the service identification corresponding to each display area in the display equipment;
acquiring to-be-displayed service data corresponding to each service identifier in the server by calling a query interface corresponding to each service identifier;
and displaying each service data to be displayed acquired through each query interface in a display area corresponding to the service identifier.
Optionally, the determining module is configured to determine, based on the data identifier corresponding to the data update message in the data update message queue, each data update message that conforms to the current available number of concurrent threads, and is configured to:
determining a first total number of data updating messages in the data updating message queue, and judging whether the first total number is greater than the current available concurrent thread number;
after the first total number is determined to be larger than the current available concurrent thread number, traversing each data updating message in the data updating message queue, and sequentially selecting each data updating message corresponding to each service identifier with the same data updating priority according to the sequence of the data updating priority from high to low until the second total number of the selected data updating messages reaches the current available concurrent thread number;
and selecting the data updating messages corresponding to different service identifications with the same data updating priority according to the receiving time sequence of the corresponding data updating messages.
Optionally, the current available number of concurrent threads is determined by performing the following operations:
judging whether the current concurrent thread number reaches a concurrent thread threshold value;
and when the current concurrent thread number does not reach the concurrent thread threshold, determining the difference value between the concurrent thread threshold and the current concurrent thread number as the current available concurrent thread number.
Optionally, after receiving the data update message pushed by the server, the determining module is further configured to:
if the data updating priority of the target service data corresponding to the data identification is determined to be special processing based on the data identification included in the data updating message, preferentially calling a query interface corresponding to the service identification included in the data updating message to acquire the target service data corresponding to the data updating message;
and after the target service data is acquired through the query interface, updating the data displayed in the display area corresponding to the service identifier based on the target service data.
In a fourth aspect, an embodiment of the present application provides an apparatus for updating data, where the apparatus is applied in a server, and the apparatus includes:
the data updating method comprises the steps that a first sending module is used for sending a new data updating message to display equipment after the new data updating message is generated, wherein the data updating message comprises service identifications and data identifications, each service identification corresponds to at least one display area in the display equipment, the data identifications are data identifications of target service data corresponding to the data updating message, and the data identifications represent data updating priorities of the corresponding target service data in all target service data corresponding to the service identifications; the display equipment calls a query interface corresponding to the service identifier included in the data updating message, and target service data corresponding to the data updating message is acquired from a server;
the query module is used for querying corresponding target service data based on the data acquisition request after receiving the data acquisition request sent by the display equipment through the query interface, wherein service identifications corresponding to different query interfaces are different;
and the second sending module is used for sending the inquired target service data to the display equipment through the inquiry interface so that the display equipment updates the data displayed in the display area of the service identifier based on the target service data after acquiring the target service data sent by the server through the inquiry interface.
Optionally, each data update message is generated by performing the following steps:
after receiving original data collected by connected data collection equipment, analyzing the original data to generate target service data corresponding to a service identifier associated with the original data;
determining a data identifier corresponding to the target service data based on the target service data and a data updating priority configuration rule corresponding to the service identifier;
and generating a data updating message corresponding to the target service data based on the service identifier and the data identifier.
In a fifth aspect, an embodiment of the present application provides an electronic device, including:
a memory for storing a computer program executable by the controller;
a controller is connected to the memory and configured to perform the method of any one of the above first aspects.
In a sixth aspect, an embodiment of the present application provides a server, including:
a memory for storing a computer program executable by the controller;
a controller is coupled to the memory and configured to perform the method of any of the second aspects described above.
In a seventh aspect, this application provides a computer-readable storage medium, and when executed by a processor, enables the processor to perform the method of any one of the first or second aspects.
In addition, for technical effects brought by any one implementation manner of the second aspect to the seventh aspect, reference may be made to technical effects brought by different implementation manners of the first aspect, and details are not described here.
Drawings
FIG. 1 is a schematic diagram of a related art application scenario;
FIG. 2 is a schematic diagram of an application scenario in an embodiment of the present application;
fig. 3 is a schematic diagram illustrating that a user acquires first-round displayed data of a display area after logging in an embodiment of the application;
FIG. 4 is a schematic diagram illustrating an interaction flow of a method for updating data according to an embodiment of the present application;
FIG. 5 is a schematic flow chart illustrating a process of generating a data update message according to an embodiment of the present application;
FIG. 6 is a schematic flow chart illustrating a process of determining data update messages of a currently available number of concurrent threads according to an embodiment of the present application;
FIG. 7 is a block diagram illustrating a logic structure of an apparatus for updating data according to an embodiment of the present application;
FIG. 8 is a schematic diagram illustrating a logic architecture of an apparatus for updating data according to an embodiment of the present application;
FIG. 9 is a block diagram of an electronic device according to an embodiment of the present disclosure;
fig. 10 is a schematic physical architecture diagram of a server in the embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," "third," and the like in the description and claims of this application and in the foregoing drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein.
In order to solve the problem that data blockage is caused when a large amount of data simultaneously flow into a transmission channel, and further real-time performance of monitoring large-screen display data is low, in the embodiment of the application, received data updating messages pushed by a server are added into a data updating message queue, and each data updating message which accords with the current available concurrent thread number is determined based on a data identifier corresponding to the data updating messages in the data updating message queue, wherein each data updating message comprises a service identifier and a data identifier, each service identifier corresponds to at least one display area in display equipment, the data identifier is a data identifier of target service data corresponding to the data updating messages, and the data identifier represents data updating priorities of the corresponding target service data in all target service data corresponding to the service identifiers; then, based on each determined data updating message, acquiring target service data corresponding to each data updating message by calling at least one query interface, and after acquiring the target service data sent by the server through any query interface, updating data displayed in a display area corresponding to the service identifier based on the target service data; therefore, the target service data of each data updating message can be acquired in time by calling the corresponding query interface, so that the real-time performance of the data displayed by the display equipment is improved.
Fig. 1 shows a schematic diagram of an application scenario of the prior art. Referring to fig. 1, the application scenario includes a display device 100, a server 200, and a data acquisition device 201, where the data acquisition device 201 is connected to the server 200, and the data acquisition device 201 and the server 200 may be wirelessly connected or wired connected to each other, and configured to send original data acquired by the data acquisition device 201 to the server 200; a long connection channel is established between the display device 100 and the server 200, and is used for pushing the original data to the display device 100 through the long connection channel after the server 200 receives the original data collected by the connected data collection device 201.
Fig. 2 shows a schematic application scenario of the embodiment of the present application. Referring to fig. 2, the application scenario still includes the presentation apparatus 100, the server 200 and the data acquisition apparatus 201. In the embodiment of the present application, a long connection channel is established between the display device 100 and the server 200.
Referring to fig. 2, in the embodiment of the present application, the display apparatus 100 includes a front-end message channel maintenance module, a message monitoring and routing module, and a front-end service module, wherein,
the front-end message channel maintenance module is used for establishing a long connection channel with the server 200 after a user logs in, and maintaining the stability of the long connection channel in a heartbeat message mode after the long connection channel is established; the data monitoring and routing module is further configured to push the data update message to the message monitoring and routing module in real time after receiving the data update message sent by the server 200;
the message monitoring and routing module is used for receiving the monitoring message registration of the front-end service module; after receiving the data updating message sent by the front-end message channel maintenance module, routing the data updating message to the corresponding front-end service module in real time according to the registration content of the pre-monitored message;
the front-end service module is used for receiving the data updating message routed by the message monitoring and routing module, calling a corresponding query interface according to the data updating message, and sending a data acquisition request for acquiring target service data corresponding to the data updating message to the server 200; the service identifier update module is further configured to update data displayed in the display area corresponding to the service identifier based on the target service data after receiving the target service data sent by the server 200 through the query interface;
in this embodiment of the application, the data update message includes service identifiers and data identifiers, each service identifier corresponds to at least one display area in the display device, the data identifier is a data identifier of target service data corresponding to the data update message, the data identifier represents a data update priority of the corresponding target service data in all target service data corresponding to the service identifier, each data acquisition request includes the service identifier and the data identifier corresponding to the data update message, and the service identifiers corresponding to different query interfaces are different.
Referring to fig. 2, in the embodiment of the present application, the server 200 includes a raw data receiving and analyzing module, a back-end service module and a back-end message channel maintaining module, wherein,
the original data receiving and analyzing module is used for analyzing the original data after receiving the original data acquired by the connected data acquisition equipment to generate target service data corresponding to each service identifier associated with the original data;
the back-end service module is used for generating a data updating message corresponding to the target service data based on the target service data corresponding to the service identifier and the data updating priority configuration rule corresponding to the service identifier; after generating a new data updating message, the data updating message is pushed to a message channel maintenance module; after receiving a data acquisition request pushed by a message channel maintenance module, sending corresponding target service data to display equipment through a corresponding query interface;
and the back-end message channel maintenance module is configured to push a data update message to the display device 100 through the long connection channel after receiving the data update message pushed by the back-end service module, and push a data acquisition request to the back-end service module of the corresponding service identifier after receiving a data acquisition request that is sent by the display device 100 through the query interface and acquires target service data corresponding to the data update message.
In the following, preferred embodiments of the present application will be described in further detail with reference to the accompanying drawings, it being understood that the preferred embodiments described herein are merely for purposes of illustration and explanation of the present application and are not intended to limit the present application, and that the features of the embodiments and examples of the present application may be combined with one another without conflict.
In the embodiment of the present application, before describing a method for updating data, it is briefly introduced how each display area in the display device obtains initial display data.
Referring to fig. 3, the display device 100 is configured with a user login interface, and when a user inputs user information (e.g., an account XXX password SZDFADGH) in a human-computer interaction interface of the display device to perform a login operation, the display device responds to the user login operation to obtain first-round displayed data from the connected server 200.
In a specific implementation, the display apparatus 100 responds to a login operation of a user, and sends a long connection channel establishment request to the server 200, so that the server 200 establishes a long connection channel between the server 200 and the display apparatus 100, which is used for the server 200 to push a data update message to the display apparatus 100, where the long connection channel establishment request includes a user identity.
Then, after receiving the channel establishment success message sent by the server 200, the display device 100 maintains the normal operation of the long connection channel between the display device 100 and the server 200 in a heartbeat message manner.
Correspondingly, the display device 100 responds to the login operation of the user, and determines a query interface corresponding to each service identifier based on the service identifier corresponding to each display area in the display device 100; and acquires the service data to be displayed corresponding to each service identifier in the server 200 by calling the query interface corresponding to each service identifier.
Then, after the display device receives the corresponding service data to be displayed through each query interface, the display device displays each service data to be displayed, which is acquired through each query interface, in the display area corresponding to the service identifier, so that the display device obtains the first-round displayed data in each display area.
Referring to fig. 4, in the embodiment of the present application, a method for updating data includes the following specific processes:
step S400: the server sends a data updating message to the display device after generating a new data updating message, wherein the data updating message includes service identifiers and data identifiers, each service identifier corresponds to at least one display area in the display device, the data identifiers are data identifiers of target service data corresponding to the data updating message, and the data identifiers represent data updating priorities of the corresponding target service data in all target service data corresponding to the service identifiers.
In the embodiment of the present application, referring to fig. 5, the data update message is generated by performing the following steps:
step S4001: and after receiving the original data collected by the connected data collection equipment, analyzing the original data to generate target service data corresponding to the service identification associated with the original data.
For example, take smart community A as an example.
Assuming that the display content required to be displayed in the display device corresponding to the smart community A comprises various types of data of a plurality of systems, such as device access data of the smart community A, real-time state data of the device, pedestrian and vehicle business data monitored by the device, alarm data identified and processed by an intelligent algorithm, and data of each business system, including real-time display of thousands of data of a plurality of sets of business systems such as payment, work orders, questionnaires, visitors, party construction, forest fire prevention, key personnel and the like.
And the data acquisition equipment of the intelligent community A is assumed to be a video monitoring system, an intelligent terminal application system and the like.
Then, the video monitoring system collects real-time video data through a camera and sends the video data serving as original data to a server connected with the video monitoring system; the intelligent terminal application system collects daily data of the intelligent community A through an application program and sends the daily data serving as original data to the server.
In this application embodiment, because the data types that the display device needs to show are many, therefore, in order to facilitate the follow-up display device to obtain data from the server in real time, at first, the data that need to show are grouped:
optionally, in this embodiment of the present application, according to the generation field of the data to be displayed, the micro services to which the data to be displayed belongs are grouped, where the grouping is as follows:
table 1 grouping rules for data to be presented
Figure BDA0003565688730000131
Figure BDA0003565688730000141
Therefore, the target service data is subjected to service type subdivision, the display areas correspond to the service identifiers, and the service characteristics of each display area in the display equipment are enhanced.
Then, in the embodiment of the present application, for each service identifier, different data update priorities are configured for different data identifiers under the same service identifier according to the following data update priority configuration rule:
in the embodiment of the present application, only the device data is taken as an example, and different data identifiers in the device data are briefly introduced:
table 2 data update priority configuration rules
Figure BDA0003565688730000142
In this embodiment of the application, after the configuration rule of the grouping and data update priority is configured, the server analyzes the raw data after receiving the raw data sent by the data acquisition device, so as to generate target service data corresponding to a service identifier associated with the raw data, where the target service data may be personnel data: { 50 people on XX month XX day XX in XX year into cell a (one cell in smart community a) }. The target service data may also be device data: { XX year XX month XX day monitoring equipment A (equipment basic data) is in working state (equipment state data) without exception }.
Therefore, by setting the data updating priority, the display equipment can update the priority according to the data of all the target service data in the corresponding service identification, and the target service data can be acquired from the server by the display equipment in a targeted manner, so that the real-time performance of the data displayed in each display area in the display equipment is improved.
In this embodiment of the application, the original data received by the server may be associated with multiple service identifiers, or may be associated with only one service identifier, for convenience of detailed description, only the generated target service data corresponding to one service identifier associated with the original data is taken as an example in the subsequent content, and the operation performed on the target service data corresponding to other service identifiers associated with the original data is performed with reference to the operation performed on the target service data corresponding to the above one service identifier, which is not described in detail later.
Step S4002: and determining a data identifier corresponding to the target service data based on the target service data and the data updating priority configuration rule of the service identifier.
In this embodiment of the present application, after the target service data is generated, step S410 is executed, and the data identifier of the target service data is determined based on the data update priority configuration rule of the service identifier corresponding to the target service data.
Step S4003: and generating a data updating message corresponding to the target service data based on the service identifier and the data identifier.
In this embodiment of the application, after step S4003 is executed, a data update message is generated, and then, when step S400 is executed, the data update message is sent to the display device, so that the display device invokes a query interface corresponding to a service identifier included in the data update message, and obtains target service data corresponding to the data update message from the server.
Step S410: the display device receives the data updating message pushed by the server and adds the data updating message to the data updating message queue.
In the embodiment of the application, after receiving a data update message pushed by a server, a display device adds the data update message to a data update message queue, where the data update message queue stores currently unprocessed data update messages.
Step S420: and the display equipment determines each data updating message according with the current available concurrent thread number based on the data identification corresponding to the data updating message in the data updating message queue.
In the embodiment of the present application, referring to fig. 6, when step S420 is executed, the following operations are specifically executed:
step S4201: a first total number of data update messages in a data update message queue is determined.
Step S4202: and judging whether the first total number is larger than the current available parallel thread number, if so, executing a step S4203, and otherwise, executing a step S4204.
In this embodiment of the present application, the current available number of concurrent threads is determined by performing the following operations:
operation 1: and judging whether the current concurrent thread number reaches a concurrent thread threshold value.
Operation 2: and when the current concurrent thread number does not reach the concurrent thread threshold, determining the difference value between the concurrent thread threshold and the current concurrent thread number as the current available concurrent thread number.
In the embodiment of the present application, if it is determined that the current number of concurrent threads reaches the concurrent thread threshold, the current concurrent thread may be monitored, and after it is determined that the released concurrent thread exists, each data update message that conforms to the current number of concurrent threads is determined based on the data identifier corresponding to the data update message in the data update message queue at that time, and the content of the subsequent step S430 is executed.
Step S4203: traversing each data updating message in the data updating message queue, and sequentially selecting each data updating message corresponding to each service identifier with the same data updating priority according to the sequence of the data updating priority from high to low until the second total number of the selected data updating messages reaches the current available concurrent thread number; and selecting the data updating messages corresponding to different service identifications with the same data updating priority according to the receiving time sequence of the corresponding data updating messages.
In this embodiment, when it is determined that the number of currently available concurrent threads is greater than the number of currently available concurrent threads, step S4203 is executed, each data update message in the data update message queue is traversed, data update messages with a higher data update priority in each service identifier are sequentially selected according to the data identifiers corresponding to the data update messages in the data update message queue, and then data update messages with a lower data update priority in each service identifier are selected until the second total number of the selected data update messages reaches the number of currently available concurrent threads.
Step S4204: and traversing each data updating message in the data updating message queue, and sequentially selecting each data updating message in the data updating message queue according to the sequence of the data updating priority from high to low.
In this embodiment of the application, when it is determined that the number of currently available concurrent threads is not greater than the number of currently available concurrent threads, step S4204 is executed, each data update message in the data update message queue is traversed, and data update messages in the data update message queue terminals are sequentially selected according to the data identifiers corresponding to the data update messages in the data update message queue until the data update messages in the data update message queue are completely selected.
Step S430: the display device sends data acquisition requests corresponding to the data updating messages by calling at least one query interface based on the determined data updating messages, wherein each data acquisition request comprises a service identifier and a data identifier corresponding to the data updating message, and the service identifiers corresponding to different query interfaces are different.
In this embodiment of the application, after the display device performs step S420, it determines each data update message that meets the current concurrent thread count, and then, when performing step S430, based on each data update message, invokes a query interface corresponding to a service identifier of the data update message, performs data interaction with the server, and sends a data acquisition request corresponding to the data update message to the server, where the data acquisition request is used to acquire target service data corresponding to the data update message, so that the display device can correspondingly update data displayed in a display area corresponding to the service identifier included in the corresponding data update message after receiving the target service data.
Step S440: and after receiving a data acquisition request sent by the display equipment through the query interface, the server queries corresponding target service data based on the data acquisition request.
In the embodiment of the application, after receiving a data acquisition request sent by a display device, a server queries a back-end service of a service identifier based on the service identifier included in the data acquisition request, and then queries corresponding target service data based on the data identifier included in the data acquisition request.
Step S450: and the server sends the inquired target service data to the display equipment through the inquiry interface.
In this embodiment of the application, after the server executes step S440, the target service data corresponding to the data obtaining request is queried, and then, when step S450 is executed, the target service data is sent to the display device through the query interface corresponding to the service identifier included in the data obtaining request.
Step S460: and after the display equipment acquires the target service data sent by the server through the query interface, updating the data displayed in the display area corresponding to the service identifier based on the target service data.
In the embodiment of the application, after the display device obtains the target service data sent by the server through the query interface, the display area in the display device is determined based on the service identifier corresponding to the target service data, and then the data displayed in the display area is updated based on the target service data.
In this embodiment of the application, when step S420 is executed, after a data update message pushed by a server is received, if it is determined that the data update priority of target service data corresponding to a data identifier is a special process based on the data identifier included in the data update message, target service data corresponding to the data update message is preferentially acquired by calling a query interface corresponding to the service identifier included in the data update message; and after the target service data is acquired through the query interface, updating the data displayed in the display area corresponding to the service identifier based on the target service data.
Because the types of data to be displayed in the existing display equipment are numerous, in the embodiment of the application, the target service data is subjected to service subdivision, the display areas correspond to the service identifiers, and the service characteristics of each display area in the display equipment are enhanced; further, the traditional method for transmitting the target service data through the long connecting channel between the display equipment and the server is converted into the method for transmitting the data updating message through the long connecting channel; the target service data is pushed by the server, the inquiry interface is called by the display equipment, and the corresponding target service data is actively acquired from the server, so that the transmission pressure of the long connecting channel for transmitting the target service data is reduced, the target service data can be acquired from the server in a targeted manner according to the data updating priority (namely, the data identifier included in the corresponding data updating message) of all the target service data in the corresponding service identifier, and the real-time performance and the strong service relevance of the data displayed in each display area in the display equipment are improved.
Based on the same inventive concept, referring to fig. 7, an apparatus (e.g., a display device) for updating data is provided in an embodiment of the present application, including:
a receiving module 710, configured to receive data update messages pushed by a server, and add the data update messages to a data update message queue, where each data update message includes a service identifier and a data identifier, each service identifier corresponds to at least one display area in the display device, the data identifier is a data identifier of target service data corresponding to the data update message, and the data identifier represents a data update priority of the corresponding target service data in all target service data corresponding to the service identifier;
a determining module 720, configured to determine, based on a data identifier corresponding to a data update message in the data update message queue, each data update message that meets the current available number of concurrent threads;
a calling module 730, configured to send data acquisition requests corresponding to the data update messages by calling at least one query interface based on the determined data update messages, where each data acquisition request includes a service identifier and a data identifier corresponding to the data update message, and service identifiers corresponding to different query interfaces are different;
the updating module 740 is configured to update data displayed in the display area corresponding to the service identifier based on the target service data after the target service data sent by the server is obtained through any one of the query interfaces.
Optionally, before receiving the data update message pushed by the server, the receiving module 710 is further configured to:
responding to the login operation of a user, and determining a query interface corresponding to each service identification based on the service identification corresponding to each display area in the display equipment;
acquiring to-be-displayed service data corresponding to each service identifier in the server by calling a query interface corresponding to each service identifier;
and displaying each service data to be displayed acquired through each query interface in a display area corresponding to the service identifier.
Optionally, the determining module 720 is configured to determine, based on the data identifier corresponding to the data update message in the data update message queue, each data update message that meets the current available number of concurrent threads, where the data update message is determined by:
determining a first total number of data updating messages in the data updating message queue, and judging whether the first total number is greater than the current available concurrent thread number;
after the first total number is determined to be larger than the current available concurrent thread number, traversing each data updating message in the data updating message queue, and sequentially selecting each data updating message corresponding to each service identifier with the same data updating priority according to the sequence of the data updating priority from high to low until the second total number of the selected data updating messages reaches the current available concurrent thread number;
and selecting the data updating messages corresponding to different service identifications with the same data updating priority according to the receiving time sequence of the corresponding data updating messages.
Optionally, the current available number of concurrent threads is determined by performing the following operations:
judging whether the current concurrent thread number reaches a concurrent thread threshold value;
and when the current concurrent thread number does not reach the concurrent thread threshold value, determining the difference value between the concurrent thread threshold value and the current concurrent thread number as the current available concurrent thread number.
Optionally, after receiving the data update message pushed by the server, the determining module 720 is further configured to:
if the data updating priority of the target service data corresponding to the data identification is determined to be special processing based on the data identification included in the data updating message, preferentially calling a query interface corresponding to the service identification included in the data updating message to acquire the target service data corresponding to the data updating message;
and after the target service data is acquired through the query interface, updating the data displayed in the display area corresponding to the service identifier based on the target service data.
Based on the same inventive concept, referring to fig. 8, an embodiment of the present application provides an apparatus (e.g., a server) for updating data, including:
a first sending module 810, configured to send a new data update message to a display device after generating the data update message, where the data update message includes service identifiers and data identifiers, each service identifier corresponds to at least one display area in the display device, the data identifier is a data identifier of target service data corresponding to the data update message, and the data identifier represents data update priorities of the corresponding target service data in all target service data corresponding to the service identifiers; the display equipment calls a query interface corresponding to the service identifier included in the data updating message, and target service data corresponding to the data updating message is acquired from a server;
a query module 820, configured to query, based on a data acquisition request sent by the display device after receiving the data acquisition request through the query interface, corresponding target service data, where service identifiers corresponding to different query interfaces are different;
a second sending module 830, configured to send the queried target service data to the display device through the query interface, so that the display device updates, after obtaining the target service data sent by the server through the query interface, data displayed in a display area of the service identifier based on the target service data.
Optionally, each data update message is generated by performing the following steps:
after receiving original data collected by connected data collection equipment, analyzing the original data to generate target service data corresponding to a service identifier associated with the original data;
determining a data identifier corresponding to the target service data based on the target service data and a data updating priority configuration rule corresponding to the service identifier;
and generating a data updating message corresponding to the target service data based on the service identifier and the data identifier.
Referring to fig. 9, an embodiment of the present application provides an electronic device, including:
a memory 901 for storing a computer program executable by the controller 902;
the controller 902 is connected to the memory 901 and configured to execute any one of the methods executed by the apparatus (e.g., a display device) for updating data in the embodiments described above.
Referring to fig. 10, an embodiment of the present application provides a server, including:
a memory 1001 for storing a computer program executable by the controller 1002;
the controller 1002 is connected to the memory 1001 and configured to execute any one of the methods executed by the apparatus (e.g., server) for updating data according to the embodiments described above.
Based on the same inventive concept, the present application provides a computer-readable storage medium, and instructions in the storage medium, when executed by a processor, enable the processor to perform any one of the methods performed by the apparatus for updating data in the above embodiments.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (10)

1. A method for updating data, which is applied to a display device, the method comprising:
receiving data updating messages pushed by a server, and adding the data updating messages into a data updating message queue, wherein each data updating message comprises a service identifier and a data identifier, each service identifier corresponds to at least one display area in the display equipment, the data identifier is a data identifier of target service data corresponding to the data updating message, and the data identifier represents data updating priorities of the corresponding target service data in all target service data corresponding to the service identifiers;
determining each data updating message according with the current available concurrent thread number based on the data identification corresponding to the data updating message in the data updating message queue;
based on the determined data updating messages, sending data acquisition requests corresponding to the data updating messages by calling at least one query interface, wherein each data acquisition request comprises a service identifier and a data identifier corresponding to the data updating message, and the service identifiers corresponding to different query interfaces are different;
and after target service data sent by the server is acquired through any one of the query interfaces, updating data displayed in a display area corresponding to the service identifier based on the target service data.
2. The method of claim 1, wherein before the receiving the data update message pushed by the server, further comprising:
responding to the login operation of a user, and determining a query interface corresponding to each service identification based on the service identification corresponding to each display area in the display equipment;
acquiring service data to be displayed corresponding to each service identifier in the server by calling a query interface corresponding to each service identifier;
and displaying each service data to be displayed acquired through each query interface in a display area corresponding to the service identifier.
3. The method as claimed in claim 1 or 2, wherein the determining each data update message according to the current available number of concurrent threads based on the data identifier corresponding to the data update message in the data update message queue comprises:
determining a first total number of data updating messages in the data updating message queue, and judging whether the first total number is greater than the current available concurrent thread number;
after the first total number is determined to be larger than the current available concurrent thread number, traversing each data updating message in the data updating message queue, and sequentially selecting each data updating message corresponding to each service identifier with the same data updating priority according to the sequence of the data updating priority from high to low until the second total number of the selected data updating messages reaches the current available concurrent thread number;
and selecting the data updating messages corresponding to different service identifications with the same data updating priority according to the receiving time sequence of the corresponding data updating messages.
4. The method of claim 3, wherein the current number of available concurrent threads is determined by performing the following:
judging whether the current concurrent thread number reaches a concurrent thread threshold value;
and when the current concurrent thread number does not reach the concurrent thread threshold value, determining the difference value between the concurrent thread threshold value and the current concurrent thread number as the current available concurrent thread number.
5. The method of claim 1 or 2, wherein after receiving the data update message pushed by the server, further comprising:
if the data updating priority of the target service data corresponding to the data identification is determined to be special processing based on the data identification included in the data updating message, the target service data corresponding to the data updating message is acquired by calling a query interface corresponding to the service identification included in the data updating message preferentially;
and after the target service data is acquired through the query interface, updating the data displayed in the display area corresponding to the service identifier based on the target service data.
6. A method for updating data, which is applied to a server, the method comprising:
after generating a new data update message, sending the data update message to a display device, where the data update message includes service identifiers and data identifiers, each service identifier corresponds to at least one display area in the display device, the data identifier is a data identifier of target service data corresponding to the data update message, and the data identifier represents data update priorities of the corresponding target service data in all target service data corresponding to the service identifiers; the display equipment calls a query interface corresponding to the service identifier included in the data updating message, and target service data corresponding to the data updating message is acquired from a server;
after receiving a data acquisition request sent by the display device through the query interface, querying corresponding target service data based on the data acquisition request, wherein service identifications corresponding to different query interfaces are different;
and sending the inquired target service data to the display equipment through the inquiry interface, so that the display equipment updates the data displayed in the display area of the service identifier based on the target service data after acquiring the target service data sent by the server through the inquiry interface.
7. The method of claim 6, wherein each data update message is generated by performing the steps of:
after receiving original data collected by connected data collection equipment, analyzing the original data to generate target service data corresponding to a service identifier associated with the original data;
determining a data identifier corresponding to the target service data based on the target service data and a data updating priority configuration rule corresponding to the service identifier;
and generating a data updating message corresponding to the target service data based on the service identifier and the data identifier.
8. An electronic device, comprising:
a memory for storing a computer program executable by the controller;
the controller is coupled to the memory and configured to perform the method of any of claims 1-5.
9. A server, comprising:
a memory for storing a computer program executable by the controller;
the controller is coupled to the memory and configured to perform the method of any of claims 6-7.
10. A computer-readable storage medium, wherein instructions in the storage medium, when executed by a processor, enable the processor to perform the method of any of claims 1-5, 6-7.
CN202210306830.1A 2022-03-25 2022-03-25 Method, device and equipment for updating data and storage medium Pending CN114647656A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210306830.1A CN114647656A (en) 2022-03-25 2022-03-25 Method, device and equipment for updating data and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210306830.1A CN114647656A (en) 2022-03-25 2022-03-25 Method, device and equipment for updating data and storage medium

Publications (1)

Publication Number Publication Date
CN114647656A true CN114647656A (en) 2022-06-21

Family

ID=81995044

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210306830.1A Pending CN114647656A (en) 2022-03-25 2022-03-25 Method, device and equipment for updating data and storage medium

Country Status (1)

Country Link
CN (1) CN114647656A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116303485A (en) * 2022-09-08 2023-06-23 上海数禾信息科技有限公司 Business index display method, device, computer equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116303485A (en) * 2022-09-08 2023-06-23 上海数禾信息科技有限公司 Business index display method, device, computer equipment and storage medium
CN116303485B (en) * 2022-09-08 2024-05-28 上海数禾信息科技有限公司 Business index display method, device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
US10965554B2 (en) Data processing method and related device, and system
CN112560724B (en) Vehicle monitoring method and device and cloud control platform
CN107204894A (en) The monitoring method and device of network servicequality
CN103346912A (en) Method, device and system for conducting warning correlation analysis
CN111813573B (en) Communication method of management platform and robot software and related equipment thereof
US10904107B2 (en) Service resource management system and method thereof
CN109412878A (en) Multi-tenant service access implementation method, device and electronic equipment
CN110717647A (en) Decision flow construction method and device, computer equipment and storage medium
CN111859127A (en) Subscription method and device of consumption data and storage medium
CN114647656A (en) Method, device and equipment for updating data and storage medium
CN112769943A (en) Service processing method and device
CN114968710A (en) Unit monitoring method and device based on distributed architecture
CN105376155B (en) A kind of Intelligent routing system and method based on distributed type assemblies framework
CN106156258B (en) Method, device and system for counting data in distributed storage system
EP2348676B1 (en) Method for accessing magnanimity data of intelligent network service database and system and device thereof
CN111159131A (en) Performance optimization method, device, equipment and computer readable storage medium
CN111539281B (en) Distributed face recognition method and system
CN115951923B (en) Subscription event management method, display system, device and storage medium
CN111209368A (en) Information prompting method and device, computer readable storage medium and electronic device
CN106649678B (en) Data processing method and system
CN106845926B (en) Distributed data stream processing method and system for third-party payment supervision system
CN116432924A (en) Shopping guide scheduling method and device
CN114302478A (en) Matching method of user terminal and network slice, computer device and storage medium
CN105227395A (en) A kind of method, Apparatus and system of distributed JVM performance evaluation
CN108737522A (en) A kind of processing method of message, device and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination