CN111782883A - View construction method and system - Google Patents

View construction method and system Download PDF

Info

Publication number
CN111782883A
CN111782883A CN201910973451.6A CN201910973451A CN111782883A CN 111782883 A CN111782883 A CN 111782883A CN 201910973451 A CN201910973451 A CN 201910973451A CN 111782883 A CN111782883 A CN 111782883A
Authority
CN
China
Prior art keywords
target object
information
view
state
item
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.)
Granted
Application number
CN201910973451.6A
Other languages
Chinese (zh)
Other versions
CN111782883B (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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information 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 Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201910973451.6A priority Critical patent/CN111782883B/en
Publication of CN111782883A publication Critical patent/CN111782883A/en
Application granted granted Critical
Publication of CN111782883B publication Critical patent/CN111782883B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9024Graphs; Linked lists
    • 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/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/904Browsing; Visualisation therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/206Drawing of charts or graphs

Abstract

The invention discloses a view construction method and system, and relates to the technical field of computers. One embodiment of the method comprises: receiving a view item construction request, and acquiring corresponding view item information according to an item identifier of the view item construction request; the view item information comprises target object information, and the target object information comprises target object position information and a target object state address; acquiring the current state information of the target object from the storage position indicated by the target object state address; and displaying the current state information of the target object on a base map of a window according to the mark position indicated by the target object position information. According to the method, after the view project construction request is received, the position information of the target object and the current state information of the target object are obtained, and then the current state information of the target object is displayed at the corresponding position of the base map, so that the view is constructed independently, and data are prevented from being leaked to a third party.

Description

View construction method and system
Technical Field
The invention relates to the field of computers, in particular to a view construction method and system.
Background
In the actual work of the internet, a real-time view is constructed, a target object is marked, and the real-time change of the state of the target object is observed. For example, in operation and maintenance, it is desirable to check whether the current state of each machine room is normal, whether the current state of each service database is normal, whether the current state of each service is normal, and the like in real time. In a business, we may wish to view in real time the total today order volume, total today payment volume, current 1 minute order volume, current 1 minute payment volume, etc. In the traffic department, people may want to see the congestion condition of each road segment in real time. In the prior art, each product line of an enterprise customizes its own real-time view according to its own needs, or purchases a data service of a third party to realize view construction.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art: each product line customizes a real-time view of the product line, and codes are difficult to reuse; and the view construction is realized by purchasing the data service of the third party, and the safety risk of data leakage exists.
Disclosure of Invention
In view of this, embodiments of the present invention provide a view construction method and system, where after a view item construction request is received, position information of a target object and current state information of the target object are obtained, and then the current state information is displayed at a corresponding position of a base map, so that view independent construction is implemented, and data leakage to a third party is avoided.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a view construction method.
The view construction method provided by the embodiment of the invention comprises the following steps: receiving a view item construction request, and acquiring corresponding view item information according to an item identifier of the view item construction request; the view item information comprises target object information, and the target object information comprises target object position information and a target object state address; acquiring the current state information of the target object from the storage position indicated by the target object state address; and displaying the current state information of the target object on a base map of a window according to the mark position indicated by the target object position information.
Optionally, obtaining the current state information of the target object from the storage location indicated by the target object state address includes: acquiring the current state identifier of the target object from the storage position indicated by the target object state address at regular time by adopting a timer constructed in the window; acquiring complete state information of the target object according to the target object identifier and the current state identifier; wherein the complete state information comprises state description information and/or a state diagram representing the state of the target object.
Optionally, the target object information includes a target object name; displaying the current state information of the target object on a base map of a window, wherein the displaying comprises: and refreshing and displaying the target object name and the complete state information on a base map of the window according to the timing interval of the timer and the set display format.
Optionally, the view item information further includes base map position information; before the step of displaying the current state information of the target object on the base map of the window, the method further includes: and acquiring the base map from the storage position indicated by the base map position information to draw the base map on the window.
Optionally, the method further comprises: when an administrator clicks a base map area in a window corresponding to a product line, acquiring target object position information formed by at least one click; the target object position information comprises click position information formed by each click; displaying the objects belonging to the product line at each click position, acquiring a target object selected by the administrator from the objects, and generating a view object identifier; and storing the view object identification, the target object identification of the selected target object and the target object position information into a pre-constructed view item table.
Optionally, the method further comprises: receiving view basic information to generate a corresponding view item according to the view basic information; wherein the view basic information includes the product line, a view name, and the base map; when a first target operation of a first operation interface corresponding to the view item is triggered, displaying a second operation interface corresponding to the first target operation, so that the administrator inputs object information affiliated to the product line through the second operation interface; storing the object information into a pre-constructed object definition table; the object information comprises an object name, an object state table and an object state address, wherein the object state table is used for storing a state identifier of an object, and corresponding state description information, state character color and state diagram.
Optionally, the method further comprises: when a second target operation of the first operation interface is triggered, displaying an operation interface corresponding to the second target operation, so that the administrator clicks the base map area on the operation interface.
Optionally, when the complete state information includes state description information, the complete state information further includes: a status text color for indicating a text color of the status description information.
To achieve the above object, according to another aspect of the embodiments of the present invention, there is provided a view construction system.
The view construction system of the embodiment of the invention comprises: the first acquisition module is used for receiving a view item construction request and acquiring corresponding view item information according to an item identifier of the view item construction request; the view item information comprises target object information, and the target object information comprises target object position information and a target object state address; the second acquisition module is used for acquiring the current state information of the target object from the storage position indicated by the target object state address; and the display module is used for displaying the current state information of the target object on the base map of the window according to the mark position indicated by the target object position information.
Optionally, the second obtaining module is further configured to: acquiring the current state identifier of the target object from the storage position indicated by the target object state address at regular time by adopting a timer constructed in the window; acquiring complete state information of the target object according to the target object identifier and the current state identifier; wherein the complete state information comprises state description information and/or a state diagram representing the state of the target object.
Optionally, the target object information includes a target object name; the display module is further configured to: and refreshing and displaying the target object name and the complete state information on a base map of the window according to the timing interval of the timer and the set display format.
Optionally, when the complete state information includes state description information, the complete state information further includes: a status text color for indicating a text color of the status description information.
To achieve the above object, according to still another aspect of embodiments of the present invention, there is provided an electronic apparatus.
An electronic device of an embodiment of the present invention includes: one or more processors; a storage system for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement a view construction method of an embodiment of the present invention.
To achieve the above object, according to still another aspect of embodiments of the present invention, there is provided a computer-readable medium.
A computer-readable medium of an embodiment of the present invention has stored thereon a computer program that, when executed by a processor, implements a view construction method of an embodiment of the present invention.
One embodiment of the above invention has the following advantages or benefits: after receiving a view item construction request, acquiring position information of a target object and current state information of the target object, and further displaying the current state information of the target object at a corresponding position of a base map, so that view independent construction is realized, and data leakage to a third party is avoided; the state of the target object on the base map is refreshed in real time through the timer, so that the real-time property of the view is ensured, and a user can observe the real-time change of the state of the target object conveniently; appointing a storage position of the base map, further acquiring the base map for drawing, and conveniently customizing the base map image according to requirements; by configuring the view of each product line and the custom object information, the view construction process of each product line is unified, so that each product line can easily define the real-time view of the product line; the method is simple to operate, only each product line is needed to construct a data source of the product line, and programming on a view is not needed.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of the main steps of a view construction method according to an embodiment of the present invention;
FIG. 2 is a system architecture diagram of a view construction method according to an embodiment of the present invention;
FIG. 3 is a schematic main flow diagram of a view construction method according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a view item table management interface of an embodiment of the present invention;
FIG. 5(a) is a schematic diagram of the effect of the view construction method according to the embodiment of the present invention;
FIG. 5(b) is a schematic diagram of the effect of the view construction method according to the embodiment of the present invention;
FIG. 6 is a schematic main flow chart of defining objects and configuring views in the view construction method according to the embodiment of the present invention;
FIG. 7 is a diagram of an object definition table management interface according to an embodiment of the invention;
FIG. 8 is a schematic diagram of an add-on data interface according to an embodiment of the present invention;
FIG. 9 is a schematic view of a floor plan interface of an embodiment of the present invention;
FIG. 10 is a schematic diagram of the main modules of a view building system according to an embodiment of the present invention;
FIG. 11 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
FIG. 12 is a schematic diagram of a computer apparatus suitable for use in an electronic device to implement an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic diagram of the main steps of a view construction method according to an embodiment of the present invention. As shown in fig. 1, the view construction method according to the embodiment of the present invention mainly includes the following steps:
step S101: receiving a view item construction request, and acquiring corresponding view item information according to the item identifier of the view item construction request. And clicking a view viewing button on a terminal interface of the view construction system by a user, and triggering the terminal to send a view item construction request comprising an item identifier to the view construction system. And the view construction system queries in a pre-constructed view item table based on the item identification to acquire view item information corresponding to the view item. The view item information comprises target object information and base map position information, and the target object information comprises target object position information and a target object state address.
Step S102: and acquiring the current state information of the target object from the storage position indicated by the target object state address. And dynamically acquiring the current state information of the target object according to the storage position indicated by the target object state address. In the embodiment, a timer built in a window is adopted to obtain the current state identifier of a target object from the storage position indicated by the state address of the target object at regular time; and then acquiring the complete state information of the target object according to the target object identifier and the current state identifier. Wherein, the complete state information comprises state description information of the target object and/or a state diagram representing the state of the target object.
Step S103: and displaying the current state information of the target object on a base map of a window according to the mark position indicated by the target object position information. And acquiring the base map from the storage position indicated by the base map position information to draw the base map on the window. And displaying the name of the target object and the current state information on the base map of the window according to the set display format. The display format here refers to a display result regarding the name, state, image, and the like of the target object presented on the base map. In the embodiment, the name of the target object and the acquired complete state information are refreshed and displayed on the base map of the window according to the timing interval of the timer and the set display format so as to display the real-time change of the state of the target object.
Fig. 2 is a system architecture diagram of a view construction method according to an embodiment of the present invention. As shown in fig. 2, the view construction system of the embodiment of the present invention includes: a view building system and a database. The view construction system constructs a view management table in advance and stores the view management table in a database. An administrator or user may access the view building system, enter information for view building in an operation interface of the view building system, such as selecting a product line, uploading a base map, adding predefined objects in the product line, and the like.
And clicking any position on the base map by the administrator, triggering the view construction system to acquire the clicked position, and displaying all objects of the product line which can be placed at the clicked position so that the administrator can select the target object. The view construction system stores the target object identification and the click location to a view management table.
When the view construction system receives a view item construction request of a certain product line, an object state address (namely a product line interface) is obtained from a corresponding object definition table according to a target object identifier, so that the current state information of the corresponding target object is obtained through the object state address. And then displaying the current state information of the target object on the base map according to the click position, so as to obtain the view of the product line. In addition, the view building system may store views of each product line separately.
Fig. 3 is a main flow diagram of a view construction method according to an embodiment of the present invention. As shown in fig. 3, the view construction method according to the embodiment of the present invention mainly includes the following steps:
step S301: and the view construction system constructs a view management table and stores the view management table to the database. The view management table comprises a product line table, an object definition table, a view item table and an object state table. The product line table is used for distinguishing product lines. The object definition table is used to predefine all objects that may appear on the view for the user to select a target object from to place on the view. The view item table is used for storing view items, wherein one item is a view constructed by any product line. The object state table is used to store state data for each object.
In an embodiment, the product line table comprises: a Product line identification (Product _ id) field, a Product line Chinese name (Product _ name) field, a Product line English name (Product _ en) field, a Product line description (Product _ desc) field, a field type for each field, and a description for each field. The Product _ en field is used for parameter transmission, and English names are used for parameter transmission, so that Chinese messy codes can be avoided. Specifically, it can be shown in table 1:
TABLE 1 line chart of products
Name of field Type of field Description of the invention
Product_id Int(11)unsigned id self increment
Product_name Varchar(255) Product line Chinese name
Product_en Varchar(255) Product line English name
Product_desc Longtext Description of product lines
In an embodiment, an object definition table includes: an object identification (Item _ id) field, a product line identification field, an object name (Item _ name) field, an object state (Item _ status) field, an object state address (Item _ url) field, a Creator (Creator) field, a creation time (Created _ at) field, a field type of each field, and a description of each field. Wherein the Item _ status field includes an object state table. The object state table is a json character string, and includes a plurality of state identifiers of the object, and corresponding state descriptions, state character color codes and state diagrams, which are specifically shown in table 4. The Item _ url field is used to store the value address of the object state, which is provided by the product line itself. Json is a lightweight data exchange format that is packed in long strings. The object definition table may be as shown in table 2:
table 2 object definition table
Name of fieldBalance Type of field Description of the invention
Item_id Int(11)unsigned id self increment
Product_id Varchar(255) Affiliated product line
Item_name Varchar(200) Predefined object names
Item_status Longtext Object state table
Item_url Varchar(255) Object state address
Creator Varchar(255) Creator
Created_at Datetime Creation time
In an embodiment, the view item table includes: an Item identification (View _ id) field, a product line identification field, a View name (View _ name) field, a base map (Big _ pic) field, a target object list (Item _ arr) field, a creator field, a creation time field, a field type of each field, and a description of each field. The Big _ pic field is used to store the base map of the view, the base map is the picture used as the background, and may be a map, a moving picture, etc.
The Item _ arr field is a json string, which records the id and location of each target object in the view. The position here refers to the position of the target object on the bottom view. For example, constructing a view, taking the example of marking the state of the machine room, needs to mark which province the machine room is located in. For another example, taking the marking of the order amount and the payment amount status as an example, an order amount picture, a payment amount picture and a position need to be marked. The view item table may be specifically as shown in table 3:
table 3 view items table
Name of field Type of field Description of the invention
View_id Int(11)unsigned id self increment
Product_id Int(11) Affiliated product line
View_name Varchar(255) View name
Big_pic Varchar(255) Base map storage of views
Item_arr Longtext Target object list on view
Creator Varchar(255) Creator
created_at Datetime Creation time
In an embodiment, the object state table comprises: a state identification field, a state description field, a state literal color code field of the object, and a state diagram field. The status text color code field is used for indicating the current color of the text representing the object and the object status in the view; and the state diagram field is used for drawing a state diagram corresponding to the object state in the view.
The state tables typically differ from object to object. Taking the machine room status as an example, there are various possible statuses, such as health, warning, and severity, and the status table thereof may be specifically shown in table 4:
TABLE 4 object State Table
Status identification State description Status text color code of object State diagram
1 Health care The code #00ff00 refers to green health.jpg
2 Warning The code #0000ff refers to yellow Warning.jpg
3 Severe severity of disease The code # ff0000 refers to red Alarm.jpg
The data in table 4 is encoded and packed (encoded) into a json string and stored in the Item _ status field of the object definition table (i.e., table 2). The json data format is:
Figure BDA0002232859450000091
still taking the machine room state as an example, the json data after packaging is as follows:
Figure BDA0002232859450000092
Figure BDA0002232859450000101
step S302: and the view construction system receives the view basic information, generates a corresponding view item according to the view basic information and displays the view item on the terminal equipment. The method comprises the following steps that an administrator selects a product line, fills in a view name and uploads a base map on a terminal device interface, the terminal device generates view basic information according to input data of the administrator, and the view basic information is sent to a view construction system; the view construction system generates view items according to the view basic information. In an embodiment, the view items are displayed via a view item table management interface.
FIG. 4 is a diagram of a view item table management interface according to an embodiment of the present invention. As shown in fig. 4, the view item table management interface of the embodiment of the present invention may include fields such as item identification, attached product line, view name, base map, object list, creator, creation time, and operation. The operation field can implement functions of pre-defining objects, configuring objects, deleting, etc. The interface also comprises a function of adding new data, and an administrator can add a new view item by clicking the corresponding position of the interface.
Step S303: the view construction system receives the object definition information and the view configuration information, stores the object definition information into an object definition table, and stores the view configuration information into a view item table. The object definition information comprises an object identifier, an object name, an object state table and an object state address which are recorded by an administrator and belong to the product line and the view item. The view configuration information comprises position information clicked by an administrator on the base map and the selected target object. For a specific implementation, refer to the description of fig. 6.
Step S304: and when the view construction system receives the view project construction request, acquiring a project identifier in the view project construction request, acquiring a corresponding record from the view project table according to the project identifier, and decoding an object list field in the record to obtain decoded data. The terminal interface of the view building system is provided with labels, such as buttons, for viewing the views of the various product lines. When a user clicks a current tag to view a view, a view construction system acquires an Item identifier of a view Item viewed by the user, reads a corresponding record from a view Item table (table 3), and performs json decoding on an Item _ arr field in the record to obtain decoded data.
Step S305: the view construction system draws the base map in the record at the current page. And the view construction system acquires the Big _ pic field data in the record, namely the position for storing the base map, and drawing.
Step S306: and the view construction system traverses elements in the decoded data and acquires a target object name and a target object state address corresponding to each target object identifier. The view construction system traverses the elements in the decoded data, and executes step S307 to step S310 each time a target object identifier is acquired, until the traversal is completed. The decoded data includes a target object identifier Item _ id, and Item _ name and Item _ url corresponding to each Item _ id are acquired from the object definition table (table 2).
In an embodiment, the data structure of the decoded data (Item _ arr _ json) is in the form of:
Figure BDA0002232859450000111
step S307: the view construction system draws an initial image at the position of each target object, and performs initial marking according to a set format. The view construction system draws an initial image (default. jpg) at its coordinates for all target objects and marks text. Wherein, the initial image can be customized, such as a hyperlink of a certain image; the specific content and position of the marked text can also be customized, for example, the marked text below the initial image is: item _ name (in initialization).
Step S308: and the view construction system constructs a timer for each target object so as to regularly acquire the current state identification of the target object. And the view construction system acquires the current state identification of the target object from the corresponding Item _ url at regular time in a page construction timer for all the target objects. In an embodiment, the page timer is implemented by the setInterval () function of JS, which is used to implement intermittent calls, i.e., the code is repeatedly executed continuously for a specified time. There are 2 input parameters to the setInterval () function, the code or function to be executed and the latency before executing the code.
Step S309: and the view construction system submits the target object identification and the current state identification to the corresponding product line interface so as to acquire complete state information. The complete status information here includes status description information, status text color codes and corresponding status diagrams. When the state of the target object is obtained, the target object id is sent to a corresponding Item _ url, the Item _ url is a product line interface of each target object of each view, and the product line interface needs to be developed correspondingly, for example, machine room data of each area are different, and different data need to be returned according to unique identifiers sent by each machine room.
In an embodiment, the view building system submits the target object identification and the current state identification using a timed thread. The functions that the product line interface can realize are as follows:
acquiring Item _ id submitted by a front end and a current state identifier; reading the object definition table to obtain an Item _ status field of a corresponding object state table; decoding Item _ status into json array; traversing the json array, comparing state numbers (namely current state identifications) submitted by users to obtain corresponding state description, state character colors and state diagrams, and returning to the front end to enable the front end to refresh information displayed on the base diagram.
Step S310: and the view construction system refreshes the information displayed by the base map according to the complete state information to obtain the final view. In the embodiment, the view construction system refreshes the information displayed by the base map by using a timed thread, for example, the mark text Item _ name (in initialization) on the base map is changed into the Item _ name (state description), the texts are displayed by using the state text color, and the currently displayed image of the target object is changed into the currently obtained state map.
Fig. 5(a) and 5(b) are schematic diagrams illustrating effects of the view construction method according to the embodiment of the present invention. As shown in fig. 5(a) and 5(b), the status text, the status image, and the real-time change in color of the status text of each target object can be displayed in real time on the view. For example, all the power stations in fig. 5(a) operate normally, and after a period of time, two of the power stations fail, and fig. 5(b) can be obtained by refreshing fig. 5(a) according to the current complete state information. In this embodiment, the status text color of the power station that normally operates is set to green, and the status text color of the power station that has a fault is set to red.
Fig. 6 is a main flowchart illustrating the definition of an object and a configuration view in the view construction method according to the embodiment of the present invention. As shown in fig. 6, the main process of defining the object and the configuration view (i.e., step S303) in the view construction method according to the embodiment of the present invention includes the following steps:
step S601: when a first target operation in a first operation interface corresponding to the view item is triggered, the view construction system displays a second operation interface corresponding to the first target operation on the terminal equipment. The first operation interface, namely the view item table management interface, comprises operation fields of a predefined object, a configuration object and a deletion. The corresponding target operations are predefined object, configuration object and delete. In an embodiment, the first target operation of this step may be a predefined object. The details will be described below.
And clicking a 'predefined object' in the view item table management interface by the administrator, triggering the view construction system to generate an object definition table management interface (namely a second operation interface) and displaying the object definition table management interface on the terminal equipment. The interface can include fields of object identification, membership item identification, object name, object state table, object state address, creator, creation time and operation.
Fig. 7 is a schematic diagram of an object definition table management interface according to an embodiment of the present invention. As shown in fig. 7, the object definition table management interface of the embodiment of the present invention includes 3 objects, which belong to item 3. The operation field can realize functions of editing, deleting and the like. The interface also comprises a function of adding new data, and an administrator or a user can add a newly defined object by clicking the corresponding position of the interface.
Step S602: and when a second target operation in the second operation interface is triggered, the view construction system displays a third operation interface corresponding to the second target operation on the terminal equipment. The second operation interface, namely the object definition table management interface, comprises editing and deleting operation fields. The corresponding target operations are editing and deleting. In an embodiment, the second target operation of this step may be editing. The details will be described below.
And clicking 'adding new data' in the object definition table management interface by the administrator to trigger the view construction system to generate a new data interface (namely a third operation interface). The interface can comprise a membership item identifier, an object name filling box, an object state table filling box, an object state address filling box and the like.
FIG. 8 is a schematic diagram of an add-on data interface according to an embodiment of the invention. As shown in fig. 8, the newly added data interface of the embodiment of the present invention displays a newly added data affiliation item 3, and the interface includes a submit button and a cancel button in addition to a fill-in frame for filling in an object name, an object state table, and an object state address, so as to correspondingly implement functions of submitting newly added data and canceling newly added data.
Step S603: and the view construction system receives input data from the third operation interface, generates an object state table according to the input data and stores the object state table into the object definition table. After the administrator inputs and submits the data in the third operation interface, the view construction system is triggered to process the input data (i.e. generate a json character string, see step S301 for specific implementation), and the data required by the Item _ status field in the object definition table (i.e. table 2) is generated and then stored in the object definition table.
Step S604: when the second target operation of the first operation interface is triggered, the view construction system displays a fourth operation interface corresponding to the second target operation on the terminal equipment. In an embodiment, the second target operation of this step may be a configuration object. And clicking a configuration object in the view project table management interface by the administrator, triggering the view construction system to generate a base map setting interface (namely a fourth operation interface), and displaying the base map setting interface on the terminal equipment.
Step S605: when the base map area of the fourth operation interface is clicked, the view construction system acquires position information corresponding to the click, so that all objects of the current product line which can be placed in the current position are displayed. The base map setting interface is provided with an object list of each product line which can be displayed at each position of the base map. The administrator clicks any position on the base map, the view construction system is triggered to acquire currently clicked position information (x coordinate data and y coordinate data) by using a JavaScript (JS) function, and all objects of the current product line which can be placed are displayed at the position.
FIG. 9 is a schematic diagram of a floor plan interface of an embodiment of the present invention. As shown in FIG. 9, the administrator clicks on the current location on the floor map and the view building system pops up all the objects of the current product line that are available for placement at the current location. The subsequent administrator can select an object to be placed from all the objects as a target object, where the target object can be any one of a machine room, a power station, and a construction site.
In the embodiment, the view construction system requests all objects of the current product line from a background in an Ajax mode; after obtaining the current product line id, the background queries an object definition table to return all objects of the current product line; and the foreground adds all the objects to the popup window through the JS function. The administrator may select the target object from the drop-down list of popup windows.
Step S606: the view construction system acquires the target object, generates a view object identifier, and sends the view object identifier, the target object identifier and the position information to the background. The target object is the object selected by the administrator on the base map setting interface. And drawing each target object on the final view by using a div (division) layer, wherein each div layer needs a unique identifier, and the identifier is a view object identifier. Data received in the background is stored in the Item _ arr field in the view Item table.
Step S607: and the background stores the view object identification, the target object identification and the position information. And acquiring an object list of a specified product line in the view item by the background, performing json decoding to obtain decoded data, and adding the target object identification and the position information into the decoded data. When the view item is generated in step S302, the administrator selects a product line, and searches all object lists according to the product line. In an embodiment, the background adds the following data structure to the decoded data (Item _ arr _ json):
Array(
timestampId=>array(
"x" - > $ x,// x coordinate of the administrator selected location
"y" - > $ y,// y coordinate of the administrator selected location
"item _ id" $ item _ id,// target object id selected by the administrator at this location
);
);
According to the view construction method, after the view project construction request is received, the position information of the target object and the current state information of the target object are obtained, and then the current state information of the target object is displayed at the corresponding position of the base map, so that the view is constructed independently, and data are prevented from being leaked to a third party; the state of the target object on the base map is refreshed in real time through the timer, so that the real-time property of the view is ensured, and a user can observe the real-time change of the state of the target object conveniently; appointing a storage position of the base map, further acquiring the base map for drawing, and conveniently customizing the base map image according to requirements; by configuring the view of each product line and the custom object information, the view construction process of each product line is unified, so that each product line can easily define the real-time view of the product line; the method is simple to operate, only each product line is needed to construct a data source of the product line, and programming on a view is not needed.
Fig. 10 is a schematic diagram of the main modules of the view building system according to the embodiment of the present invention. As shown in fig. 10, a view construction system 1000 according to an embodiment of the present invention mainly includes:
a first obtaining module 1001, configured to receive a view item construction request, and obtain corresponding view item information according to an item identifier of the view item construction request. And clicking a view viewing button on a terminal interface of the view construction system by a user, and triggering the terminal to send a view item construction request comprising an item identifier to the view construction system. And the view construction system queries in a pre-constructed view item table based on the item identification to acquire view item information corresponding to the view item. The view item information comprises target object information and base map position information, and the target object information comprises target object position information and a target object state address.
A second obtaining module 1002, configured to obtain current state information of the target object from the storage location indicated by the target object state address. And dynamically acquiring the current state information of the target object according to the storage position indicated by the target object state address. In the embodiment, a timer built in a window is adopted to obtain the current state identifier of a target object from the storage position indicated by the state address of the target object at regular time; and then acquiring the complete state information of the target object according to the target object identifier and the current state identifier. Wherein, the complete state information comprises state description information of the target object and/or a state diagram representing the state of the target object.
A display module 1003, configured to display the current state information of the target object on a base map of a window according to the mark position indicated by the target object position information. And acquiring the base map from the storage position indicated by the base map position information to draw the base map on the window. And displaying the name of the target object and the current state information on the base map of the window according to the set display format. The display format here refers to a display result regarding the name, state, image, and the like of the target object presented on the base map. In the embodiment, the name of the target object and the acquired complete state information are refreshed and displayed on the base map of the window according to the timing interval of the timer and the set display format so as to display the real-time change of the state of the target object.
In addition, the view construction system 1000 according to the embodiment of the present invention may further include: a rendering module, a view configuration module, an object definition module, and an interface display module (not shown in FIG. 10). And the base map drawing module is used for acquiring the base map from the storage position indicated by the base map position information so as to draw the base map on the window.
The view configuration module is used for acquiring the position information of the target object formed by at least one click when the administrator clicks the base map area on the window corresponding to the product line; the target object position information comprises click position information formed by each click; displaying the objects belonging to the product line at each click position, acquiring a target object selected by the administrator from the objects, and generating a view object identifier; and storing the view object identification, the target object identification of the selected target object and the target object position information into a pre-constructed view item table.
The object definition module is used for receiving the view basic information so as to generate a corresponding view item according to the view basic information; wherein the view basic information includes the product line, a view name, and the base map; when a first target operation of a first operation interface corresponding to the view item is triggered, displaying a second operation interface corresponding to the first target operation, so that the administrator inputs object information affiliated to the product line through the second operation interface; storing the object information into a pre-constructed object definition table; the object information comprises an object name, an object state table and an object state address, wherein the object state table is used for storing a state identifier of an object, and corresponding state description information, state character color and state diagram.
And the interface display module is used for displaying an operation interface corresponding to the second target operation when the second target operation of the first operation interface is triggered, so that the administrator clicks the base map area on the operation interface.
From the above description, after receiving the view item construction request, acquiring the position information of the target object and the current state information of the target object, and further displaying the current state information at the corresponding position of the base map, so that the view is constructed autonomously, and data leakage to a third party is avoided; the state of the target object on the base map is refreshed in real time through the timer, so that the real-time property of the view is ensured, and a user can observe the real-time change of the state of the target object conveniently; appointing a storage position of the base map, further acquiring the base map for drawing, and conveniently customizing the base map image according to requirements; by configuring the view of each product line and the custom object information, the view construction process of each product line is unified, so that each product line can easily define the real-time view of the product line; the method is simple to operate, only each product line is needed to construct a data source of the product line, and programming on a view is not needed.
FIG. 11 illustrates an exemplary system architecture 1100 for a view building method or for a view building system to which embodiments of the present invention may be applied.
As shown in fig. 11, the system architecture 1100 may include terminal devices 1101, 1102, 1103, a network 1104, and a server 1105. The network 1104 is a medium to provide communication links between the terminal devices 1101, 1102, 1103 and the server 1105. Network 1104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
A user may use terminal devices 1101, 1102, 1103 to interact with a server 1105 over a network 1104 to receive or send messages or the like. Various communication client applications, such as a shopping application, a web browser application, a search application, an instant messaging tool, a mailbox client, social platform software, etc., may be installed on the terminal devices 1101, 1102, 1103.
The terminal devices 1101, 1102, 1103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 1105 may be a server that provides various services, such as a background management server that processes a view item construction request sent by a user/administrator using the terminal devices 1101, 1102, 1103. The background management server may obtain the item identifier in the view item construction request, obtain current state information of the target object and position information of the target object, perform processing such as base map display, and feed back a processing result (e.g., a constructed view) to the terminal device.
It should be noted that the view building method provided by the embodiment of the present application is generally executed by the server 1105, and accordingly, the view building system is generally disposed in the server 1105.
It should be understood that the number of terminal devices, networks, and servers in fig. 11 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
The invention also provides an electronic device and a computer readable medium according to the embodiment of the invention.
The electronic device of the present invention includes: one or more processors; a storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement a method for view construction according to an embodiment of the present invention.
The computer readable medium of the present invention, on which a computer program is stored, said program implementing one of the methods for view construction of the embodiments of the present invention when executed by a processor.
Referring now to FIG. 12, shown is a block diagram of a computer system 1200 suitable for use in implementing an electronic device of an embodiment of the present invention. The electronic device shown in fig. 12 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 12, the computer system 1200 includes a Central Processing Unit (CPU)1201, which can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)1202 or a program loaded from a storage section 1208 into a Random Access Memory (RAM) 1203. In the RAM 1203, various programs and data necessary for the operation of the computer system 1200 are also stored. The CPU 1201, ROM 1202, and RAM 1203 are connected to each other by a bus 1204. An input/output (I/O) interface 1205 is also connected to bus 1204.
The following components are connected to the I/O interface 1205: an input section 1206 including a keyboard, a mouse, and the like; an output portion 1207 including a display device such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 1208 including a hard disk and the like; and a communication section 1209 including a network interface card such as a LAN card, a modem, or the like. The communication section 1209 performs communication processing via a network such as the internet. A driver 1210 is also connected to the I/O interface 1205 as needed. A removable medium 1211, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like, is mounted on the drive 1210 as necessary, so that a computer program read out therefrom is mounted into the storage section 1208 as necessary.
In particular, the processes described above with respect to the main step diagrams may be implemented as computer software programs, according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program containing program code for performing the method illustrated in the main step diagram. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 1209, and/or installed from the removable medium 1211. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 1201.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer 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. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer 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 computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes a first acquisition module, a second acquisition module, and a display module. The names of these modules do not form a limitation on the modules themselves in some cases, for example, the first obtaining module may also be described as a "module that receives a view item construction request and obtains corresponding view item information according to an item identifier of the view item construction request".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: receiving a view item construction request, and acquiring corresponding view item information according to an item identifier of the view item construction request; the view item information comprises target object information, and the target object information comprises target object position information and a target object state address; acquiring the current state information of the target object from the storage position indicated by the target object state address; and displaying the current state information of the target object on a base map of a window according to the mark position indicated by the target object position information.
From the above description, after receiving the view item construction request, the position information of the target object and the current state information of the target object are acquired, and then the current state information of the target object is displayed at the corresponding position of the base map, so that the view is constructed autonomously, and data leakage to a third party is avoided.
The product can execute the method provided by the embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in this embodiment, reference may be made to the method provided by the embodiment of the present invention.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (11)

1. A method of view construction, comprising:
receiving a view item construction request, and acquiring corresponding view item information according to an item identifier of the view item construction request; the view item information comprises target object information, and the target object information comprises target object position information and a target object state address;
acquiring the current state information of the target object from the storage position indicated by the target object state address;
and displaying the current state information of the target object on a base map of a window according to the mark position indicated by the target object position information.
2. The method of claim 1, wherein obtaining current state information of the target object from the storage location indicated by the target object state address comprises:
acquiring the current state identifier of the target object from the storage position indicated by the target object state address at regular time by adopting a timer constructed in the window;
acquiring complete state information of the target object according to the target object identifier and the current state identifier; wherein the complete state information comprises state description information and/or a state diagram representing the state of the target object.
3. The method of claim 2, wherein the target object information includes a target object name; displaying the current state information of the target object on a base map of a window, wherein the displaying comprises:
and refreshing and displaying the target object name and the complete state information on a base map of the window according to the timing interval of the timer and the set display format.
4. The method of claim 1, wherein the view item information further comprises base map location information; before the step of displaying the current state information of the target object on the base map of the window, the method further includes:
and acquiring the base map from the storage position indicated by the base map position information to draw the base map on the window.
5. The method of claim 1, further comprising:
when an administrator clicks a base map area in a window corresponding to a product line, acquiring target object position information formed by at least one click; the target object position information comprises click position information formed by each click;
displaying the objects belonging to the product line at each click position, acquiring a target object selected by the administrator from the objects, and generating a view object identifier;
and storing the view object identification, the target object identification of the selected target object and the target object position information into a pre-constructed view item table.
6. The method of claim 5, further comprising:
receiving view basic information to generate a corresponding view item according to the view basic information; wherein the view basic information includes the product line, a view name, and the base map;
when a first target operation of a first operation interface corresponding to the view item is triggered, displaying a second operation interface corresponding to the first target operation, so that the administrator inputs object information affiliated to the product line through the second operation interface;
storing the object information into a pre-constructed object definition table; the object information comprises an object name, an object state table and an object state address, wherein the object state table is used for storing a state identifier of an object, and corresponding state description information, state character color and state diagram.
7. The method of claim 6, further comprising:
when a second target operation of the first operation interface is triggered, displaying an operation interface corresponding to the second target operation, so that the administrator clicks the base map area on the operation interface.
8. The method according to claim 2 or 3, wherein when the complete status information comprises status description information, the complete status information further comprises: a status text color for indicating a text color of the status description information.
9. A view construction system, comprising:
the first acquisition module is used for receiving a view item construction request and acquiring corresponding view item information according to an item identifier of the view item construction request; the view item information comprises target object information, and the target object information comprises target object position information and a target object state address;
the second acquisition module is used for acquiring the current state information of the target object from the storage position indicated by the target object state address;
and the display module is used for displaying the current state information of the target object on the base map of the window according to the mark position indicated by the target object position information.
10. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-8.
11. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-8.
CN201910973451.6A 2019-10-14 2019-10-14 View construction method and system Active CN111782883B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910973451.6A CN111782883B (en) 2019-10-14 2019-10-14 View construction method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910973451.6A CN111782883B (en) 2019-10-14 2019-10-14 View construction method and system

Publications (2)

Publication Number Publication Date
CN111782883A true CN111782883A (en) 2020-10-16
CN111782883B CN111782883B (en) 2024-02-02

Family

ID=72755702

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910973451.6A Active CN111782883B (en) 2019-10-14 2019-10-14 View construction method and system

Country Status (1)

Country Link
CN (1) CN111782883B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114383627A (en) * 2022-01-10 2022-04-22 重庆思骑科技有限公司 Riding navigation data display method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040117361A1 (en) * 2002-08-16 2004-06-17 Greer Gary L. System and method for managing construction projects
CN108459890A (en) * 2017-02-20 2018-08-28 百度在线网络技术(北京)有限公司 Interface display method and device for application
CN108647063A (en) * 2018-03-16 2018-10-12 维沃移动通信有限公司 A kind of method and terminal of display object
CN109087159A (en) * 2018-06-13 2018-12-25 北京三快在线科技有限公司 Business object information methods of exhibiting, device, electronic equipment and storage medium
CN110196936A (en) * 2019-04-19 2019-09-03 平安科技(深圳)有限公司 Search method, device and the storage medium and electronic device of project
CN110221891A (en) * 2019-05-17 2019-09-10 北京大米科技有限公司 A kind of draw data acquisition methods, device, storage medium and terminal

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040117361A1 (en) * 2002-08-16 2004-06-17 Greer Gary L. System and method for managing construction projects
CN108459890A (en) * 2017-02-20 2018-08-28 百度在线网络技术(北京)有限公司 Interface display method and device for application
CN108647063A (en) * 2018-03-16 2018-10-12 维沃移动通信有限公司 A kind of method and terminal of display object
CN109087159A (en) * 2018-06-13 2018-12-25 北京三快在线科技有限公司 Business object information methods of exhibiting, device, electronic equipment and storage medium
CN110196936A (en) * 2019-04-19 2019-09-03 平安科技(深圳)有限公司 Search method, device and the storage medium and electronic device of project
CN110221891A (en) * 2019-05-17 2019-09-10 北京大米科技有限公司 A kind of draw data acquisition methods, device, storage medium and terminal

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114383627A (en) * 2022-01-10 2022-04-22 重庆思骑科技有限公司 Riding navigation data display method and device

Also Published As

Publication number Publication date
CN111782883B (en) 2024-02-02

Similar Documents

Publication Publication Date Title
US11694215B2 (en) Systems and methods for managing web content
US20140129959A1 (en) Electronic publishing mechanisms
US10269033B2 (en) Expanded overlay state for campaign performance data snapshot cards
US20110231819A1 (en) Content Availability Determination, Representation And Acquisition System
CN107133001A (en) A kind of face singles impression method, device and client
US10360579B2 (en) Campaign performance data snapshot cards
CN112800370A (en) Business document processing method and device, computer equipment and storage medium
CN105573694A (en) Multiple display rendering of digital content
US20150302473A1 (en) Information processing system and information processing method
CN110506267A (en) The rendering of digital assembly background
US10210001B2 (en) Automatic execution of objects in a user interface
CN111782883B (en) View construction method and system
CN108153465A (en) Label setting method and device based on enterprise SaaS applications
CN113220381A (en) Click data display method and device
CN112486482A (en) Page display method and device
CN111191974B (en) Medicine inventory method and device
CN114255084A (en) Advertisement page display method, device and system
CN111222067B (en) Information generation method and device
CN113760279A (en) Method and device for generating page
CN114089995A (en) Page generation method, device, equipment and storage medium
CN112288461A (en) Advertisement information pushing method, device, medium and electronic equipment
CN109472592B (en) Method and device for managing virtual assets
CN112860858A (en) Method and device for answering questions
CN110032703A (en) A kind of enterprise web site trustship method and system
US11244021B2 (en) User interface for creating and managing URL parameters

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
GR01 Patent grant
GR01 Patent grant