Data acquisition method, device, electronic device and storage medium

By sending a version data acquisition request to the mini program platform server at a preset time interval and storing the latest online version data, it solves the problem that mini program developers have difficulty obtaining other version data except the latest online version, and realizes the storage and analysis of multi-version data.

CN114489763BActive Publication Date: 2025-02-25BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111585299.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-22
Publication Date
2025-02-25
Estimated Expiration
2041-12-22

AI Technical Summary

Technical Problem

During the development of mini-programs, it is difficult for developers to obtain data from other versions except for the latest online version, resulting in the inability to conduct relevant analysis.

Method used

By sending version data acquisition requests to the server of the platform to which the applet belongs at a preset time interval, receiving and storing the version data of the latest online version, ensuring that multiple version data are stored in the database.

Benefits of technology

It realizes that every time the latest version of the mini program is launched, it can receive and store the corresponding version data, ensuring that multiple versions of data are stored in the database, making it easier to analyze.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114489763B_ABST
    Figure CN114489763B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a data acquisition method, device, electronic device and storage medium, the method comprising: when the current time is a preset sending time, sending a version data acquisition request to a first server, wherein the duration between any two adjacent preset sending times is the preset duration, and the first server is a server in the platform to which the mini program belongs; receiving the current version data of the mini program returned by the first server, wherein the current version data is the version data of the latest online version of the mini program, and the latest online version is the version that has been online and the online time is closest to the current time; if the database does not store the current version data, storing the current version data in the database.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of the Internet, and in particular to a data acquisition method, device, electronic device and storage medium. Background Art

[0002] In the process of developing a mini program, such as a WeChat mini program, engineers of the mini program developer sometimes need to perform relevant analysis based on the version data of a certain version of the mini program provided by the platform to which the mini program belongs. However, the platform to which the mini program belongs only provides the version data of the latest online version. If the required version data is not the version data of the latest online version, the required version data cannot be obtained and relevant analysis cannot be performed. Summary of the invention

[0003] The present disclosure provides a data acquisition method, device, electronic device and storage medium, so as to at least solve the problem in the related art that required version data cannot be acquired for related analysis.

[0004] The technical solution of the present disclosure is as follows:

[0005] According to a first aspect of an embodiment of the present disclosure, there is provided a data acquisition method, comprising:

[0006] When the current time is the preset sending time, a version data acquisition request is sent to the first server, wherein the duration between any two adjacent preset sending times is the preset duration, and the first server is a server in the platform to which the mini program belongs;

[0007] Receive the current version data of the mini program returned by the first server, wherein the current version data is the version data of the latest online version of the mini program, and the latest online version is the version that has been online and the online time is the closest to the current time;

[0008] If the database does not store the current version data, the current version data is stored in the database.

[0009] According to a second aspect of an embodiment of the present disclosure, there is provided a data acquisition device, including:

[0010] A sending module, configured to send a version data acquisition request to a first server when the current time is a preset sending time, wherein the duration between any two adjacent preset sending times is a preset duration, and the first server is a server in the platform to which the mini program belongs;

[0011] A receiving module is configured to receive the current version data of the mini program returned by the first server, wherein the current version data is the version data of the latest online version of the mini program, and the latest online version is the version that has been online and the online time is the closest to the current time;

[0012] The storage module is configured to store the current version data in the database if the database does not store the current version data.

[0013] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, including:

[0014] processor;

[0015] a memory for storing instructions executable by the processor;

[0016] The processor is configured to execute the instructions to implement any method as described in the first aspect.

[0017] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device can execute any method as described in the first aspect.

[0018] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is provided, comprising a computer readable code, and when the computer readable code is executed in an electronic device, the electronic device executes any one of the methods in the first aspect.

[0019] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:

[0020] When the current time is the preset sending time, a version data acquisition request is sent to the first server in the platform to which the mini program belongs, and the duration between any two adjacent preset sending times is the preset duration; the current version data of the mini program returned by the first server is received; if the database does not store the current version data, the current version data is stored in the database. This allows the platform to generate corresponding current version data each time the latest version of the mini program goes online, and the corresponding current version data returned by the first server can be received. If the database does not store the corresponding current version data, the corresponding current version data is stored in the database. Thus, the database can store version data of multiple different versions of the mini program, and when it is necessary to use the version data of any one of the multiple different versions for related analysis, the required version data can be obtained from the database for related analysis.

[0021] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.

[0023] Figure 1 is a flow chart of an embodiment of a data acquisition method according to an exemplary embodiment;

[0024] Figure 2 is a schematic diagram of the interaction between the electronic device and the first server;

[0025] Figure 3 is a schematic diagram of the interaction between the electronic device and the second server;

[0026] Figure 4 is a structural block diagram of a data acquisition device according to an exemplary embodiment;

[0027] Figure 5 The present invention is a structural block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0028] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.

[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0030] Figure 1 FIG. 1 is a flow chart of an embodiment of a data acquisition method according to an exemplary embodiment. The method can be executed by an electronic device, and the method includes the following steps:

[0031] Step 101: When the current time is the preset sending time, a version data acquisition request is sent to a first server.

[0032] The first server is a server in the platform to which the mini program belongs. When the current time is the preset sending time, a version data acquisition request is sent to the first server, and the duration between any two adjacent preset sending times is the preset duration. In other words, the electronic device used to execute the data acquisition method provided by the present disclosure can send a version data acquisition request to the first server at intervals of a preset duration, and the time for each version data acquisition request to be sent is a preset sending time.

[0033] Step 102: Receive the current version data of the mini-program returned by the first server.

[0034] In the present disclosure, the current version data refers to the version data of the latest online version of the mini program.

[0035] For any version of a Mini Program, the launch of that version means that the platform to which the Mini Program belongs makes the Mini Program available to users of the platform to which the Mini Program belongs.

[0036] In the present disclosure, the latest online version is the version that has been online and the online time is closest to the current time, and the current time is the time of executing step 101. In other words, the latest online version can be the version with the latest online time among all versions that have been online before receiving the current version data of the mini program returned by the first server. The latest online version of the mini program does not specifically refer to a certain version. The latest online version of the mini program is a variable type of data. The current version data does not specifically refer to the version data of a certain version. The current version data is also a variable type of data.

[0037] In the present disclosure, for a version of a mini program, when the version is the latest online version, the current version data returned by the first server may include the online time of the version, the version number of the version, etc.

[0038] Step 103: If the database does not store the current version data, store the current version data in the database.

[0039] In the present disclosure, the database is located on an electronic device for executing the data acquisition method provided by the present disclosure. After receiving the current version data of the applet returned by the first server, it is determined whether the database stores the current version data. If it is determined that the database does not store the current version data, the received current version data is stored in the database. If it is determined that the database stores the current version data, it is determined that there is no need to store the received current version data in the database.

[0040] For example, the latest online version of the mini program is version N of the mini program, and the current version data returned by the first server is the version data of version N of the mini program. When the version data of version N of the mini program returned by the first server is received, if it is determined that the database does not store the version data of version N of the mini program, the received version data of version N of the mini program will be stored in the database.

[0041] In the present disclosure, when the current time is the preset sending time, a version data acquisition request is sent to the first server in the platform to which the mini program belongs, and the duration between any two adjacent preset sending times is the preset duration; the current version data of the mini program returned by the first server is received; if the database does not store the current version data, the current version data is stored in the database. Each time the latest online version of the mini program is launched, the platform to which the mini program belongs generates the corresponding current version data, and the corresponding current version data returned by the first server can be received. If the database does not store the corresponding current version data, the corresponding current version data is stored in the database. Thus, the database can store version data of multiple different versions of the mini program, and when it is necessary to use the version data of any one of the multiple different versions for related analysis, the required version data can be obtained from the database for related analysis.

[0042] Please refer to Figure 2 , which shows a schematic diagram of the interaction between the electronic device and the first server.

[0043] The electronic device used to execute the data acquisition method provided by the present disclosure sends a version data acquisition request to the first server for the Nth time, and the first server returns the current version data. If the electronic device used to execute the data acquisition method provided by the present disclosure determines that the database does not store the current version data, the current version data is stored in the database. From the time when the version data acquisition request is sent to the first server for the Nth time, after a preset time, the electronic device used to execute the data acquisition method provided by the present disclosure sends a version data acquisition request to the first server again, that is, sends a version data acquisition request to the first server for the N+1th time.

[0044] In some embodiments, a requirement data acquisition request is sent to a second server, the requirement data acquisition request including: a requirement identifier of a first version; receiving requirement data corresponding to the requirement identifier sent by the second server, wherein the first version is the version to which the requirement data corresponding to the requirement identifier belongs, and the requirement data corresponding to the requirement identifier is used to describe the characteristics of a problem corresponding to the requirement identifier, and the problem corresponding to the requirement identifier is a problem that needs to be solved during the development of the first version; if the database does not store historical requirement data corresponding to the requirement identifier, the requirement data corresponding to the requirement identifier is stored in the database; if the database stores historical requirement data corresponding to the requirement identifier, the historical requirement data corresponding to the requirement identifier is replaced by the requirement data corresponding to the requirement identifier.

[0045] In the present disclosure, the second server may be a server in a code management platform for managing the code of the mini-program. The second server stores the code of each version of the mini-program, the requirement data of each version of the mini-program, and the requirement identifier of each version of the mini-program.

[0046] For any version of the mini program, the version may have one or more requirement data, the version may have one or more requirement identifiers, and each requirement data of the version corresponds to a requirement identifier of the version.

[0047] In the present disclosure, for a version of a mini program, if the requirement data of the version needs to be obtained, then the version is the first version. In other words, the version of the mini program for which the requirement data needs to be obtained is the first version of the mini program. Each version of the mini program can be the first version.

[0048] In the present disclosure, for the first version of the mini program, each requirement identifier of the first version corresponds to a problem. For each requirement identifier of the first version, the requirement data corresponding to the requirement identifier is used to describe the characteristics of the problem corresponding to the requirement identifier. The problem corresponding to the requirement identifier is a problem that needs to be solved during the development of the first version. The problem that needs to be solved can also be called a bug. The problem corresponding to the requirement identifier is determined by the engineer of the developer of the mini program. The requirement data corresponding to the requirement identifier may include the problem corresponding to the requirement identifier, the time when the problem corresponding to the requirement identifier was discovered, data indicating the severity of the problem corresponding to the requirement identifier, data indicating whether the problem corresponding to the requirement identifier has been solved, the discoverer of the problem corresponding to the requirement identifier, etc.

[0049] In the present disclosure, for each requirement identifier of the first version of the mini program, a requirement data acquisition request including the requirement identifier may be sent to the second server at a preset time interval.

[0050] For each requirement identifier of the first version of the mini program, the requirement data corresponding to the requirement identifier can be stored in the storage area corresponding to the requirement identifier on the second server. At any one time, the storage area corresponding to the requirement identifier on the second server stores at most one requirement data corresponding to the requirement identifier. Each time new requirement data corresponding to the requirement identifier is generated on the second server, the new requirement data corresponding to the requirement identifier is different from the requirement data in the storage area corresponding to the requirement identifier, and the requirement data in the storage area corresponding to the requirement identifier is replaced by the generated new requirement data corresponding to the requirement identifier.

[0051] For each requirement identifier of the first version of the mini-program, if the second server receives a requirement data acquisition request including the requirement identifier for the first time, the second server obtains the requirement data corresponding to the requirement identifier of the version from the storage area corresponding to the requirement identifier on the second server, and the second server sends the requirement data corresponding to the requirement identifier of the version to the electronic device used to execute the data acquisition method provided by the present disclosure. If the second server receives a requirement data acquisition request including the requirement identifier for the Nth time, and N is not equal to 1, the second server can determine whether the requirement data in the storage area corresponding to the requirement identifier on the second server has changed after the requirement data corresponding to the requirement identifier is returned for the N-1th time. If the requirement data in the storage area corresponding to the requirement identifier has changed, the second server obtains the requirement data corresponding to the requirement identifier of the version from the storage area corresponding to the requirement identifier on the second server, and the second server sends the requirement data corresponding to the requirement identifier of the version to the electronic device used to execute the data acquisition method provided by the present disclosure.

[0052] For example, for a requirement identifier of the first version of the mini-program, when the second server receives the requirement data acquisition request including the requirement identifier for the Nth time, the data indicating whether the problem corresponding to the requirement identifier has been solved in the requirement data in the storage area corresponding to the requirement identifier is "being solved". At a time after the time when the requirement data is returned for the Nth time, since the problem has been solved, new requirement data corresponding to the requirement identifier is generated, and the field indicating whether the problem has been solved in the new requirement data corresponding to the requirement identifier is "solved", and the requirement data in the storage area corresponding to the requirement identifier is replaced by the new requirement data generated corresponding to the requirement identifier. When the requirement data acquisition request including the requirement identifier is received for the N+1th time, since the requirement data in the storage area corresponding to the requirement identifier has changed, the second server obtains the first version of the requirement data corresponding to the requirement identifier from the storage area corresponding to the requirement identifier on the second server, and sends the first version of the requirement data corresponding to the requirement identifier to the electronic device used to execute the data acquisition method provided by the present disclosure.

[0053] In the present disclosure, for each requirement identifier of the first version of the mini program, after sending a requirement data acquisition request including the requirement identifier to the second server, the requirement data corresponding to the requirement identifier sent by the second server is received. In the case where the database does not store historical requirement data corresponding to the requirement identifier, the requirement data corresponding to the requirement identifier is stored in the database. In the case where the database stores historical requirement data corresponding to the requirement identifier, the historical requirement data corresponding to the requirement identifier is replaced by the requirement data corresponding to the requirement identifier.

[0054] In the present disclosure, each version of the mini program can be used as the first version. Therefore, any requirement data of any version can be obtained by sending a requirement data acquisition request to the second server, and any requirement data of any version can be stored in the database. The database can store any requirement data of any version of the mini program. Therefore, when the engineers of the mini program developer need to understand the characteristics of any problem that needs to be solved in the development process of any version of the mini program, the characteristics of any problem that needs to be solved in the development process of any version of the mini program can be found out from the database, and any requirement data of any version of the mini program can be provided to the engineers of the mini program developer, so that the engineers of the mini program developer can understand the characteristics of any problem that needs to be solved in the development process of any version of the mini program.

[0055] Please refer to Figure 3 , which shows a schematic diagram of the interaction between the electronic device and the second server.

[0056] An electronic device for executing the data acquisition method provided by the present disclosure sends a demand data acquisition request including a first version of the demand identifier to a second server. The second server returns the first version of the demand data corresponding to the demand identifier to the electronic device for executing the data acquisition method provided by the present disclosure. If the database does not store the first version of the historical demand data corresponding to the demand identifier, the returned first version of the demand data corresponding to the demand identifier is stored in the database. If the database stores the first version of the historical demand data corresponding to the demand identifier, the returned first version of the demand data corresponding to the demand identifier replaces the first version of the historical demand data corresponding to the demand identifier.

[0057] In some embodiments, requirement data corresponding to a requirement identifier of a second version is received and sent by a second server, wherein the second version is the version to which the requirement data sent by the second server belongs, and the requirement data corresponding to the requirement identifier of the second version is sent by the second server when it is determined that the requirement data corresponding to the requirement identifier of the second version is generated on the second server; if the database does not store historical requirement data corresponding to the requirement identifier of the second version, the requirement data corresponding to the requirement identifier of the second version is stored in the database; if the database stores historical requirement data corresponding to the requirement identifier of the second version, the historical requirement data corresponding to the requirement identifier of the second version is replaced by the requirement data corresponding to the requirement identifier of the second version.

[0058] In the present disclosure, the second version is the version to which the demand data corresponding to the demand identifier is sent by the second server when it is determined that the demand data corresponding to the demand identifier is generated. In other words, the version of the demand data corresponding to the demand identifier sent by the second server when it is determined that the demand data corresponding to the demand identifier is generated is the second version. Each version of the mini program can be used as the second version.

[0059] In the present disclosure, for each requirement identifier of the second version of the mini program, each time the requirement data corresponding to the requirement identifier of the second version is generated on the second server, the second server determines to generate the requirement data corresponding to the requirement identifier of the second version on the second server, and the second server sends the requirement data corresponding to the requirement identifier of this version and the requirement identifier to the electronic device used to execute the data acquisition method provided by the present disclosure.

[0060] In the present disclosure, for each requirement identifier of the second version of the mini-program, the requirement data corresponding to the requirement identifier of the version generated for the first time may be generated based on the data included in the requirement data corresponding to the requirement identifier of the second version input by the engineer of the developer of the mini-program. The requirement data corresponding to the requirement identifier of the second version generated for the Nth time may be generated based on a change in the data used to constitute the requirement data corresponding to the requirement identifier, where N is not equal to 1. For example, after the requirement data corresponding to the requirement identifier is generated for the N-1th time, the requirement data corresponding to the requirement identifier is sent for the N-1th time, and the data indicating whether the problem corresponding to the requirement identifier has been solved in the requirement data corresponding to the requirement identifier generated for the N-1th time is "being solved". At a certain moment after the requirement data corresponding to the requirement identifier is sent for the N-1th time, since the problem has been solved, the requirement data corresponding to the requirement identifier is generated for the Nth time, and the data indicating whether the problem has been solved in the requirement data corresponding to the requirement identifier generated for the Nth time is "solved".

[0061] In the present disclosure, for each requirement identifier of the second version of the mini program, if the database does not store historical requirement data corresponding to the requirement identifier, the requirement data corresponding to the requirement identifier of the second version is stored in the database. If the database stores historical requirement data corresponding to the requirement identifier, the historical requirement data corresponding to the requirement identifier is replaced by the requirement data corresponding to the requirement identifier.

[0062] In the present disclosure, each version of the mini program can be used as the second version. The second server can actively send any one of the demand data of any version to the electronic device used to execute the data acquisition method provided by the present disclosure, so that the database can store any one of the demand data of any version. Thus, when the engineers of the developer of the mini program need to understand the characteristics of any problem that needs to be solved in the development process of any version of the mini program, the characteristics of any problem that needs to be solved in the development process of any version of the mini program can be found from the database, and any one of the demand data of any version of the mini program can be provided to the engineers of the developer of the mini program, so that the engineers of the developer of the mini program can understand the characteristics of any problem that needs to be solved in the development process of any version of the mini program. At the same time, there is no need for the electronic device used to execute the data acquisition method provided by the present disclosure to send a demand data acquisition request to the second server to obtain the demand data of the corresponding version, saving resources.

[0063] In some embodiments, it also includes: after storing the current version data in the database, generating notification information indicating that the latest online version has been online; and sending the notification information to the terminal of the target user.

[0064] In the present disclosure, the target user may be an engineer of the developer of the mini program. After storing the current version data in the database, the electronic device used to execute the data acquisition method provided by the present disclosure may send a notification message indicating that the latest online version has been launched to the terminal of the target user. The electronic device used to execute the data acquisition method provided by the present disclosure may send a notification message indicating that the latest online version has been launched to the terminal of the target user, thereby timely notifying the target user that the latest online version has been launched.

[0065] In some embodiments, it also includes: receiving deletion indication information sent by the second server, wherein the deletion indication information instructs the second server to delete the third version, and the third version is the version deleted by the second server; in the case where the database stores data related to the third version, deleting the data related to the third version, and the data related to the third version includes at least one of the following: version data of the third version, requirement data of the third version.

[0066] In the present disclosure, the third version does not specifically refer to a certain version of the mini program. If the second server deletes the code of a version of the mini program, the version is the third version. For a third version, if the second server deletes the code of the third version, the second server sends a deletion instruction message to the electronic device used to execute the data acquisition method provided by the present disclosure, instructing the second server to delete the third version. In the case where the database stores data related to the third version, the electronic device used to execute the data acquisition method provided by the present disclosure deletes the data related to the target version in the database.

[0067] In the present disclosure, when the second server deletes the code of the third version of the mini-program, the electronic device used to execute the data acquisition method provided by the present disclosure can delete the data related to the target version in the database, which can save the storage space of the database.

[0068] In some embodiments, sending a version data acquisition request to the first server includes: obtaining an access token for the current version data and a uniform resource locator (URL) for the current version data; generating a version data acquisition request including an access token for the current version data and a uniform resource locator (URL) for the current version data, wherein the version data acquisition request is a Hyper Text Transfer Protocol (HTTP) request; and sending the version data acquisition request to the first server.

[0069] The mini program may be a WeChat mini program, the access token may be the access_token provided by the WeChat platform, and the first server may be a server in the WeChat platform for providing the current version data. A version data acquisition request including an access token and a uniform resource locator address may be sent to the first server. The first server determines that the device sending the version data acquisition request can obtain the current version data based on the access token of the current version data. The uniform resource locator address of the current version data is the storage path of the current version data in the file system on the first server, and the first server finds the current version data based on the uniform resource locator address of the current version data.

[0070] In the present disclosure, when the current time is the preset sending time, a version data acquisition request including an access token and a uniform resource locator address can be sent to the first server to obtain the current version data of the WeChat applet, and the duration between any two adjacent preset sending times is the preset duration. Thus, each time the latest online version of the WeChat applet is launched, the corresponding current version data of the WeChat applet is generated, and the corresponding current version data of the WeChat applet returned by the first server can be received. In the case where the database does not store the corresponding current version data, the corresponding current version data is stored in the database. Thus, the database can store version data of multiple different versions of the WeChat applet.

[0071] In some embodiments, a version identifier of a fourth version of a mini-program is received from a second server, wherein the fourth version is a new version relative to a version generated before the fourth version is generated, and the fourth version is generated by merging a base version used to obtain the fourth version and a new code relative to the base version on the second server, and the version identifier of the fourth version is sent by the second server when it is determined that the fourth version is to be generated on the second server; associated data of the fourth version is generated, the associated data of the fourth version including: the version identifier of the fourth version, and data indicating that the fourth version has been developed; and the associated data of the fourth version is stored in the database.

[0072] The fourth version is a new version relative to the version generated before the fourth version is generated. The fourth version is generated by merging the base version used to obtain the fourth version and the new code relative to the base version on the second server. The base version used to obtain the fourth version can also be called the main branch.

[0073] When the second server determines to generate the fourth version on the second server, the second server sends a version identifier of the fourth version to the electronic device used to execute the data acquisition method provided by the present disclosure. After receiving the version identifier of the fourth version sent by the second server, associated data of the fourth version can be generated, and the associated data of the fourth version includes: the version identifier of the fourth version, and data indicating that the fourth version has been developed. The associated data of the fourth version is stored in the database.

[0074] For any version of the mini program, when the version is generated on the second server, the version is used as the fourth version, and the associated data of the version can be generated and stored in the database. Therefore, when the engineers of the mini program developer need to know which versions have been developed, each associated relationship can be queried from the database, and each associated data can be provided to the engineers of the mini program developer, so that the engineers of the mini program developer can understand which versions have been developed through each associated data.

[0075] Figure 4 is a structural block diagram of a data acquisition device according to an exemplary embodiment. Figure 4 The data acquisition device includes: a sending module 401, a receiving module 402, and a storage module 403.

[0076] The sending module 401 is configured to send a version data acquisition request to the first server when the current time is the preset sending time, wherein the duration between any two adjacent preset sending times is the preset duration, and the first server is a server in the platform to which the mini program belongs;

[0077] The receiving module 402 is configured to receive the current version data of the mini program returned by the first server, wherein the current version data is the version data of the latest online version of the mini program, and the latest online version is the version that has been online and the online time is the closest to the current time;

[0078] The storage module 403 is configured to store the current version data in the database if the database does not store the current version data.

[0079] In some embodiments, the data acquisition device further comprises:

[0080] The first acquisition module is configured to send a demand data acquisition request to the second server, and the demand data acquisition request includes: a demand identifier of a first version; receiving demand data corresponding to the demand identifier sent by the second server, wherein the first version is the version to which the demand data belongs, and the demand data is used to describe the characteristics of a problem corresponding to the demand identifier, and the problem is a problem that needs to be solved during the development of the first version; if the database does not store historical demand data corresponding to the demand identifier, storing the demand data corresponding to the demand identifier in the database; if the database stores historical demand data corresponding to the demand identifier, replacing the historical demand data corresponding to the demand identifier with the demand data corresponding to the demand identifier.

[0081] In some embodiments, the data acquisition device further comprises:

[0082] The second acquisition module is configured to receive demand data corresponding to the demand identifier of the second version sent by the second server, wherein the second version is the version to which the demand data belongs, and the demand data corresponding to the demand identifier of the second version is sent by the second server when it is determined that the demand data corresponding to the demand identifier of the second version is generated on the second server; if the database does not store historical demand data corresponding to the demand identifier of the second version, the demand data corresponding to the demand identifier of the second version is stored in the database; if the database stores historical demand data corresponding to the demand identifier of the second version, the historical demand data corresponding to the demand identifier of the second version is replaced by the demand data corresponding to the demand identifier of the second version.

[0083] In some embodiments, the data acquisition device further comprises:

[0084] The notification module is configured to generate notification information indicating that the latest online version has been online after storing the current version data in the database; and send the notification information to the terminal of the target user.

[0085] In some embodiments, the data acquisition device further comprises:

[0086] A deletion module is configured to receive deletion indication information sent by a second server, wherein the deletion indication information instructs the second server to delete the third version, and the third version is the version deleted by the second server; in the case where the database stores data related to the third version, the data related to the third version is deleted, and the data related to the third version includes at least one of the following: version data of the third version and requirement data of the third version.

[0087] In some embodiments, the sending module 401 is further configured to obtain an access token for the current version data and a uniform resource location address for the current version data; generate a version data acquisition request including the access token and the uniform resource location address, wherein the version data acquisition request is a hypertext transfer protocol request; and send the version data acquisition request to the first server.

[0088] In some embodiments, the data acquisition device further comprises:

[0089] An associated data generation module is configured to receive a version identifier of a fourth version of the mini-program sent by a second server, wherein the fourth version is a new version relative to a version generated before the fourth version is generated, and the fourth version is generated by merging a basic version used to obtain the fourth version and a new code relative to the basic version on the second server, and the version identifier of the fourth version is sent by the second server when it is determined that the fourth version is to be generated on the second server; generate associated data of the fourth version, the associated data of the fourth version including: the version identifier of the fourth version, and data indicating that the fourth version has been developed; and store the associated data of the fourth version in the database.

[0090] Figure 5 is a structural block diagram of an electronic device according to an exemplary embodiment. Figure 5 The electronic device includes a processing component 522, which further includes one or more processors, and a memory resource represented by a memory 532 for storing instructions, such as applications, that can be executed by the processing component 522. The application stored in the memory 532 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 522 is configured to execute instructions to perform the above-mentioned data acquisition method.

[0091] The electronic device may also include a power supply component 526 configured to perform power management of the electronic device, a wired or wireless network interface 550 configured to connect the electronic device to a network, and an input / output (I / O) interface 558. The server may operate based on an operating system stored in the memory 532, such as Windows Server™, MacOS X™, Unix™, Linux™, FreeBSD™ or the like.

[0092] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory including instructions, and the instructions can be executed by an electronic device to complete the above data acquisition method. Optionally, the computer-readable storage medium can be a non-transitory computer-readable storage medium, for example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0093] In an exemplary embodiment, the present application also provides a computer program product, including a computer-readable code, which enables the electronic device to execute the above data acquisition method when the computer-readable code is executed on the electronic device.

[0094] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0095] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A data acquisition method, applied to an electronic device, characterized in that: The method comprises: When the current time is the preset sending time, a version data acquisition request is sent to the first server, wherein the duration between any two adjacent preset sending times is the preset duration, and the first server is a server in the platform to which the mini program belongs; Receive the current version data of the mini program returned by the first server, wherein the current version data is the version data of the latest online version of the mini program, and the latest online version is the version that has been online and the online time is the closest to the current time; If the database does not store the current version data, store the current version data in the database; Sending a demand data acquisition request to the second server, the demand data acquisition request including: a demand identifier of the first version; Receiving demand data corresponding to the demand identifier sent by the second server, wherein the first version is the version to which the demand data belongs, and the demand data is used to describe the characteristics of the problem corresponding to the demand identifier, and the problem is a problem that needs to be solved during the development of the first version; If the database does not store historical demand data corresponding to the demand identifier, storing the demand data corresponding to the demand identifier in the database; In the case where the database stores historical demand data corresponding to the demand identifier, the historical demand data corresponding to the demand identifier is replaced by the demand data corresponding to the demand identifier.

2. The method according to claim 1, characterized in that The method further comprises: receiving demand data corresponding to the demand identifier of the second version sent by the second server, wherein the second version is the version to which the demand data belongs, and the demand data corresponding to the demand identifier of the second version is sent by the second server when it is determined that the demand data corresponding to the demand identifier of the second version is generated on the second server; If the database does not store historical demand data corresponding to the demand identifier of the second version, storing the demand data corresponding to the demand identifier of the second version in the database; In the case where the database stores historical demand data corresponding to the demand identifier of the second version, the historical demand data corresponding to the demand identifier of the second version is replaced by the demand data corresponding to the demand identifier of the second version.

3. The method according to claim 1, characterized in that The method further comprises: After storing the current version data in the database, generating notification information indicating that the latest online version has been online; The notification information is sent to the terminal of the target user.

4. The method according to claim 1, characterized in that: The method further comprises: receiving deletion indication information sent by the second server, wherein the deletion indication information instructs the second server to delete a third version, where the third version is a version deleted by the second server; In the case where the database stores data related to the third version, the data related to the third version is deleted, and the data related to the third version includes at least one of the following: version data of the third version and requirement data of the third version.

5. The method according to claim 1, characterized in that Sending a version data acquisition request to the first server includes: Obtaining an access token for the current version of the data and a uniform resource locator address for the current version of the data; Generate a version data acquisition request including the access token and the uniform resource locator address, wherein the version data acquisition request is a hypertext transfer protocol request; A version data acquisition request is sent to the first server.

6. The method according to claim 5, characterized in that The method further comprises: Receive a version identifier of a fourth version of the mini-program sent by a second server, wherein the fourth version is a version newly added relative to a version generated before the fourth version is generated, the fourth version is generated by merging a base version used to obtain the fourth version and a new code relative to the base version on the second server, and the version identifier of the fourth version is sent by the second server when it is determined that the fourth version is generated on the second server; generating associated data of the fourth version, wherein the associated data of the fourth version includes: a version identifier of the fourth version and data indicating that the fourth version has been developed; The associated data of the fourth version is stored in the database.

7. A data acquisition device, characterized in that: The device comprises: A sending module, configured to send a version data acquisition request to a first server when the current time is a preset sending time, wherein the duration between any two adjacent preset sending times is a preset duration, and the first server is a server in the platform to which the mini program belongs; A receiving module is configured to receive the current version data of the mini program returned by the first server, wherein the current version data is the version data of the latest online version of the mini program, and the latest online version is the version that has been online and the online time is the closest to the current time; A storage module configured to store the current version data in the database if the database does not store the current version data; The first acquisition module is configured to send a demand data acquisition request to the second server, and the demand data acquisition request includes: a demand identifier of a first version; receiving demand data corresponding to the demand identifier sent by the second server, wherein the first version is the version to which the demand data belongs, and the demand data is used to describe the characteristics of a problem corresponding to the demand identifier, and the problem is a problem that needs to be solved during the development of the first version; if the database does not store historical demand data corresponding to the demand identifier, storing the demand data corresponding to the demand identifier in the database; if the database stores historical demand data corresponding to the demand identifier, replacing the historical demand data corresponding to the demand identifier with the demand data corresponding to the demand identifier.

8. The device according to claim 7, characterized in that The device also includes: The second acquisition module is configured to receive demand data corresponding to the demand identifier of the second version sent by the second server, wherein the second version is the version to which the demand data belongs, and the demand data corresponding to the demand identifier of the second version is sent by the second server when it is determined that the demand data corresponding to the demand identifier of the second version is generated on the second server; if the database does not store historical demand data corresponding to the demand identifier of the second version, the demand data corresponding to the demand identifier of the second version is stored in the database; if the database stores historical demand data corresponding to the demand identifier of the second version, the historical demand data corresponding to the demand identifier of the second version is replaced by the demand data corresponding to the demand identifier of the second version.

9. The device according to claim 8, characterized in that The device also includes: The notification module is configured to generate notification information indicating that the latest online version has been online after storing the current version data in the database; and send the notification information to the terminal of the target user.

10. The device according to claim 8, characterized in that The device also includes: A deletion module is configured to receive deletion indication information sent by a second server, wherein the deletion indication information instructs the second server to delete a third version, and the third version is the version deleted by the second server; in the case where a database stores data related to the third version, the data related to the third version is deleted, and the data related to the third version includes at least one of the following: version data of the third version and requirement data of the third version.

11. The device according to claim 8, characterized in that The sending module is further configured to obtain an access token for the current version data and a uniform resource location address for the current version data; generate a version data acquisition request including the access token and the uniform resource location address, wherein the version data acquisition request is a hypertext transfer protocol request; and send the version data acquisition request to the first server.

12. The device according to claim 11, characterized in that The device also includes: An associated data generation module is configured to receive a version identifier of a fourth version of the mini-program sent by a second server, wherein the fourth version is a new version relative to a version generated before the fourth version is generated, and the fourth version is generated by merging a basic version used to obtain the fourth version and a new code relative to the basic version on the second server, and the version identifier of the fourth version is sent by the second server when it is determined that the fourth version is to be generated on the second server; generate associated data of the fourth version, the associated data of the fourth version including: the version identifier of the fourth version, and data indicating that the fourth version has been developed; and store the associated data of the fourth version in the database.

13. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the method according to any one of claims 1 to 6.

14. A computer-readable storage medium, when instructions in the computer-readable storage medium are executed by a processor of an electronic device, a terminal executes the method according to any one of claims 1 to 6.

15. A computer program product, comprising a computer readable code, which, when executed on an electronic device, enables the electronic device to execute the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Data synchronous drawing and issuing method and apparatus

    CN104967653A