CN116339767B - Application resource allocation method, device, computer equipment and storage medium - Google Patents

Application resource allocation method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN116339767B
CN116339767B CN202210505247.3A CN202210505247A CN116339767B CN 116339767 B CN116339767 B CN 116339767B CN 202210505247 A CN202210505247 A CN 202210505247A CN 116339767 B CN116339767 B CN 116339767B
Authority
CN
China
Prior art keywords
applet
resource
update
updated
updating
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210505247.3A
Other languages
Chinese (zh)
Other versions
CN116339767A (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.)
Yunnan Nantian Electronics Information Corp ltd
GUANGZHOU NANTIAN COMPUTER SYSTEM CO Ltd
Original Assignee
Yunnan Nantian Electronics Information Corp ltd
GUANGZHOU NANTIAN COMPUTER SYSTEM 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 Yunnan Nantian Electronics Information Corp ltd, GUANGZHOU NANTIAN COMPUTER SYSTEM CO Ltd filed Critical Yunnan Nantian Electronics Information Corp ltd
Priority to CN202210505247.3A priority Critical patent/CN116339767B/en
Publication of CN116339767A publication Critical patent/CN116339767A/en
Application granted granted Critical
Publication of CN116339767B publication Critical patent/CN116339767B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Stored Programmes (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application relates to an application resource configuration method, an application resource configuration device, a computer device, a storage medium and a computer program product. The method comprises the following steps: responding to the opening operation of the applet, and sending an update resource acquisition request of the applet to a server when the state to be updated of the applet meets a preset condition; receiving resource positioning information returned by a server side aiming at an updated resource acquisition request; the resource positioning information comprises a time stamp and a resource downloading link; acquiring application updating resources corresponding to the applet by adopting a time stamp and a resource downloading link through a preset resource distribution network; receiving a designated check value sent by a server for updating the resource of the application, checking the updated resource of the application according to the designated check value, updating the applet by the updated resource of the application after the check is passed, and starting the updated applet. By adopting the method, the resource updating of the applet based on the resource distribution network configuration is realized, and the timeliness of the applet updating is improved.

Description

Application resource allocation method, device, computer equipment and storage medium
Technical Field
The present invention relates to the field of internet technologies, and in particular, to an application resource allocation method, an apparatus, a computer device, a storage medium, and a computer program product.
Background
At present, when a user opens an applet, version update checking can be performed on the opened applet in the background, if the applet is checked to have a new version, the background silently downloads new version resources, so that when the user opens the applet next time, the new version resources acquired by the current version update checking are used for performing applet version update.
Because the applet version used by the user for opening the applet each time is the version downloaded by the user when opening the applet last time, if the uploaded latest version resource exists between the last exiting applet and the currently opened applet, the latest version cannot be used in the current applet opening process and can be used when waiting for the next applet opening.
Therefore, the related art has a problem that the timeliness of the applet update is poor.
Disclosure of Invention
In view of the foregoing, it is desirable to provide an application resource allocation method, apparatus, computer device, storage medium, and computer program product that can solve the foregoing problems.
In a first aspect, the present application provides an application resource allocation method, where the method includes:
Responding to an applet starting operation, and sending an applet updating resource acquisition request to a server when the state to be updated of the applet meets a preset condition;
receiving resource positioning information returned by the server side aiming at the updated resource acquisition request; the resource positioning information comprises a time stamp and a resource downloading link;
acquiring application update resources corresponding to the applet through a preset resource distribution network by adopting the time stamp and the resource download link;
and receiving a specified check value sent by the server and aiming at the application updating resource, checking the application updating resource according to the specified check value, updating the applet by adopting the application updating resource after the check is passed, and starting the updated applet.
In one embodiment, the responding to the opening operation of the applet sends an update resource obtaining request of the applet to a server when the state to be updated of the applet meets a preset condition, including:
responding to an applet starting operation, and acquiring update state configuration information of the applet when detecting that historical version information exists in the applet; the update state configuration information comprises a state configuration field and an update mode field;
Determining the state to be updated of the applet according to the state configuration field and the update mode field;
and when the state to be updated is that the updated resources are acquired in real time, transmitting an updated resource acquisition request of the small program to the server.
In one embodiment, after the step of receiving the resource location information returned by the server for the updated resource acquisition request, the method further includes:
acquiring an effective time range of the resource downloading link, and establishing a corresponding relation between the effective time range and the resource downloading link;
the method further comprises the steps of:
when the small program is detected to be cold started, if the current time does not exceed the effective time range, the timestamp and the resource downloading link are adopted, and the latest application resource corresponding to the small program is obtained through a preset resource distribution network.
In a second aspect, the present application provides another method for configuring application resources, where the method includes:
receiving an updated resource acquisition request sent by a user terminal; the update resource acquisition request is generated when the state to be updated of the applet meets a preset condition by the user side in response to the applet starting operation;
Generating resource positioning information for the applet according to the updated resource acquisition request; the resource positioning information comprises a time stamp and a resource downloading link;
and sending the resource positioning information to the user side so that the user side adopts the time stamp and the resource downloading link, obtains application updating resources corresponding to the applet through a preset resource distribution network, adopts the application updating resources to update the applet after verification is passed, and starts the updated applet.
In one embodiment, before the step of receiving the update resource acquisition request sent by the ue, the method further includes:
when an applet resource release event is detected, uploading the release resource of the applet resource release event to a preset resource distribution network;
adding configuration information corresponding to the current release resource into an applet distribution configuration table; the applet distribution configuration table comprises resource configuration information corresponding to each of a plurality of applets, wherein the resource configuration information comprises a download path corresponding to the published resource, a version identifier and a specified check value;
The generating resource positioning information for the applet according to the updated resource acquisition request includes:
taking the applet corresponding to the applet identification in the updated resource acquisition request as a target applet, and acquiring resource configuration information of the target applet from the applet distribution configuration table;
and generating the resource downloading link according to the downloading path and the version identifier corresponding to the latest release resource in the resource configuration information of the target applet.
In a third aspect, the present application further provides an application resource allocation apparatus, where the apparatus includes:
the resource acquisition request sending module is used for responding to the opening operation of the small program, and sending the update resource acquisition request of the small program to the server side when the state to be updated of the small program meets the preset condition;
the resource positioning information receiving module is used for receiving the resource positioning information returned by the server side aiming at the updated resource acquisition request; the resource positioning information comprises a time stamp and a resource downloading link;
the application updating resource acquisition module is used for acquiring application updating resources corresponding to the applet through a preset resource distribution network by adopting the time stamp and the resource downloading link;
And the updating application starting module is used for receiving the appointed check value which is sent by the server and aims at the application updating resource, checking the application updating resource according to the appointed check value, adopting the application updating resource to update the applet after the check is passed, and starting the updated applet.
In a fourth aspect, the present application further provides another application resource allocation apparatus, where the apparatus includes:
the resource acquisition request receiving module is used for receiving an update resource acquisition request sent by a user side; the update resource acquisition request is generated when the state to be updated of the applet meets a preset condition by the user side in response to the applet starting operation;
the resource positioning information generation module is used for generating resource positioning information aiming at the small program according to the updated resource acquisition request; the resource positioning information comprises a time stamp and a resource downloading link;
and the resource positioning information sending module is used for sending the resource positioning information to the user side, so that the user side adopts the time stamp and the resource downloading link, obtains application updating resources corresponding to the applet through a preset resource distribution network, updates the applet by adopting the application updating resources after verification is passed, and starts the updated applet.
In a fifth aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program, and a processor implementing the steps of the application resource allocation method according to the first aspect and/or the steps of the application resource allocation method according to the second aspect when the computer program is executed.
In a sixth aspect, the present application also provides a computer-readable storage medium. The computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of the application resource allocation method as described in the first aspect and/or the steps of the application resource allocation method as described in the second aspect.
In a seventh aspect, the present application also provides a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the steps of the application resource allocation method as described in the first aspect and/or the steps of the application resource allocation method as described in the second aspect.
According to the application resource configuration method, the device, the computer equipment, the storage medium and the computer program product, when the state to be updated of the applet meets the preset condition by responding to the applet starting operation, the updated resource acquisition request of the applet is sent to the server, then the resource positioning information returned by the server for the updated resource acquisition request is received, the resource positioning information comprises a time stamp and a resource downloading link, further the application updated resource corresponding to the applet is acquired through a preset resource distribution network by adopting the time stamp and the resource downloading link, the designated check value sent by the server for the application updated resource is received, the application updated resource is checked according to the designated check value, the updated applet is started after the check is passed, the application updated resource is updated, the configuration of the applet updated resource based on the resource distribution network is realized, a user can use the latest version in time when opening the applet, and the update timeliness of the applet is improved.
Drawings
FIG. 1 is a flow chart of a method for configuring application resources in one embodiment;
FIG. 2a is a schematic diagram of an application resource configuration interaction flow I in one embodiment;
FIG. 2b is a diagram of a first flow of applet resource updates in one embodiment;
FIG. 2c is a diagram illustrating a second flow of applet resource update in one embodiment;
FIG. 2d is a schematic diagram of an application resource configuration interaction flow II in one embodiment;
FIG. 3 is a flow diagram of another method of application resource allocation in one embodiment;
FIG. 4 is a schematic diagram of an application resource configuration interaction flow III in one embodiment;
FIG. 5 is a block diagram of an application resource allocation apparatus in one embodiment;
FIG. 6 is a block diagram of another application resource allocation apparatus in one embodiment;
FIG. 7 is an internal block diagram of a computer device in one embodiment;
FIG. 8 is an internal block diagram of another computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for presentation, analyzed data, etc.) related in the present application are both information and data authorized by the user or sufficiently authorized by each party; correspondingly, the application also provides a corresponding user authorization entry for the user to select authorization or select rejection.
In one embodiment, as shown in fig. 1, an application resource allocation method is provided, and the method is applied to a user terminal for illustration, and the method includes the following steps:
step 101, responding to an applet starting operation, and sending an applet updating resource acquisition request to a server when the state to be updated of the applet meets a preset condition;
as an example, the client-side host application may have an applet therein, such as an applet that may be opened by the host application client.
In practical application, the user side can respond to the opening operation of the applet to update and check the applet, and then can send the update resource acquisition request of the applet to the server side when the state to be updated of the applet meets the preset condition, for example, the resource package update call can be performed on the server side interface.
Specifically, as shown in fig. 2a, when detecting that the user opens the applet, the user side may perform a resource package update check for the current applet, and may perform a resource package update call for the service server AP, for example, send an update resource acquisition request to acquire the latest version resource of the current applet.
In an example, for a commonly used applet that is more used by a user (e.g., has a high frequency of use), the user start user terminal may be used as a start operation corresponding to the commonly used applet, so that the call data of the commonly used applet is acquired in the process of starting the user terminal, the call quantity of the acquired data interface triggered by the applet entry may be reduced, so that based on the previously acquired call data of the commonly used applet, the waiting time of the user at the applet entry interface may be reduced, and the use efficiency of the applet may be improved.
102, receiving resource positioning information returned by the server for the updated resource acquisition request;
the resource location information may include a timestamp and a resource download link, such as a CDN (Content Delivery Network ) anti-hotlink carrying a timestamp, and the CDN download link may be generated by the server based on an anti-hotlink algorithm, so that the CDN anti-hotlink carrying the timestamp may be sent to the client, such as https:// xxxxxx/filename secret=md 5hash & wstime=t (valid within 30 minutes).
In a specific implementation, the user side may receive the resource positioning information returned by the server side for the updated resource acquisition request, where the resource positioning information may include a timestamp and a resource download link, so as to further use the resource download link to acquire the updated resource of the required applet through the resource distribution network.
For example, as shown in fig. 2a, after receiving the update resource acquisition request, the service server AP (i.e., the server) may perform a resource packet download check for the current applet corresponding to the update resource acquisition request, and may generate a CDN download link based on an anti-hotlinking algorithm, so as to send a CDN timestamp hotlink (i.e., resource location information) to the client.
Step 103, acquiring application update resources corresponding to the applet through a preset resource distribution network by adopting the time stamp and the resource download link;
after receiving the resource positioning information, the user side can orient to a preset resource distribution network according to the resource downloading link, and can acquire application updating resources corresponding to the applet from the resource distribution network after the node in the resource distribution network performs anti-theft authentication based on the time stamp.
Specifically, as shown in fig. 2a, the user side may redirect to the CDN through https according to the returned CDN timestamp anti-hotlinking, and then the CDN node may perform anti-hotlinking authentication based on the timestamp, and may return the applet resource package obtained according to the CDN download link to the user side, so that the user side obtains the application update resource corresponding to the applet.
For example, each download request for accessing the CDN resources may be authenticated by the CDN node, e.g., a security measure combining a base authentication User-Agent User Agent with a timestamp hotlink may be used.
In an example, in the conventional method, the resource package of the applet is stored in the NAS cluster, before the user opens the applet, the download interface needs to be called, but a large amount of bandwidth is consumed for a large amount of download, and at the same time, the Input/Output (IO) pressure of the NAS cluster is also large, and as the number of applets increases, the bandwidth and the IO become performance bottlenecks gradually. In this embodiment, static resources can be deployed at a source station and hosted on a CDN server based on dynamic and static separation processing on an applet platform, so that content distribution of a resource package can be performed by using the CDN (i.e., a preset resource distribution network), so that the bandwidth pressure of a capacity expansion server can be greatly reduced, and the time for a user to open an applet can be shortened.
In an alternative embodiment, the hosted resource packet file may be encrypted and saved, for example, the resource packet sent up to the CDN node may be encrypted and saved at the application layer by using an encryption algorithm (e.g., using advanced symmetric encryption AES), and the user side may verify the returned resource packet according to the MD5 value returned by the server interface.
Step 104, receiving a specified check value sent by the server and aiming at the application updating resource, checking the application updating resource according to the specified check value, updating the applet by adopting the application updating resource after the check is passed, and starting the updated applet.
In practical application, the user side can receive the designated check value, such as MD5 value, sent by the server side for the application update resource, then check the application update resource according to the designated check value, and update the applet by the application update resource after the check is passed, and then start the updated applet, so that the user can use the latest version in time when opening the applet, and the applet update timeliness is improved.
In an example, as shown in fig. 2a, after receiving the applet resource package (i.e. application updating resource), the user side may perform integrity check on the applet resource package, and may check the returned applet resource package according to the MD5 value (i.e. specified check value) returned by the service interface, decompress and decrypt the resource package, such as appsecret key or fixed key, so as to update the applet by using the applet resource package after verification, and start the updated applet, such as displaying the updated applet first page, so that the user may use the applet of the latest version when entering the applet, thereby preventing packet loss during downloading based on MD5 integrity check, enhancing program robustness, and reducing error possibility.
In an alternative embodiment, the corresponding expiration time may be determined for the acquired CDN timestamp hotlink, and the CDN timestamp hotlink and its expiration time may be stored locally, e.g., the local library hotlink expiration time wsTime may be written.
According to the application resource configuration method, when the state to be updated of the applet meets the preset condition by responding to the applet starting operation, an update resource acquisition request of the applet is sent to the server, then resource positioning information returned by the server for the update resource acquisition request is received, the resource positioning information comprises a time stamp and a resource downloading link, further the time stamp and the resource downloading link are adopted, application update resources corresponding to the applet are acquired through a preset resource distribution network, an appointed check value sent by the server for the application update resources is received, the application update resources are checked according to the appointed check value, the application update resource is adopted to update the applet after the check is passed, and the updated applet is started, so that the configuration of the applet update resources based on the resource distribution network is realized, a user can use the latest version in time when opening the applet, and the update timeliness of the applet is improved.
In one embodiment, the sending, in response to the applet starting operation, the applet update resource obtaining request to the server when the state to be updated of the applet meets a preset condition may include the following steps:
responding to an applet starting operation, and acquiring update state configuration information of the applet when detecting that historical version information exists in the applet; the update state configuration information comprises a state configuration field and an update mode field; determining the state to be updated of the applet according to the state configuration field and the update mode field; and when the state to be updated is that the updated resources are acquired in real time, transmitting an updated resource acquisition request of the small program to the server.
As an example, the update mode field may represent an update mode corresponding to the applet, and for normal update processing, different update modes may be configured according to the sensitivity of the applet to the new version by implementing normal update and update exception processing based on a client update mode technology, for example, the applet update mode may be preset to be a synchronous strong update mode, a synchronous cache mode, and an asynchronous mode.
For example, an applet with high requirement on update timeliness can be configured into a synchronous strong update mode, when it is determined that "update mode=1" in fig. 2b, a request can be sent immediately when the applet is clicked to obtain the latest version information of the applet, if a new version exists in the applet, the applet can be entered after the update is successful; the general applet may be configured in a synchronous cache mode, such as when it is determined that "update mode=2" in fig. 2b, when it is checked that the update fails, if there is a history resource packet locally, it may support loading the history resource packet, but the maximum allowable number is 3; the applet without real-time update requirement can be configured in asynchronous mode, as in fig. 2c, when it is determined that "update mode=3", when the applet is clicked, if there is a history resource package locally, the history resource package is loaded first, and after entering the applet, update is checked through the background.
In practical application, as shown in fig. 2b, the user side may respond to the applet starting operation to detect whether there is history version information in the current applet, and if there is no history version information, may send a request to obtain the latest version information of the current applet; when the existence of history version information of the applet is detected, the update state configuration information of the applet can be obtained, wherein the update state configuration information can comprise a state configuration field and an update mode field, for example, two fields of a local strong more flag and an update mode are read, then whether the local strong more flag "=1 of the current applet is met or not can be judged, and if the judgment condition is met, a request can be sent to obtain the latest version information of the current applet; when the determination condition is not satisfied, whether the current applet "update mode" = 1 is satisfied or not may be continuously determined, and if the determination condition is satisfied, a request may be sent to obtain the latest version information of the current applet; when the judging condition is not met, whether the ' update mode ' = 2 ' of the current applet is met or not can be continuously judged, if the judging condition is not met, whether a historical resource package exists in the current applet or not can be judged, when the fact that the historical resource package does not exist is judged, a request can be sent to acquire the latest version information of the current applet, if the judging condition is met, whether the information historical data of the current applet is in an effective period or not can be judged, if the information historical data of the current applet is not in the effective period, a request can be sent to acquire the latest version information of the current applet, namely, the state to be updated of the applet is determined according to a state configuration field and an update mode field, and then an update resource acquisition request of the applet can be sent to a server when the state to be updated is the updated resource acquired in time.
In an example, the cooling time can be preset for updating call, and the frequent triggering of the call update interface is avoided by triggering the update when a certain time is reached and the update is needed, so that the pressure of the server can be relieved; the call quantity of the data interface can be reduced by triggering the applet entry through asynchronous updating, which is beneficial to reducing the waiting time of a user at the entry interface; the cooling time and the synchronous update/asynchronous update can be configured and issued by the server, so that the cooling time and the synchronous and asynchronous update strategy can be flexibly adjusted without updating the user side, and the update strategy can be timely adjusted according to dynamic conditions such as market conditions, server states and the like, so that the optimal update scheme can be configured according to different conditions.
In this embodiment, by responding to the applet starting operation, when the existence of the history version information of the applet is detected, the update state configuration information of the applet is obtained, and then the state to be updated of the applet is determined according to the state configuration field and the update mode field, and then when the state to be updated is the update resource obtained in real time, the update resource obtaining request of the applet is sent to the server, so that the user can use the latest version in time when opening the applet, and the update timeliness of the applet is improved.
In one embodiment, after the step of receiving the resource location information returned by the server for the updated resource acquisition request, the method may include the following steps:
acquiring an effective time range of the resource downloading link, and establishing a corresponding relation between the effective time range and the resource downloading link;
the method may further comprise the steps of:
when the small program is detected to be cold started, if the current time does not exceed the effective time range, the timestamp and the resource downloading link are adopted, and the latest application resource corresponding to the small program is obtained through a preset resource distribution network.
In an example, as shown in fig. 2d, a corresponding expiration time may be determined for the acquired CDN timestamp hotlink, and the CDN timestamp hotlink and its expiration time may be stored locally, e.g., a local library hotlink expiration time wsTime may be written; when the applet is opened by cold start, whether the current time is within the effective time range can be judged, if the anti-theft chain is out of date, the downloading flow shown in fig. 2a is re-executed, before the anti-theft chain is out of date (i.e. the current time does not exceed the effective time range), the download flow can be directly connected to the CDN, then the CDN node can perform anti-theft chain authentication based on the timestamp, and the applet resource package obtained according to the CDN download link can be returned to the user side, so that the user side obtains the latest application resource corresponding to the current applet.
In yet another example, by adopting the detection flow of the background switching foreground, the problem that the applet cannot be triggered to update when the user switches back again because the applet is placed in the background for a long time can be avoided, and the user can be ensured to use the latest version of the applet in time.
In this embodiment, by acquiring the effective time range of the resource download link and establishing a corresponding relationship between the effective time range and the resource download link, and further when the cold start applet is detected, if the current time does not exceed the effective time range, the timestamp and the resource download link are adopted, and the latest application resource corresponding to the applet is acquired through a preset resource distribution network, so that the timeliness of applet update can be improved.
In one embodiment, as shown in fig. 3, another application resource configuration method is provided, and the method is applied to a server for illustration, and includes the following steps:
step 301, receiving an update resource acquisition request sent by a user terminal; the update resource acquisition request is generated when the state to be updated of the applet meets a preset condition by the user side in response to the applet starting operation;
in practical application, the server may receive the update resource acquisition request sent by the user, and after receiving the update resource acquisition request, perform a resource packet download check for a current applet corresponding to the update resource acquisition request, for example, may determine whether to turn on a CDN main switch, or whether to turn on CDN download, whether to take off the applet, and so on; the old server interface may also be invoked for the applet that has no CDN address for the local inline application cache.
Step 302, generating resource positioning information for the applet according to the updated resource acquisition request; the resource positioning information comprises a time stamp and a resource downloading link;
after receiving the update resource acquisition request, the server may generate a CDN download link based on an anti-hotlink algorithm, for example, a CDN anti-hotlink carrying a timestamp, as resource location information for the applet, where the resource location information may include the timestamp and the resource download link.
Step 303, sending the resource positioning information to the user side, so that the user side adopts the timestamp and the resource download link, obtains the application update resource corresponding to the applet through a preset resource distribution network, and adopts the application update resource to update the applet after verification is passed, and starts the updated applet.
After the resource positioning information is generated, the resource positioning information (such as a CDN timestamp anti-theft chain) can be sent to the user side, so that the user side obtains application updated resources corresponding to the applet, for example, the user side can redirect to the CDN through https according to the CDN timestamp anti-theft chain, then the CDN node can perform anti-theft chain authentication based on the timestamp, and the applet resource package obtained according to the CDN download link can be returned to the user side.
In the application resource configuration method, the update resource acquisition request sent by the user side is received, the update resource acquisition request is generated by the user side in response to the opening operation of the applet when the state to be updated of the applet meets the preset condition, then the resource positioning information aiming at the applet is generated according to the update resource acquisition request, the resource positioning information comprises a time stamp and a resource downloading link, and further the resource positioning information is sent to the user side, so that the user side adopts the time stamp and the resource downloading link, acquires application update resources corresponding to the applet through a preset resource distribution network, and adopts the application update applet after verification is passed, and the updated applet is started, thereby realizing the configuration of the applet update resource based on the resource distribution network, enabling the user to use the latest version in time when opening the applet, and improving the update timeliness of the applet.
In one embodiment, before the step of receiving the update resource acquisition request sent by the user side, the method may include the following steps:
when an applet resource release event is detected, uploading the release resource of the applet resource release event to a preset resource distribution network; adding configuration information corresponding to the current release resource into an applet distribution configuration table; the applet distribution configuration table comprises resource configuration information corresponding to each of a plurality of applets, wherein the resource configuration information comprises a download path corresponding to the published resource, a version identifier and a specified check value.
The generating the resource positioning information for the applet according to the updated resource acquisition request may include the following steps:
taking the applet corresponding to the applet identification in the updated resource acquisition request as a target applet, and acquiring resource configuration information of the target applet from the applet distribution configuration table; and generating the resource downloading link according to the downloading path and the version identifier corresponding to the latest release resource in the resource configuration information of the target applet.
In an example, after the applet resource is released (i.e. the applet resource release event is detected), a piece of data may be additionally saved to the corresponding CDN directory, and the same applet may use different version names (e.g. version identification numbers) when each new version resource package is released, so that it may be ensured that the applet update resource package obtained from the CDN is the latest version resource package, e.g. the version name may be { timestamp }. Zip, where timestamp is the current timestamp, and further the server may save, after the new version resource package is successfully uploaded, information (i.e. resource configuration information) such as the path where the new version resource package is located, the version name of the resource package, and the value of the resource package md5 into the applet CDN version table (i.e. the applet distribution configuration table).
For example, as shown in fig. 4, the uploaded new version resource package may be encrypted and saved to the CDN directory by the service server (i.e., the server), and then information such as a file path corresponding to the new version resource package (i.e., a download path corresponding to the released resource, a version identifier, and a specified check value) may be saved to an applet CDN version table (i.e., an applet distribution configuration table).
In yet another example, by deploying static resources at the source site and hosting them on the CDN server, content delivery of resource packages with the CDN may be achieved through a CDN load balancing system based on content routing techniques, which functions to direct user requests to the best node in the whole CDN network, where the selection of the best node may be according to various policies, such as closest, least node load, etc., where the load balancing system is the core of the whole CDN, where the accuracy and efficiency of load balancing will affect the efficiency and performance of the whole CDN; based on the content delivery technology, the content delivery may involve Cache storage procedures from the content source to the CDN edge, such as may be based on the content delivery technology PUSH and PULL; based on a content storage technology, aiming at the content storage problem of a CDN system, two aspects need to be considered, namely, the storage of a content source and the storage of the content in a Cache node; based on the content management technology, a series of content management processes such as content management after entering a Cache point, namely local content management, are aimed at content release, injection, distribution, adjustment, delivery and the like.
For example, the speed of accessing the applet by the user can be improved by using the CDN (i.e. a preset resource distribution network), for example, the access speed before the CDN is used, the average download speed is 590KB/s, the access speed after the CDN is used, the average transmission speed is 5.76MB/s, and under the condition of ensuring the optimal access effect, the bandwidth cost and the manpower maintenance cost can be reduced to the greatest extent by using the CDN, for example, after the CDN is used, a large site with a bandwidth peak value of about 100Gbps basically only needs to maintain the source station with the bandwidth peak value of about 1-2 Gbps; the CDN can hide the real IP of the source station and the anti-attack capability of the CDN, so that the safety of the source station is greatly improved, and the anti-attack capability of the source station is enhanced
In this embodiment, when an applet resource release event is detected, the current release resource of the applet resource release event is uploaded to a preset resource distribution network, and configuration information corresponding to the current release resource is added to an applet distribution configuration table, and further, by taking an applet corresponding to an applet identifier in an update resource acquisition request as a target applet, and obtaining the resource configuration information of the target applet from the applet distribution configuration table, a resource download link is generated according to a download path and a version identifier corresponding to the latest release resource in the resource configuration information of the target applet, so that the resource is updated based on the resource distribution network, the bandwidth pressure of an expansion server can be reduced, and the time for a user to open the applet is shortened.
In one embodiment, a flowchart illustration of yet another method of applying resource allocation is provided. In this embodiment, the method includes the steps of:
in the first step, when an applet resource release event is detected, uploading the release resource of the applet resource release event to a preset resource distribution network. In the second step, adding the configuration information corresponding to the current release resource into an applet distribution configuration table; the applet distribution configuration table comprises resource configuration information corresponding to each of a plurality of applets, wherein the resource configuration information comprises a download path corresponding to the published resource, a version identifier and a specified check value. In the third step, in response to the opening operation of the applet, when the state to be updated of the applet meets a preset condition, an update resource acquisition request of the applet is sent to a server. In the fourth step, an updated resource acquisition request sent by a user terminal is received, and resource positioning information aiming at the applet is generated according to the updated resource acquisition request; the resource location information includes a time stamp and a resource download link. In the fifth step, the resource positioning information is sent to the user terminal. In step six, receiving the resource positioning information returned by the server for the updated resource acquisition request, and acquiring the application updated resource corresponding to the applet through a preset resource distribution network by adopting the timestamp and the resource download link. In the seventh step, a specified check value, sent by the server, for the application update resource is received, the application update resource is checked according to the specified check value, after the check is passed, the application update resource is adopted to update the applet, and the updated applet is started. It should be noted that, the specific limitation of the above steps may be referred to the specific limitation of an application resource allocation method, which is not described herein.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides an application resource configuration device for realizing the above related application resource configuration method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in the embodiments of the application resource allocation device provided below may refer to the limitation of the application resource allocation method in the above description, and will not be repeated here.
In one embodiment, as shown in fig. 5, an application resource configuration device is provided, which may be applied to a user terminal, and includes:
a resource acquisition request sending module 501, configured to respond to an applet starting operation, and send an update resource acquisition request of the applet to a server when a state to be updated of the applet meets a preset condition;
a resource positioning information receiving module 502, configured to receive resource positioning information returned by the server for the updated resource acquisition request; the resource positioning information comprises a time stamp and a resource downloading link;
an application update resource obtaining module 503, configured to obtain, by using the timestamp and the resource download link, an application update resource corresponding to the applet through a preset resource distribution network;
and the update application starting module 504 is configured to receive a specified check value sent by the server and specific to the application update resource, check the application update resource according to the specified check value, update the applet with the application update resource after the check is passed, and start the updated applet.
In one embodiment, the resource acquisition request sending module 501 includes:
The detection field acquisition sub-module is used for responding to the opening operation of the applet and acquiring the update state configuration information of the applet when the history version information of the applet is detected; the update state configuration information comprises a state configuration field and an update mode field;
the judging submodule is used for determining the state to be updated of the applet according to the state configuration field and the updating mode field;
and the request sending sub-module is used for sending the update resource obtaining request of the applet to the server when the state to be updated is instant update resource obtaining.
In one embodiment, the apparatus further comprises:
the effective time range determining module is used for acquiring the effective time range of the resource downloading link and establishing a corresponding relation between the effective time range and the resource downloading link;
the apparatus further comprises:
and the cold start module is used for acquiring the latest application resource corresponding to the applet through a preset resource distribution network by adopting the timestamp and the resource download link if the current time does not exceed the effective time range when the cold start module detects the applet.
The above-described respective modules in the application resource allocation apparatus may be implemented in whole or in part by software, hardware, and a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, as shown in fig. 6, another apparatus for configuring application resources is provided, which may be applied to a server, and includes:
a resource acquisition request receiving module 601, configured to receive an update resource acquisition request sent by a user terminal; the update resource acquisition request is generated when the state to be updated of the applet meets a preset condition by the user side in response to the applet starting operation;
a resource location information generating module 602, configured to generate resource location information for the applet according to the updated resource acquisition request; the resource positioning information comprises a time stamp and a resource downloading link;
and a resource positioning information sending module 603, configured to send the resource positioning information to the user side, so that the user side uses the timestamp and the resource download link, obtains an application update resource corresponding to the applet through a preset resource distribution network, updates the applet by using the application update resource after verification passes, and starts the updated applet.
In one embodiment, the apparatus further comprises:
the resource issuing module is used for uploading the current issuing resource of the applet resource issuing event to a preset resource distribution network when the applet resource issuing event is detected;
the resource allocation information adding module is used for adding the allocation information corresponding to the current release resource into an applet distribution allocation table; the applet distribution configuration table comprises resource configuration information corresponding to each of a plurality of applets, wherein the resource configuration information comprises a download path corresponding to the published resource, a version identifier and a specified check value;
the resource location information generation module 602 includes:
the resource allocation information determining submodule is used for taking the applet corresponding to the applet identifier in the updated resource acquisition request as a target applet and acquiring the resource allocation information of the target applet from the applet distribution configuration table;
and the resource download link generation sub-module is used for generating the resource download link according to a download path and a version identifier corresponding to the latest release resource in the resource configuration information of the target applet.
The above-described respective modules in the application resource allocation apparatus may be implemented in whole or in part by software, hardware, and a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a terminal, and the internal structure of which may be as shown in fig. 7. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. 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 and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement an application resource allocation method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be keys, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
In one embodiment, a computer device is provided, which may be a server, and the internal structure of which may be as shown in fig. 8. The computer device includes a processor, a memory, and a network interface connected by a system bus. 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, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is for storing application resource configuration data. 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 an application resource allocation method.
It will be appreciated by those skilled in the art that the structures shown in fig. 7-8 are block diagrams of only some of the structures that are relevant to the present application and are not intended to limit the computer device on which the present application may be implemented, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided comprising a memory and a processor, the memory having stored therein a computer program, the processor when executing the computer program performing the steps of:
responding to an applet starting operation, and sending an applet updating resource acquisition request to a server when the state to be updated of the applet meets a preset condition;
receiving resource positioning information returned by the server side aiming at the updated resource acquisition request; the resource positioning information comprises a time stamp and a resource downloading link;
acquiring application update resources corresponding to the applet through a preset resource distribution network by adopting the time stamp and the resource download link;
and receiving a specified check value sent by the server and aiming at the application updating resource, checking the application updating resource according to the specified check value, updating the applet by adopting the application updating resource after the check is passed, and starting the updated applet.
In one embodiment, the steps of the application resource allocation method in the other embodiments described above are also implemented when the processor executes the computer program.
In one embodiment, another computer device is provided, comprising a memory having a computer program stored therein and a processor that when executing the computer program performs the steps of:
Receiving an updated resource acquisition request sent by a user terminal; the update resource acquisition request is generated when the state to be updated of the applet meets a preset condition by the user side in response to the applet starting operation;
generating resource positioning information for the applet according to the updated resource acquisition request; the resource positioning information comprises a time stamp and a resource downloading link;
and sending the resource positioning information to the user side so that the user side adopts the time stamp and the resource downloading link, obtains application updating resources corresponding to the applet through a preset resource distribution network, adopts the application updating resources to update the applet after verification is passed, and starts the updated applet.
In one embodiment, the steps of the application resource allocation method in the other embodiments described above are also implemented when the processor executes the computer program.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of:
responding to an applet starting operation, and sending an applet updating resource acquisition request to a server when the state to be updated of the applet meets a preset condition;
Receiving resource positioning information returned by the server side aiming at the updated resource acquisition request; the resource positioning information comprises a time stamp and a resource downloading link;
acquiring application update resources corresponding to the applet through a preset resource distribution network by adopting the time stamp and the resource download link;
and receiving a specified check value sent by the server and aiming at the application updating resource, checking the application updating resource according to the specified check value, updating the applet by adopting the application updating resource after the check is passed, and starting the updated applet.
In one embodiment, the computer program, when executed by the processor, further implements the steps of the application resource allocation method in the other embodiments described above.
In one embodiment, another computer-readable storage medium is provided, having stored thereon a computer program which, when executed by a processor, performs the steps of:
receiving an updated resource acquisition request sent by a user terminal; the update resource acquisition request is generated when the state to be updated of the applet meets a preset condition by the user side in response to the applet starting operation;
Generating resource positioning information for the applet according to the updated resource acquisition request; the resource positioning information comprises a time stamp and a resource downloading link;
and sending the resource positioning information to the user side so that the user side adopts the time stamp and the resource downloading link, obtains application updating resources corresponding to the applet through a preset resource distribution network, adopts the application updating resources to update the applet after verification is passed, and starts the updated applet.
In one embodiment, the computer program, when executed by the processor, further implements the steps of the application resource allocation method in the other embodiments described above.
In one embodiment, a computer program product is provided comprising a computer program which, when executed by a processor, performs the steps of:
responding to an applet starting operation, and sending an applet updating resource acquisition request to a server when the state to be updated of the applet meets a preset condition;
receiving resource positioning information returned by the server side aiming at the updated resource acquisition request; the resource positioning information comprises a time stamp and a resource downloading link;
Acquiring application update resources corresponding to the applet through a preset resource distribution network by adopting the time stamp and the resource download link;
and receiving a specified check value sent by the server and aiming at the application updating resource, checking the application updating resource according to the specified check value, updating the applet by adopting the application updating resource after the check is passed, and starting the updated applet.
In one embodiment, the computer program, when executed by the processor, further implements the steps of the application resource allocation method in the other embodiments described above.
In one embodiment, another computer program product is provided, comprising a computer program which, when executed by a processor, performs the steps of:
receiving an updated resource acquisition request sent by a user terminal; the update resource acquisition request is generated when the state to be updated of the applet meets a preset condition by the user side in response to the applet starting operation;
generating resource positioning information for the applet according to the updated resource acquisition request; the resource positioning information comprises a time stamp and a resource downloading link;
And sending the resource positioning information to the user side so that the user side adopts the time stamp and the resource downloading link, obtains application updating resources corresponding to the applet through a preset resource distribution network, adopts the application updating resources to update the applet after verification is passed, and starts the updated applet.
In one embodiment, the computer program, when executed by the processor, further implements the steps of the application resource allocation method in the other embodiments described above.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the various embodiments provided herein may 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 (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the various embodiments provided herein may include at least one of relational databases and non-relational databases. The non-relational database may include, but is not limited to, a blockchain-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 units, quantum computing-based data processing logic units, etc., without being limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples only represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application shall be subject to the appended claims.

Claims (8)

1. An application resource allocation method, the method comprising:
responding to an applet starting operation, carrying out update checking on the applet, and sending an update resource acquisition request of the applet to a server when the state to be updated of the applet meets a preset condition; the method specifically comprises the following steps:
responding to an applet starting operation, and acquiring update state configuration information of the applet when detecting that historical version information exists in the applet; the update state configuration information comprises a state configuration field and an update mode field; the update mode field is configured according to the sensitivity degree of the applet to the new version; the update mode field characterizes an update mode corresponding to the applet; the updating mode comprises a synchronous strong mode, a synchronous cache mode and an asynchronous mode; the synchronous strong update mode is characterized in that a request is sent immediately when the applet is clicked to acquire the latest version information of the applet, and if the applet has a new version, the applet is entered after updating is successful; the synchronous cache mode represents that when the updating is checked to fail, if a historical resource packet exists locally, the historical resource packet is loaded; when clicking the applet, the asynchronous mode representation firstly loads the history resource package if the history resource package exists locally, and after entering the applet, the history resource package is checked and updated by a background;
Invoking a preset cooling time for the update by triggering the update when the preset cooling time is reached and the update is required; the preset cooling time is configured and issued by the server side;
determining the state to be updated of the applet according to the state configuration field and the update mode field;
when the state to be updated is to acquire updated resources in real time, transmitting an updated resource acquisition request of the applet to the server; when the number of commonly used applets used by a user side is larger than the preset number, starting operation of the user side corresponding to the user side when the user side is started is used as the applet starting operation; the commonly used applet is an applet with the use frequency of the user at the user end being greater than a preset frequency;
receiving resource positioning information returned by the server side aiming at the updated resource acquisition request; the resource positioning information comprises a time stamp and a resource downloading link;
acquiring application update resources corresponding to the applet through a preset resource distribution network by adopting the time stamp and the resource download link;
and receiving a specified check value sent by the server and aiming at the application updating resource, checking the application updating resource according to the specified check value, updating the applet by adopting the application updating resource after the check is passed, and starting the updated applet.
2. The method of claim 1, wherein after the step of receiving the resource location information returned by the server for the updated resource acquisition request, the method further comprises:
acquiring an effective time range of the resource downloading link, and establishing a corresponding relation between the effective time range and the resource downloading link;
the method further comprises the steps of:
when the small program is detected to be cold started, if the current time does not exceed the effective time range, the timestamp and the resource downloading link are adopted, and the latest application resource corresponding to the small program is obtained through a preset resource distribution network.
3. An application resource allocation method, the method comprising:
receiving an updated resource acquisition request sent by a user terminal; the update resource acquisition request is generated when the user side responds to an applet starting operation, performs update check on the applet and the state to be updated of the applet meets a preset condition; the generation process of the update resource acquisition request comprises the following steps:
responding to an applet starting operation, and acquiring update state configuration information of the applet when detecting that historical version information exists in the applet; the update state configuration information comprises a state configuration field and an update mode field; the update mode field is configured according to the sensitivity degree of the applet to the new version; the update mode field characterizes an update mode corresponding to the applet; the updating mode comprises a synchronous strong mode, a synchronous cache mode and an asynchronous mode; the synchronous strong update mode is characterized in that a request is sent immediately when the applet is clicked to acquire the latest version information of the applet, and if the applet has a new version, the applet is entered after updating is successful; the synchronous cache mode represents that when the updating is checked to fail, if a historical resource packet exists locally, the historical resource packet is loaded; when clicking the applet, the asynchronous mode representation firstly loads the history resource package if the history resource package exists locally, and after entering the applet, the history resource package is checked and updated by a background;
Invoking a preset cooling time for the update by triggering the update when the preset cooling time is reached and the update is required; the preset cooling time is configured and issued by a server side;
determining the state to be updated of the applet according to the state configuration field and the update mode field;
when the state to be updated is to acquire updated resources in real time, transmitting an updated resource acquisition request of the applet to the server; when the number of commonly used applets used by a user side is larger than the preset number, starting operation of the user side corresponding to the user side when the user side is started is used as the applet starting operation; the commonly used applet is an applet with the use frequency of the user at the user end being greater than a preset frequency;
generating resource positioning information for the applet according to the updated resource acquisition request; the resource positioning information comprises a time stamp and a resource downloading link;
and sending the resource positioning information to the user side so that the user side adopts the time stamp and the resource downloading link, obtains application updating resources corresponding to the applet through a preset resource distribution network, adopts the application updating resources to update the applet after verification is passed, and starts the updated applet.
4. The method of claim 3, wherein prior to the step of receiving the update resource acquisition request sent by the client, the method further comprises:
when an applet resource release event is detected, uploading the release resource of the applet resource release event to a preset resource distribution network;
adding configuration information corresponding to the current release resource into an applet distribution configuration table; the applet distribution configuration table comprises resource configuration information corresponding to each of a plurality of applets, wherein the resource configuration information comprises a download path corresponding to the published resource, a version identifier and a specified check value;
the generating resource positioning information for the applet according to the updated resource acquisition request includes:
taking the applet corresponding to the applet identification in the updated resource acquisition request as a target applet, and acquiring resource configuration information of the target applet from the applet distribution configuration table;
and generating the resource downloading link according to the downloading path and the version identifier corresponding to the latest release resource in the resource configuration information of the target applet.
5. An application resource allocation apparatus, the apparatus comprising:
the resource acquisition request sending module is used for responding to the opening operation of the small program, updating and checking the small program, and sending the update resource acquisition request of the small program to the server when the state to be updated of the small program meets the preset condition; the method specifically comprises the following steps:
responding to an applet starting operation, and acquiring update state configuration information of the applet when detecting that historical version information exists in the applet; the update state configuration information comprises a state configuration field and an update mode field; the update mode field is configured according to the sensitivity degree of the applet to the new version; the update mode field characterizes an update mode corresponding to the applet; the updating mode comprises a synchronous strong mode, a synchronous cache mode and an asynchronous mode; the synchronous strong update mode is characterized in that a request is sent immediately when the applet is clicked to acquire the latest version information of the applet, and if the applet has a new version, the applet is entered after updating is successful; the synchronous cache mode represents that when the updating is checked to fail, if a historical resource packet exists locally, the historical resource packet is loaded; when clicking the applet, the asynchronous mode representation firstly loads the history resource package if the history resource package exists locally, and after entering the applet, the history resource package is checked and updated by a background;
Invoking a preset cooling time for the update by triggering the update when the preset cooling time is reached and the update is required; the preset cooling time is configured and issued by the server side;
determining the state to be updated of the applet according to the state configuration field and the update mode field;
when the state to be updated is to acquire updated resources in real time, transmitting an updated resource acquisition request of the applet to the server; when the number of commonly used applets used by a user side is larger than the preset number, starting operation of the user side corresponding to the user side when the user side is started is used as the applet starting operation; the commonly used applet is an applet with the use frequency of the user at the user end being greater than a preset frequency;
the resource positioning information receiving module is used for receiving the resource positioning information returned by the server side aiming at the updated resource acquisition request; the resource positioning information comprises a time stamp and a resource downloading link;
the application updating resource acquisition module is used for acquiring application updating resources corresponding to the applet through a preset resource distribution network by adopting the time stamp and the resource downloading link;
And the updating application starting module is used for receiving the appointed check value which is sent by the server and aims at the application updating resource, checking the application updating resource according to the appointed check value, adopting the application updating resource to update the applet after the check is passed, and starting the updated applet.
6. An application resource allocation apparatus, the apparatus comprising:
the resource acquisition request receiving module is used for receiving an update resource acquisition request sent by a user side; the update resource acquisition request is generated when the user side responds to an applet starting operation, performs update check on the applet and the state to be updated of the applet meets a preset condition; the generation process of the update resource acquisition request comprises the following steps:
responding to an applet starting operation, and acquiring update state configuration information of the applet when detecting that historical version information exists in the applet; the update state configuration information comprises a state configuration field and an update mode field; the update mode field is configured according to the sensitivity degree of the applet to the new version; the update mode field characterizes an update mode corresponding to the applet; the updating mode comprises a synchronous strong mode, a synchronous cache mode and an asynchronous mode; the synchronous strong update mode is characterized in that a request is sent immediately when the applet is clicked to acquire the latest version information of the applet, and if the applet has a new version, the applet is entered after updating is successful; the synchronous cache mode represents that when the updating is checked to fail, if a historical resource packet exists locally, the historical resource packet is loaded; when clicking the applet, the asynchronous mode representation firstly loads the history resource package if the history resource package exists locally, and after entering the applet, the history resource package is checked and updated by a background;
Invoking a preset cooling time for the update by triggering the update when the preset cooling time is reached and the update is required; the preset cooling time is configured and issued by a server side;
determining the state to be updated of the applet according to the state configuration field and the update mode field;
when the state to be updated is to acquire updated resources in real time, transmitting an updated resource acquisition request of the applet to the server; when the number of commonly used applets used by a user side is larger than the preset number, starting operation of the user side corresponding to the user side when the user side is started is used as the applet starting operation; the commonly used applet is an applet with the use frequency of the user at the user end being greater than a preset frequency;
the resource positioning information generation module is used for generating resource positioning information aiming at the small program according to the updated resource acquisition request; the resource positioning information comprises a time stamp and a resource downloading link;
and the resource positioning information sending module is used for sending the resource positioning information to the user side, so that the user side adopts the time stamp and the resource downloading link, obtains application updating resources corresponding to the applet through a preset resource distribution network, updates the applet by adopting the application updating resources after verification is passed, and starts the updated applet.
7. Computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any one of claims 1 to 2 and/or the steps of the method of any one of claims 3 to 4.
8. A computer-readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any one of claims 1 to 2 and/or the steps of the method of any one of claims 3 to 4.
CN202210505247.3A 2022-05-10 2022-05-10 Application resource allocation method, device, computer equipment and storage medium Active CN116339767B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210505247.3A CN116339767B (en) 2022-05-10 2022-05-10 Application resource allocation method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210505247.3A CN116339767B (en) 2022-05-10 2022-05-10 Application resource allocation method, device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN116339767A CN116339767A (en) 2023-06-27
CN116339767B true CN116339767B (en) 2024-03-19

Family

ID=86884556

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210505247.3A Active CN116339767B (en) 2022-05-10 2022-05-10 Application resource allocation method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116339767B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107707584A (en) * 2016-08-08 2018-02-16 腾讯科技(深圳)有限公司 One kind applies loading method, terminal and Platform Server
CN108874426A (en) * 2018-06-28 2018-11-23 武汉斗鱼网络科技有限公司 Application program updating method and device and readable storage medium
WO2019242166A1 (en) * 2018-06-22 2019-12-26 平安科技(深圳)有限公司 Application update method and system, and computer device and storage medium
CN113055451A (en) * 2021-03-08 2021-06-29 Oppo广东移动通信有限公司 Resource downloading method and device, electronic equipment and storage medium
CN113568643A (en) * 2021-08-04 2021-10-29 中国建设银行股份有限公司 Resource acquisition method and device, electronic equipment and computer readable medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107707584A (en) * 2016-08-08 2018-02-16 腾讯科技(深圳)有限公司 One kind applies loading method, terminal and Platform Server
WO2019242166A1 (en) * 2018-06-22 2019-12-26 平安科技(深圳)有限公司 Application update method and system, and computer device and storage medium
CN108874426A (en) * 2018-06-28 2018-11-23 武汉斗鱼网络科技有限公司 Application program updating method and device and readable storage medium
CN113055451A (en) * 2021-03-08 2021-06-29 Oppo广东移动通信有限公司 Resource downloading method and device, electronic equipment and storage medium
CN113568643A (en) * 2021-08-04 2021-10-29 中国建设银行股份有限公司 Resource acquisition method and device, electronic equipment and computer readable medium

Also Published As

Publication number Publication date
CN116339767A (en) 2023-06-27

Similar Documents

Publication Publication Date Title
CN110727712B (en) Data processing method and device based on block chain network, electronic equipment and storage medium
CN112308561A (en) Block chain-based evidence storing method and system, computer equipment and storage medium
CN112468540B (en) Cloud platform-based data distribution method, equipment and medium
CN111597567B (en) Data processing method, data processing device, node equipment and storage medium
CN109257426B (en) Service line resource loading method and device, computer equipment and storage medium
CN113568643A (en) Resource acquisition method and device, electronic equipment and computer readable medium
CN113094076A (en) Version iteration method, device, equipment and medium based on version control
CN111597537B (en) Block chain network-based certificate issuing method, related equipment and medium
CN110597820B (en) Information processing method, device, storage medium and equipment based on block chain
CN109831521B (en) Cache instance management method and device, computer equipment and storage medium
CN107844542A (en) A kind of distributed document storage method and device
CN115694699A (en) Time delay parameter acquisition method and device, electronic equipment and storage medium
CN116339767B (en) Application resource allocation method, device, computer equipment and storage medium
CN111695098A (en) Multi-distributed cluster access method and device
CN113329045A (en) File downloading method and device, computer readable storage medium and computer equipment
US9432243B2 (en) Re-using asynchronous server-side results generated for a request context of one client to satisfy a request context of a different client
CN115270195A (en) Block chain-based stock information deposit management method, system and device
CN117331576A (en) Application pre-download method, device, computer and storage medium
CN115935414A (en) Block chain based data verification method and device, electronic equipment and storage medium
CN113590994A (en) Data processing method, data processing device, computer equipment and storage medium
CN111552551A (en) User management method and device based on master-slave system, computer equipment and medium
CN107704557B (en) Processing method and device for operating mutually exclusive data, computer equipment and storage medium
CN113742696B (en) User login method, device, equipment and medium based on distributed login component
CN114285845B (en) Networking authentication method and system in cloud environment, computer equipment and storage medium
CN114244573B (en) Data transmission control method, device, computer equipment and storage medium

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