CN115858972A - Page display method and device of application program, storage medium and computer equipment - Google Patents
Page display method and device of application program, storage medium and computer equipment Download PDFInfo
- Publication number
- CN115858972A CN115858972A CN202211704099.4A CN202211704099A CN115858972A CN 115858972 A CN115858972 A CN 115858972A CN 202211704099 A CN202211704099 A CN 202211704099A CN 115858972 A CN115858972 A CN 115858972A
- Authority
- CN
- China
- Prior art keywords
- page
- contact
- identifier
- head portrait
- name
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 66
- 238000012986 modification Methods 0.000 claims abstract description 47
- 230000004048 modification Effects 0.000 claims abstract description 47
- 238000004590 computer program Methods 0.000 claims description 13
- 238000012795 verification Methods 0.000 claims description 10
- 238000009877 rendering Methods 0.000 claims description 9
- 238000010586 diagram Methods 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 230000001360 synchronised effect Effects 0.000 description 3
- OKTJSMMVPCPJKN-UHFFFAOYSA-N Carbon Chemical compound [C] OKTJSMMVPCPJKN-UHFFFAOYSA-N 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 229910021389 graphene Inorganic materials 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000004806 packaging method and process Methods 0.000 description 1
- 238000012216 screening Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The application discloses a page display method and device of an application program, a storage medium and computer equipment, wherein the method comprises the following steps: responding to a starting signal of the application program, starting a page updating manager of the application program, and establishing a long link with the server so as to receive contact name modification data from the server through the long link; after a page is opened in an application program, the page opening information of the application program is registered in a page updating manager; when receiving contact name modification data from a server, acquiring a first contact identification and a latest name of a first contact in the contact name modification data; and acquiring a page identifier of a page where the page contact identifier matched with the first contact identifier is located from the opening page information as a target page identifier, and updating a page contact name displayed in a target opening page corresponding to the target page identifier based on the latest name of the first contact.
Description
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a method and an apparatus for displaying a page of an application program, a storage medium, and a computer device.
Background
Chat modules are most common in social and business apps, but because updating is frequent, contact names are complex operations all the time, but updating of names is important; when contact names exist in a plurality of pages, the contact names are modified, and the user experience is good when the contact names of the pages need to be changed at the same time.
At present, in an im session, a user uid is generally used to inquire user information such as a name again like a server side, so that the loading speed and the performance are poor, and the name is updated by an update App side at other terminals and cannot be updated immediately.
Disclosure of Invention
In view of this, the application provides a page display method and apparatus for an application, a storage medium, and a computer device, which can update names of contacts displayed in all open pages of the application in time, avoid the problem that the names of contacts of a server cannot be synchronized to a client in time after being updated, and the names of the latest contacts cannot be synchronously displayed on multiple pages, and improve user experience.
According to an aspect of the present application, there is provided a page display method of an application, the method including:
responding to a starting signal of an application program, starting a page updating manager of the application program, and establishing a long link with a server so as to receive contact name modification data from the server through the long link;
after a page is opened in the application program, registering opening page information of the application program in the page updating manager, wherein the opening page information comprises a page identifier of the opening page and a page contact identifier corresponding to a page contact contained in the opening page;
when contact name modification data from a server are received, acquiring a first contact identification and a latest name of a first contact in the contact name modification data;
and acquiring a page identifier of a page where the page contact identifier matched with the first contact identifier is located from the opening page information as a target page identifier, and updating the page contact name displayed in the target opening page corresponding to the target page identifier based on the latest name of the first contact.
Optionally, the registering, in the page update manager, open page information of the application program includes:
transmitting the opening page information of the application program into an entity class of the page updating manager, and adding the entity class into an entity class set of the page updating manager, wherein the entity class comprises a page identifier and a page contact identifier of the opening page;
the step of obtaining a page identifier of a page where the page contact identifier matched with the first contact identifier is located in the page opening information as a target page identifier, and updating a page contact name displayed in a target opening page corresponding to the target page identifier based on the latest name of the first contact comprises the steps of:
traversing the entity class set, and acquiring a page contact identifier as a page identifier corresponding to the first contact identifier as a target page identifier;
and acquiring a target entity class corresponding to the target page identifier, calling a name updating method of the target entity class, and transmitting the latest name of the first contact person into the name updating method to update the name of the page contact person displayed in a target opening page corresponding to the target page identifier.
Optionally, after the open page information of the application program is registered in the page update manager, the method further includes:
and when the opening page is closed, logging off the registration information of the closed page in the page updating manager.
Optionally, the method further comprises:
when a contact photo modification notification is received through the long link, generating a second contact photo data acquisition address based on a second contact identification indicated by the contact photo modification notification, and accessing the server through the second contact photo data acquisition address to acquire second contact network photo data;
and if the page contact person identification corresponding to the opened page comprises a second contact person identification, rendering the page contact person head portrait in the opened page based on the second contact person network head portrait data.
Optionally, the generating a second contact avatar data obtaining address based on the second contact identifier indicated by the contact avatar modification notification includes:
generating a second contact portrait data acquisition address based on a second contact identification, a server domain name, a check value and a second contact portrait update timestamp indicated by the contact portrait modification notification;
and when the server is accessed through the second contact portrait data acquisition address, the server returns the second contact portrait data to the client based on the timestamp after the verification of the verification value is passed.
Optionally, the second contact network avatar data includes an update time, a second contact identifier, and an avatar data body; after the acquiring of the second contact network avatar data, the method further comprises:
determining a new avatar update timestamp of the second contact based on the update time corresponding to the second contact network avatar data;
generating a new second contact head portrait data acquisition address based on the second contact identification, the server domain name, the check value and a new head portrait update timestamp of the second contact, taking the new second contact head portrait data acquisition address as key data of second contact local head portrait data, generating value data of the second contact local head portrait data based on a head portrait data body in the second contact network head portrait data, and generating a key value pair of the second contact local head portrait data according to the key data and the value data;
and storing the key-value pair of the second contact head portrait data in a cache and a database of the application program.
Optionally, the method further comprises:
after a page is opened in the application program, acquiring a page contact person identifier corresponding to a page contact person contained in the opened page, and generating a page contact person head portrait data acquisition address according to the page contact person identifier, a server domain name, a check value and a head portrait update timestamp of the page contact person;
acquiring an address based on the page contact person head portrait data, and reading local head portrait data of the page contact person in a cache of the application program;
if the page contact person local head portrait data is not read in the cache of the application program, acquiring an address based on the page contact person head portrait data, and reading the page contact person local head portrait data in a database of the application program;
if the page contact person network head portrait data is not read in the database of the application program, accessing the server through the page contact person head portrait data acquisition address to acquire page contact person network head portrait data, and storing the local head portrait data of the page contact person in the cache and the database of the application program based on the page contact person network head portrait data;
and rendering the head portrait of the page contact person in the opened page according to the local head portrait data of the page contact person or the network head portrait data of the page contact person.
According to another aspect of the present application, there is provided a page display apparatus of an application, the apparatus including:
the starting module is used for responding to a starting signal of an application program, starting a page updating manager of the application program, and establishing a long link with a server so as to receive contact name modification data from the server through the long link;
the registration module is used for registering open page information of the application program in the page updating manager after the page is opened in the application program, wherein the open page information comprises a page identifier of the open page and a page contact identifier corresponding to a page contact contained in the open page;
the name acquisition module is used for acquiring a first contact person identifier and a latest name of a first contact person in contact person name modification data when the contact person name modification data from a server are received;
and the name updating module is used for acquiring the page identifier of the page where the page contact identifier matched with the first contact identifier is located in the opening page information as a target page identifier, and updating the page contact name displayed in the target opening page corresponding to the target page identifier based on the latest name of the first contact.
Optionally, the registration module is further configured to:
transmitting the opening page information of the application program into an entity class of the page updating manager, and adding the entity class into an entity class set of the page updating manager, wherein the entity class comprises a page identifier and a page contact identifier of the opening page;
the name update module is further configured to:
traversing the entity class set, and acquiring a page contact identifier as a page identifier corresponding to the first contact identifier as a target page identifier;
and acquiring a target entity class corresponding to the target page identifier, calling a name updating method of the target entity class, and transmitting the latest name of the first contact person into the name updating method to update the name of the page contact person displayed in a target opening page corresponding to the target page identifier.
Optionally, the apparatus further comprises:
and the logout module is used for logging out the registration information of the closed page in the page update manager when the open page is closed.
Optionally, the apparatus further comprises:
the head portrait acquisition module is used for generating a second contact head portrait data acquisition address based on a second contact identification indicated by the contact head portrait modification notification when the contact head portrait modification notification is received through the long link, and accessing the server through the second contact head portrait data acquisition address to acquire second contact network head portrait data;
and the head portrait display module is used for rendering the head portrait of the page contact person in the opened page based on the network head portrait data of the second contact person if the page contact person identification corresponding to the opened page comprises the second contact person identification.
Optionally, the head portrait acquisition module is further configured to:
generating a second contact portrait data acquisition address based on a second contact identification, a server domain name, a check value and a second contact portrait update timestamp indicated by the contact portrait modification notification;
and when the server is accessed through the second contact portrait data acquisition address, the server returns the second contact portrait data to the client based on the timestamp after the verification of the verification value is passed.
Optionally, the second contact network avatar data includes update time, a second contact identifier, and an avatar data body; the head portrait acquisition module is further configured to:
determining a new avatar update timestamp of the second contact based on the update time corresponding to the second contact network avatar data;
generating a new second contact head portrait data acquisition address based on the second contact identification, the server domain name, the check value and a new head portrait update timestamp of the second contact, taking the new second contact head portrait data acquisition address as key data of second contact local head portrait data, generating value data of the second contact local head portrait data based on a head portrait data body in the second contact network head portrait data, and generating a key value pair of the second contact local head portrait data according to the key data and the value data;
and storing the key-value pairs of the second contact portrait data in a cache and a database of the application program.
Optionally, the starting module is further configured to, after a page is started in the application program, obtain a page contact identifier corresponding to a page contact included in the started page, and generate a page contact avatar data obtaining address according to the page contact identifier, a server domain name, a check value, and an avatar update timestamp of the page contact;
the head portrait acquisition module is further used for reading local head portrait data of the page contact in the cache of the application program based on the head portrait data acquisition address of the page contact; if the page contact person local head portrait data is not read in the cache of the application program, acquiring an address based on the page contact person head portrait data, and reading the page contact person local head portrait data in a database of the application program; if the page contact person network head portrait data is not read in the database of the application program, accessing the server through the page contact person head portrait data acquisition address to acquire page contact person network head portrait data, and storing the local head portrait data of the page contact person in the cache and the database of the application program based on the page contact person network head portrait data;
the head portrait display module is further configured to render the head portrait of the page contact in the open page according to the local head portrait data of the page contact or the network head portrait data of the page contact.
According to yet another aspect of the present application, there is provided a storage medium having stored thereon a computer program which, when executed by a processor, implements the page display method of the above application program.
According to yet another aspect of the present application, there is provided a computer device, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, the processor implementing the page display method of the application program when executing the program.
By means of the technical scheme, the page display method and device of the application program, the storage medium and the computer device start the page update manager while starting the application program, establish the long link with the server, register the opened page of the application program into the page update manager, and accordingly, when the contact name modification data is received, name update is conducted on the contact with the name update in the opened page through the page update manager. The method and the device for updating the contact names can timely update the contact names displayed in all the opened pages of the application program, avoid the problem that the contact names of the server cannot be timely synchronized to the client side after being updated and the latest contact names of a plurality of pages cannot be synchronously displayed, and improve user experience.
The foregoing description is only an overview of the technical solutions of the present application, and the present application can be implemented according to the content of the description in order to make the technical means of the present application more clearly understood, and the following detailed description of the present application is given in order to make the above and other objects, features, and advantages of the present application more clearly understandable.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a flowchart illustrating a page display method of an application according to an embodiment of the present application;
fig. 2 is a flow chart illustrating a contact name updating method provided by an embodiment of the present application;
FIG. 3 is a flow chart illustrating another method for updating contact names according to an embodiment of the present application;
fig. 4 is a flowchart illustrating a further contact name updating method provided by an embodiment of the present application;
FIG. 5 is a flowchart illustrating a page display method for another application according to an embodiment of the present disclosure;
fig. 6 shows a flowchart of a contact photo updating method provided by an embodiment of the present application;
fig. 7 is a flowchart illustrating another method for updating a contact photo according to an embodiment of the present application;
fig. 8 is a flowchart illustrating a further method for updating a contact photo according to an embodiment of the present application;
fig. 9 is a flowchart illustrating a further method for updating a contact photo according to an embodiment of the present application;
FIG. 10 is a schematic structural diagram illustrating a page display apparatus of an application according to an embodiment of the present application;
fig. 11 shows a schematic device structure diagram of a computer apparatus according to an embodiment of the present application.
Detailed Description
The present application will be described in detail below with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
In this embodiment, a method for displaying a page of an application program is provided, as shown in fig. 1, the method includes:
In the embodiment of the application, a page update manager is built in the application program of the session class, as shown in fig. 2, when the application program APP is started, the page update manager is started at the same time, and the page update manager is mainly responsible for sending notification to the opened page, so that the contact names in the page are updated. In addition, a long link between the application program and the server needs to be established, and the contact name modification data sent by the server is received in real time through the long link.
Then, when a page is opened in the application program, if the page is a page containing a contact name, the page can be considered as a page needing to be updated with the name, the page is registered in the page update manager, and the contact name in the registered page is managed through the page update manager. Page information registration is performed in the page manager every time a page is opened.
And 104, acquiring a page identifier of a page where the page contact identifier matched with the first contact identifier is located from the page opening information as a target page identifier, and updating the page contact name displayed in the target opening page corresponding to the target page identifier based on the latest name of the first contact.
And finally, when the contact name modification data from the server is received through long-chain connection with the server, acquiring the first contact identification and the latest name of the first contact in the received data. And if the first contact person identifier is contained, the page identifier of the page where the first contact person is located is obtained from the registration information and is used as the target page identifier, so that the name of the first contact person displayed in the target opening page corresponding to the target page identifier is updated to the latest name of the first contact person, and the name of the page contact person is timely and dynamically updated.
Optionally, step 102 comprises: transmitting the opening page information of the application program into an entity class of the page updating manager, and adding the entity class into an entity class set of the page updating manager, wherein the entity class comprises a page identifier and a page contact identifier of the opening page; step 104 comprises: traversing the entity class set, and acquiring a page contact identifier as a page identifier corresponding to the first contact identifier as a target page identifier; and acquiring a target entity class corresponding to the target page identifier, calling a name updating method of the target entity class, and transmitting the latest name of the first contact person into the name updating method to update the name of the page contact person displayed in a target opening page corresponding to the target page identifier.
In this embodiment, as shown in fig. 3, when a page is started, page information needs to be registered in a "page update manager", a model entity class needs to be introduced, where there are two attributes in the model class, one is uid to represent a contact id, and one is page name, and the model class is added to a list < model > entity class set; when the websocket long chain receives the notification of the name modification of the contact, the server sends two parameters, namely uid represents the id (identification) of the contact and name (the latest name of the contact), namely the updated name. After receiving the notification, traversing a list < model > set in a "page update manager", screening out all page names, namely target page identifiers, in a model. Calling an update method of an updateName name in a page entity class, and transmitting a latest name of a first contact of a websocket name; uid is now associated with the web, all names displayed in the page are modified to the latest contact name. The page class of the update name must inherit basepage, an update name interface method in the basepage is updateName (String name), and the parameter name is the latest contact name.
In the embodiment of the present application, optionally, the method further includes: and when the open page is closed, logging off the registration information of the closed page in the page updating manager.
In this embodiment, as shown in fig. 4, when a page has a need for updating a name, the page information is registered in a contact name updating service; when monitoring that the name is updated, notifying the name updating service, and notifying the specific n pages to update the name data by the name updating service; when the page is closed or destroyed, then the list < model > set in the name listening service removes the model.
By applying the technical scheme of the embodiment, the page update manager is started while the application program is started, the long link is established with the server, and the opened page of the application program is registered in the page update manager, so that the name of the contact with the name update in the opened page is updated by the page update manager when the contact name modification data is received. The method and the device for updating the contact names can timely update the contact names displayed in all the opened pages of the application program, avoid the problem that the contact names of the server cannot be timely synchronized to the client side after being updated and the latest contact names of a plurality of pages cannot be synchronously displayed, and improve user experience.
Further, as a refinement and an extension of the specific implementation of the embodiment, in order to fully explain the specific implementation process of the embodiment, another page display method of an application program is provided, as shown in fig. 5, the method includes:
And 204, if the page contact person head portrait data is not read in the database of the application program, accessing the server through the page contact person head portrait data acquisition address, acquiring page contact person network head portrait data, and storing the page contact person local head portrait data into the cache and the database of the application program based on the page contact person network head portrait data.
In this embodiment, as shown in fig. 6, the avatar is displayed with a caching mechanism, and is not downloaded from the network every time, and after the avatar data is downloaded from the network every time, the data is stored in the cache of the application program and the database of the application program. After the application program opens the page, the url address of the head portrait download is spliced by using the uid of the page contact person contained in the page, the local head portrait data of the page contact person is preferentially acquired in the cache and the database, if the local head portrait data cannot be acquired, the head portrait data is downloaded from the server, and after the head portrait data is successfully downloaded, the head portrait data is stored in the app cache and the sqlite database. The cached key is the url address, and the cached value is the byte [ ] array.
When a page needs to be loaded with a head portrait, generating a page contact head portrait data acquisition address url by using a page contact person identifier, a server domain name, a check value and a head portrait updating timestamp of the page contact person, searching the spliced url in an app cache, and searching from an sqlite database if the address url cannot be found, or downloading from a network if the address url cannot be found; after the network downloading is successful, the byte [ ] arrays can be simultaneously stored into an app cache and an sqlite database; if the byte array does not exist in the app cache and the database exists, returning the information of the byte array of the database to ui display, and storing the information into the app cache so as to be convenient for being used and taken; the data structure of the app cache is hash map < String, byte [ ] >, key is url, and value is byte [ ] array.
In this embodiment, as shown in fig. 7, through long link connection with the server, the application program can also receive a contact avatar modification notification sent by the server, and after receiving the avatar modification notification, does not need the server to return an avatar address, and does not need the app end to actively call an interface to query; but the url address of one head portrait is locally spliced by using the second contact person identification uid indicated by the contact person head portrait modification notice, so that the method is fast and efficient.
Optionally, step 206 comprises: generating a second contact portrait data acquisition address based on a second contact identification, a server domain name, a check value and a second contact portrait update timestamp indicated by the contact portrait modification notification; and when the server is accessed through the second contact portrait data acquisition address, the server returns the second contact portrait data to the client based on the timestamp after the verification of the verification value is passed.
In this embodiment, as shown in fig. 8, the rule of avatar stitching is: starting with https, transmitting a server domain name and adding a key, wherein the key is mainly used for verifying whether an app end is safe or not by the server; face is a fixed string; uid denotes a contact id; the time represents the time stamp of the avatar update, and is mainly used for the server side to judge whether the avatar update exists, and if the time stamp of the avatar update does not exist locally, the time stamp is 0. When the head portrait requests, the server side with time of 0 returns code value of 200, which indicates that the latest head portrait information (head portrait byte [ ] array and uid information) is returned; when the code value is 202, the time value is not null, if the time stamp of the avatar updated by the server is less than or equal to the incoming time stamp, which indicates that no avatar is updated, the server does not return the byte array any more; when the time stamp of the server-side update avatar is larger than the incoming time stamp, this indicates that there is an avatar update, and the time timestamp and the byte [ ] data of the avatar are returned, the app-side updates the avatar. When the head portrait is updated, the server side issues the updated contact person uid and the updated timestamp to the app side in a packaging mode, and the update is issued only once within one minute; the app side can splice the head portrait download address according to the contact person uid and the timestamp.
And step 207, determining a new avatar update time stamp of the second contact based on the update time corresponding to the second contact network avatar data.
And 208, generating a new second contact head portrait data acquisition address based on the second contact identification, the server domain name, the check value and a new head portrait update timestamp of the second contact, taking the new second contact head portrait data acquisition address as key data of second contact local head portrait data, generating value data of the second contact local head portrait data based on a head portrait data body in the second contact network head portrait data, and generating a key value pair of the second contact local head portrait data according to the key data and the value data.
And step 209, storing the key-value pair of the second contact portrait data in a cache and a database of the application program.
In this embodiment, as shown in fig. 9, after obtaining the network avatar data of the second contact from the server, the avatar data is stored as the local avatar data of the second contact, so that when the second contact needs to be displayed with an avatar later, the avatar data can be directly used for rendering the avatar. Specifically, a new second contact head portrait data acquisition address url is generated according to the second contact identification, the server domain name, the check value and a new head portrait update timestamp of the second contact, the head portrait data is stored in a cache and a database in a key-value pair mode, wherein the key is the new second contact head portrait data acquisition address, and the value is a head portrait data body. Therefore, when the avatar is required to be displayed, the avatar picture loader of the application program is used for loading the app cache first, then loading the sqlite database cache and finally downloading the avatar data through the network, and the avatar data downloaded through the network can be stored in the app cache and the sqlite database cache. When the head portrait is updated in the server, the server notifies the app end, and the app end updates the app cache and the database cache data.
Further, as a specific implementation of the method in fig. 1, an embodiment of the present application provides a page display apparatus for an application program, and as shown in fig. 10, the apparatus includes:
the starting module is used for responding to a starting signal of an application program, starting a page updating manager of the application program, and establishing a long link with a server so as to receive contact name modification data from the server through the long link;
the registration module is used for registering open page information of the application program in the page updating manager after the page is opened in the application program, wherein the open page information comprises a page identifier of the open page and a page contact identifier corresponding to a page contact contained in the open page;
the name acquisition module is used for acquiring a first contact person identifier and a latest name of a first contact person in the contact person name modification data when receiving the contact person name modification data from the server;
and the name updating module is used for acquiring the page identifier of the page where the page contact identifier matched with the first contact identifier is located in the opening page information as a target page identifier, and updating the page contact name displayed in the target opening page corresponding to the target page identifier based on the latest name of the first contact.
Optionally, the registration module is further configured to:
transmitting the information of the opened page of the application program into an entity class of the page update manager, and adding the entity class into an entity class set of the page update manager, wherein the entity class comprises a page identifier and a page contact identifier of the opened page;
the name update module is further configured to:
traversing the entity class set, and acquiring a page contact identifier as a page identifier corresponding to the first contact identifier as a target page identifier;
and acquiring a target entity class corresponding to the target page identifier, calling a name updating method of the target entity class, and transmitting the latest name of the first contact person into the name updating method to update the name of the page contact person displayed in a target opening page corresponding to the target page identifier.
Optionally, the apparatus further comprises:
and the logout module is used for logging out the registration information of the closed page in the page update manager when the open page is closed.
Optionally, the apparatus further comprises:
the head portrait acquisition module is used for generating a second contact head portrait data acquisition address based on a second contact identification indicated by the contact head portrait modification notification when the contact head portrait modification notification is received through the long link, and accessing the server through the second contact head portrait data acquisition address to acquire second contact network head portrait data;
and the head portrait display module is used for rendering the head portrait of the page contact person in the opened page based on the network head portrait data of the second contact person if the page contact person identification corresponding to the opened page comprises the second contact person identification.
Optionally, the head portrait acquisition module is further configured to:
generating a second contact portrait data acquisition address based on a second contact identification, a server domain name, a check value and a second contact portrait update timestamp indicated by the contact portrait modification notification;
and when the server is accessed through the second contact portrait data acquisition address, the server returns the second contact portrait data to the client based on the timestamp after the verification of the verification value is passed.
Optionally, the second contact network avatar data includes an update time, a second contact identifier, and an avatar data body; the head portrait acquisition module is further configured to:
determining a new avatar update timestamp of the second contact based on the update time corresponding to the second contact network avatar data;
generating a new second contact head portrait data acquisition address based on the second contact identification, the server domain name, the check value and a new head portrait update timestamp of the second contact, taking the new second contact head portrait data acquisition address as key data of second contact local head portrait data, generating value data of the second contact local head portrait data based on a head portrait data body in the second contact network head portrait data, and generating a key value pair of the second contact local head portrait data according to the key data and the value data;
and storing the key-value pairs of the second contact portrait data in a cache and a database of the application program.
Optionally, the starting module is further configured to, after a page is started in the application program, obtain a page contact identifier corresponding to a page contact included in the started page, and generate a page contact avatar data obtaining address according to the page contact identifier, a server domain name, a check value, and an avatar update timestamp of the page contact;
the head portrait acquisition module is further used for reading local head portrait data of the page contact in the cache of the application program based on the head portrait data acquisition address of the page contact; if the page contact person local head portrait data is not read in the cache of the application program, acquiring an address based on the page contact person head portrait data, and reading the page contact person local head portrait data in a database of the application program; if the page contact person network head portrait data is not read in the database of the application program, accessing the server through the page contact person head portrait data acquisition address to acquire page contact person network head portrait data, and storing the local head portrait data of the page contact person in the cache and the database of the application program based on the page contact person network head portrait data;
the head portrait display module is further configured to render the head portrait of the page contact in the open page according to the local head portrait data of the page contact or the network head portrait data of the page contact.
It should be noted that other corresponding descriptions of the functional units related to the page display device of the application provided in the embodiment of the present application may refer to the corresponding descriptions in the methods in fig. 1 to fig. 9, and are not described herein again.
An embodiment of the present application further provides a computer device, which may specifically be a personal computer, a server, a network device, and the like, as shown in fig. 11, the computer device includes a bus, a processor, a memory, and a communication interface, and may further include an input/output interface and a display device. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used to store location information. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement the steps in the method embodiments.
Those skilled in the art will appreciate that the architecture shown in fig. 11 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer-readable storage medium, which may be non-volatile or volatile, having a computer program stored thereon, which, when executed by a processor, performs the steps in the above-described method embodiments, is provided.
In an embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, carries out the steps in the method embodiments described above.
It should be noted that, the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, presented data, etc.) referred to in the present application are information and data authorized by the user or sufficiently authorized by each party.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, databases, or other media used in the embodiments provided herein can include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high-density embedded nonvolatile Memory, resistive Random Access Memory (ReRAM), magnetic Random Access Memory (MRAM), ferroelectric Random Access Memory (FRAM), phase Change Memory (PCM), graphene Memory, and the like. Volatile Memory can include Random Access Memory (RAM), external cache Memory, and the like. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others. The databases referred to in various embodiments provided herein may include at least one of relational and non-relational databases. The non-relational database may include, but is not limited to, a block chain based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, quantum computing based data processing logic devices, etc., without limitation.
All possible combinations of the technical features in the above embodiments may not be described for the sake of brevity, but should be considered as being within the scope of the present disclosure as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.
Claims (10)
1. A method for displaying a page of an application program, the method comprising:
responding to a starting signal of an application program, starting a page updating manager of the application program, and establishing a long link with a server so as to receive contact name modification data from the server through the long link;
after a page is opened in the application program, registering opening page information of the application program in the page updating manager, wherein the opening page information comprises a page identifier of the opening page and a page contact identifier corresponding to a page contact contained in the opening page;
when contact name modification data from a server are received, acquiring a first contact identification and a latest name of a first contact in the contact name modification data;
and acquiring a page identifier of a page where the page contact identifier matched with the first contact identifier is located from the opening page information as a target page identifier, and updating the page contact name displayed in the target opening page corresponding to the target page identifier based on the latest name of the first contact.
2. The method of claim 1, wherein registering open page information of the application in the page update manager comprises:
transmitting the opening page information of the application program into an entity class of the page updating manager, and adding the entity class into an entity class set of the page updating manager, wherein the entity class comprises a page identifier and a page contact identifier of the opening page;
the acquiring, from the open page information, a page identifier of a page where the page contact identifier matched with the first contact identifier is located as a target page identifier, and updating, based on the latest name of the first contact, a page contact name displayed in a target open page corresponding to the target page identifier, includes:
traversing the entity class set, and acquiring a page contact identifier as a page identifier corresponding to the first contact identifier as a target page identifier;
and acquiring a target entity class corresponding to the target page identifier, calling a name updating method of the target entity class, and transmitting the latest name of the first contact person into the name updating method to update the name of the page contact person displayed in a target opening page corresponding to the target page identifier.
3. The method of claim 1, wherein after registering open page information of the application in the page update manager, the method further comprises:
and when the opening page is closed, logging off the registration information of the closed page in the page updating manager.
4. The method according to any one of claims 1 to 3, further comprising:
when a contact photo modification notification is received through the long link, generating a second contact photo data acquisition address based on a second contact identification indicated by the contact photo modification notification, and accessing the server through the second contact photo data acquisition address to acquire second contact network photo data;
and if the page contact person identification corresponding to the opened page comprises a second contact person identification, rendering the page contact person head portrait in the opened page based on the second contact person network head portrait data.
5. The method of claim 4, wherein generating a second contact avatar data acquisition address based on a second contact identification indicated by the contact avatar modification notification comprises:
generating a second contact portrait data acquisition address based on a second contact identification, a server domain name, a check value and a second contact portrait update timestamp indicated by the contact portrait modification notification;
and when the server is accessed through the second contact portrait data acquisition address, the server returns the second contact portrait data to the client based on the timestamp after the verification of the verification value is passed.
6. The method of claim 4, wherein the second contact network avatar data includes an update time, a second contact identification, and an avatar data body; after the acquiring of the second contact network avatar data, the method further comprises:
determining a new avatar update timestamp of the second contact based on the update time corresponding to the second contact network avatar data;
generating a new second contact head portrait data acquisition address based on the second contact identification, the server domain name, the check value and a new head portrait update timestamp of the second contact, taking the new second contact head portrait data acquisition address as key data of second contact local head portrait data, generating value data of the second contact local head portrait data based on a head portrait data body in the second contact network head portrait data, and generating a key value pair of the second contact local head portrait data according to the key data and the value data;
and storing the key-value pairs of the second contact portrait data in a cache and a database of the application program.
7. The method of claim 6, further comprising:
after a page is opened in the application program, acquiring a page contact person identifier corresponding to a page contact person contained in the opened page, and generating a page contact person head portrait data acquisition address according to the page contact person identifier, a server domain name, a check value and a head portrait update timestamp of the page contact person;
acquiring an address based on the page contact person head portrait data, and reading local head portrait data of the page contact person in a cache of the application program;
if the page contact person local head portrait data is not read in the cache of the application program, reading the page contact person local head portrait data in a database of the application program based on the page contact person head portrait data acquisition address;
if the page contact person network head portrait data is not read in the database of the application program, accessing the server through the page contact person head portrait data acquisition address to acquire page contact person network head portrait data, and storing the local head portrait data of the page contact person in the cache and the database of the application program based on the page contact person network head portrait data;
and rendering the head portrait of the page contact person in the opened page according to the local head portrait data of the page contact person or the network head portrait data of the page contact person.
8. An apparatus for displaying a page of an application, the apparatus comprising:
the starting module is used for responding to a starting signal of an application program, starting a page updating manager of the application program, and establishing a long link with a server so as to receive contact name modification data from the server through the long link;
the registration module is used for registering opening page information of the application program in the page updating manager after the page is opened in the application program, wherein the opening page information comprises a page identifier of the opening page and a page contact identifier corresponding to a page contact contained in the opening page;
the name acquisition module is used for acquiring a first contact person identifier and a latest name of a first contact person in the contact person name modification data when receiving the contact person name modification data from the server;
and the name updating module is used for acquiring the page identifier of the page where the page contact identifier matched with the first contact identifier is located in the opening page information as a target page identifier, and updating the page contact name displayed in the target opening page corresponding to the target page identifier based on the latest name of the first contact.
9. A storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method of any of claims 1 to 7.
10. A computer device comprising a storage medium, a processor and a computer program stored on the storage medium and executable on the processor, characterized in that the processor implements the method of any one of claims 1 to 7 when executing the computer program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211704099.4A CN115858972B (en) | 2022-12-29 | 2022-12-29 | Page display method and device of application program, storage medium and computer equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211704099.4A CN115858972B (en) | 2022-12-29 | 2022-12-29 | Page display method and device of application program, storage medium and computer equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115858972A true CN115858972A (en) | 2023-03-28 |
CN115858972B CN115858972B (en) | 2024-09-10 |
Family
ID=85655772
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211704099.4A Active CN115858972B (en) | 2022-12-29 | 2022-12-29 | Page display method and device of application program, storage medium and computer equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115858972B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116302212A (en) * | 2023-05-25 | 2023-06-23 | 广州市千钧网络科技有限公司 | Method, device, equipment and storage medium for refreshing application embedded HTML page |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103135910A (en) * | 2011-11-25 | 2013-06-05 | 腾讯科技(深圳)有限公司 | Method of editing information of contactors and device using the same |
US20140215006A1 (en) * | 2013-01-29 | 2014-07-31 | Vikas Gupta | Techniques for contact exporting |
CN108243252A (en) * | 2018-01-10 | 2018-07-03 | 上海展扬通信技术有限公司 | The method and terminal, computer readable storage medium that contact head image synchronizes |
CN114547507A (en) * | 2022-02-22 | 2022-05-27 | 北京达佳互联信息技术有限公司 | Information display method and device, server, electronic equipment and storage medium |
-
2022
- 2022-12-29 CN CN202211704099.4A patent/CN115858972B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103135910A (en) * | 2011-11-25 | 2013-06-05 | 腾讯科技(深圳)有限公司 | Method of editing information of contactors and device using the same |
US20140215006A1 (en) * | 2013-01-29 | 2014-07-31 | Vikas Gupta | Techniques for contact exporting |
CN108243252A (en) * | 2018-01-10 | 2018-07-03 | 上海展扬通信技术有限公司 | The method and terminal, computer readable storage medium that contact head image synchronizes |
CN114547507A (en) * | 2022-02-22 | 2022-05-27 | 北京达佳互联信息技术有限公司 | Information display method and device, server, electronic equipment and storage medium |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116302212A (en) * | 2023-05-25 | 2023-06-23 | 广州市千钧网络科技有限公司 | Method, device, equipment and storage medium for refreshing application embedded HTML page |
Also Published As
Publication number | Publication date |
---|---|
CN115858972B (en) | 2024-09-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112559927B (en) | Webpage loading method and device | |
US8112537B2 (en) | Trickle sync protocol | |
CN113886743B (en) | Method, device and system for refreshing cache resources | |
CN112241298A (en) | Page display method and device, storage medium and electronic device | |
CN115858972B (en) | Page display method and device of application program, storage medium and computer equipment | |
US20070288591A1 (en) | Method, system, and program product for caching application data in a browser cache | |
CN107844488A (en) | Data query method and apparatus | |
CN113271364B (en) | Sharing system, method, computer device and storage medium of service arrangement data | |
CN114218156A (en) | Data export method, data export device, computer equipment and storage medium | |
CN112926002A (en) | Service request processing method and device | |
US11769143B1 (en) | System and method for high performance providing fresh NFT metadata | |
CN116501344A (en) | Page updating method and device | |
CN116488986A (en) | Event-driven message touch method, system and device and storage medium | |
CN112417508B (en) | Data desensitization method, data storage system, storage medium and server | |
CN108008984A (en) | A kind of resource file downloading updating method and device | |
CN116662143A (en) | Test method, apparatus, device, storage medium and computer program product | |
CN113364875B (en) | Method, apparatus and computer readable storage medium for accessing data at block link points | |
CN116562862A (en) | Request anti-reprocessing method and device, storage medium and computer equipment | |
CN116055186A (en) | Access authentication method, device, computer equipment and storage medium | |
CN118092972A (en) | Thermal updating method, thermal updating device, computer equipment and storage medium | |
CN114943045A (en) | Terminal webpage loading method and device based on offline cache and computer equipment | |
CN115758000A (en) | Application data display method, device, equipment, medium and product | |
CN116661657A (en) | Message transmission method, apparatus, computer device, storage medium, and computer program product | |
CN118660083A (en) | Data access method and related device | |
CN115640321A (en) | Data query method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |