A data transmission method, apparatus, electronic device, and readable storage medium

By pre-storing the mapping relationship between the App's functional information and version number range on the server side, the problem of low server data return efficiency is solved, and fast and accurate data response is achieved.

CN114168184BActive Publication Date: 2025-11-14BEIJING 58 INFORMATION TTECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111405737.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-24
Publication Date
2025-11-14
Estimated Expiration
2041-11-24

AI Technical Summary

Technical Problem

During the use of the app, the server needs to perform complex version control based on different versions of the app, resulting in low data return efficiency.

Method used

The server pre-stores the mapping relationship between application function information and version number range. By receiving the function information and version number in the data request from the client device, it finds the corresponding version number range, determines the target version number, and sends the corresponding service data.

Benefits of technology

This improves the efficiency of the server returning data to the client device, avoids complex judgments on different versions, and achieves fast data response.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114168184B_ABST
    Figure CN114168184B_ABST
Patent Text Reader

Abstract

This application provides a data transmission method, apparatus, electronic device, and readable storage medium. The method includes: receiving a data request sent by a client device, wherein the data request includes functional information and a version number of a target application; searching a range of version numbers corresponding to the functional information from a pre-stored mapping relationship, wherein the mapping relationship includes a correspondence between functional information and version number ranges; determining a target version number matching the target application installed on the client device based on the version number and the searched version number range; and sending service data corresponding to the target version number to the client device, wherein the service data corresponds to the functional information. Therefore, this application solves the problem of low efficiency in server-to-client data return during application usage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a data transmission method, apparatus, electronic device, and readable storage medium. Background Technology

[0002] Currently, during the use of terminal device applications (Apps), new features are constantly being added and new versions are released. However, new App versions require user authorization for installation and updates, which may result in users using every version of the App. As the data provider, the App's server needs to flexibly return different data protocols based on the data requests of different App versions to ensure the proper functioning of each version. This necessitates extensive version control measures in the server's code and templates.

[0003] For example, an app installed on a client device releases a new version every month. If each new version of the app has changes to its functional pages (such as adding new modules, removing modules, or modifying modules), this adds multiple types of code to the app server. If multiple different versions of the app send data requests to the server simultaneously, the server needs to determine the version. However, the code from different versions is coupled together, reducing the efficiency of the server in returning data to the user. Summary of the Invention

[0004] This application provides a data transmission method, apparatus, electronic device, and readable storage medium to solve the problem of low efficiency in returning data from the server to the client device during the use of an App.

[0005] In a first aspect, embodiments of this application provide a data transmission method, the method comprising:

[0006] Receive a data request sent by a client device, wherein the data request includes the functional information and version number of the target application;

[0007] From the pre-stored mapping relationship, find the version number range corresponding to the function information, wherein the mapping relationship includes the correspondence between function information and version number range;

[0008] Based on the version number and the range of version numbers obtained from the search, determine the target version number that matches the target application installed on the client device;

[0009] Send service data corresponding to the target version number to the client device, wherein the service data corresponds to the function information.

[0010] Secondly, embodiments of this application provide a data transmission apparatus, the apparatus comprising:

[0011] A receiving module is used to receive data requests sent by a client device, wherein the data request includes functional information and version number of the target application;

[0012] The lookup module is used to look up the version number range corresponding to the function information from a pre-stored mapping relationship, wherein the mapping relationship includes the correspondence between function information and version number range;

[0013] The determination module is used to determine a target version number that matches the target application installed on the client device, based on the version number and the range of version numbers obtained from the search.

[0014] The sending module is used to send service data corresponding to the target version number to the client device, wherein the service data corresponds to the functional information.

[0015] Thirdly, embodiments of this application provide an electronic device, including a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the data transmission method described above.

[0016] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the data transmission method described above.

[0017] In this embodiment, the server can receive a data request sent by a client device, wherein the data request includes functional information and version number of a target application; search for a range of version numbers corresponding to the functional information from a pre-stored mapping relationship, wherein the mapping relationship includes a correspondence between functional information and version number ranges; determine a target version number that matches the target application installed on the client device based on the version number and the found version number range; and send service data corresponding to the target version number to the client device, wherein the service data corresponds to the functional information.

[0018] Therefore, in this embodiment, the mapping relationship between different functional information of an application and different version number ranges can be pre-stored. When the server receives a data request from a client device, it only needs to look up the version number range corresponding to the functional information carried in the data request within this mapping relationship. Based on the found version number range and the version number carried in the data request, the server returns service data corresponding to the functional information carried in the data request to the client device. This eliminates the need to determine each version as in existing technologies. Therefore, in this embodiment, the server can quickly return the data requested by the client device, thus solving the problem of low efficiency in returning data to the client device. Attached Figure Description

[0019] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 This is a flowchart illustrating the steps of a data transmission method provided in an embodiment of this application;

[0021] Figure 2 This is a schematic diagram of the storage directory of the code files of an application provided in an embodiment of this application;

[0022] Figure 3 This is a flowchart of the steps in the preprocessing stage on the server side in an embodiment of this application;

[0023] Figure 4 This is a flowchart of the actual application stage on the server side in the embodiments of this application;

[0024] Figure 5 This is a structural block diagram of a data transmission device provided in an embodiment of this application. Detailed Implementation

[0025] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0026] The data transmission method of this application embodiment can run on a terminal device or a server. The terminal device can be a local terminal device. When the method runs on a server, it can be for cloud display.

[0027] In one optional implementation, cloud display refers to an information display method based on cloud computing. In the cloud display operating mode, the main body running the information processing program and the main body presenting the information screen are separate. The storage and operation of the display switching method are completed on the cloud display server. The role of the cloud display client is to receive and send data and present the information screen. For example, the cloud display client can be a display device with data transmission capabilities located close to the user, such as a mobile terminal, television, computer, or PDA; however, the terminal device for processing information data is the cloud display server in the cloud. When browsing, the user operates the cloud display client to send operation commands to the cloud display server. The cloud display server displays information according to the operation commands, encodes and compresses the data, returns it to the cloud display client via the network, and finally, the cloud display client decodes and outputs the displayed content.

[0028] In another alternative implementation, the terminal device can be a local terminal device. The local terminal device stores applications and is used to present the application interface. The local terminal device is used to interact with the user through a graphical user interface, i.e., conventionally downloading, installing, and running applications via an electronic device. The local terminal device can provide the graphical user interface to the user in various ways, such as rendering it on a terminal's display screen or providing it to the user through holographic projection. For example, the local terminal device can include a display screen for presenting the graphical user interface, which includes application screens, and a processor for running the application, generating the graphical user interface, and controlling the display of the graphical user interface on the display screen.

[0029] In this embodiment, the server can receive a data request sent by a client device, wherein the data request includes functional information and version number of a target application; search for a range of version numbers corresponding to the functional information from a pre-stored mapping relationship, wherein the mapping relationship includes a correspondence between functional information and version number ranges; determine a target version number that matches the target application installed on the client device based on the version number and the found version number range; and send service data corresponding to the target version number to the client device, wherein the service data corresponds to the functional information.

[0030] Therefore, in this embodiment, the mapping relationship between different functional information of an application and different version number ranges can be pre-stored. When the server receives a data request from a client device, it only needs to look up the version number range corresponding to the functional information carried in the data request within this mapping relationship. Based on the found version number range and the version number carried in the data request, the server returns service data corresponding to the functional information carried in the data request to the client device. This eliminates the need to determine each version as in existing technologies. Therefore, in this embodiment, the server can quickly return the data requested by the client device, thus solving the problem of low efficiency in returning data to the client device.

[0031] The data transmission method provided in the embodiments of this application will be described in detail below.

[0032] Reference Figure 1 This document illustrates a flowchart of the steps of a data transmission method according to an embodiment of this application. The method is applied to a server, such as... Figure 1 As shown, the method may include steps 101 to 105.

[0033] Step 101: Receive a data request sent by the client device, wherein the data request includes the function information and version number of the target application.

[0034] In this embodiment of the application, the target application is one of the applications installed on the client device.

[0035] In addition, the client device can be a mobile phone, a computer, etc. That is, step 101 can be receiving a data request sent by a mobile phone or a computer.

[0036] In addition, the functional information refers to the useful functions of the application (such as the sending function and voice function of the mobile application); the version number can be the identifier of the target application version, and an application must include at least one version number.

[0037] It should be noted that the client device can send a data request to the server when the user authorizes the acquisition of certain function information; the client device can also automatically send a data request to the server when the user is using a certain function; or the client device can automatically send a data request to the server when the user opens the target application.

[0038] Step 102: Find the version number range corresponding to the function information from the pre-stored mapping relationship, wherein the mapping relationship includes the correspondence between function information and version number range.

[0039] In addition, in the embodiments of this application, one function information corresponds to a version number range. For example, the version number range corresponding to the function of viewing personal information of application A can be "10.17.00.00 to 10.18.00.00"; or, the version number range corresponding to the function of viewing enterprise information of application A can be "11.07.00.00 to 11.08.00.00".

[0040] Step 103: Based on the version number and the obtained version number range, determine the target version number that matches the target application installed on the client device.

[0041] The target version number is used to locate the service data requested by the target application installed on the client device. In other words, the target version number is the version number of the service data corresponding to the functional information returned by the server to the client device.

[0042] In addition, once the target version number is determined, the server can obtain service data corresponding to the target version number and the functional information carried in the data request.

[0043] Step 104: Send service data corresponding to the target version number to the client device, wherein the service data corresponds to the function information.

[0044] In the embodiments of this application, the service data sent by the server to the client device is service data corresponding to the target version number and the functional information carried in the data request sent by the client device. That is, the service data sent by the server to the client device can be applied to the target application with the target version number and implement the function indicated by the functional information carried in the aforementioned data request.

[0045] As can be seen from steps 101 to 104 above, in the embodiments of this application, the server can receive data requests sent by client devices, wherein the data requests include functional information and version number of the target application; search for the version number range corresponding to the functional information from a pre-stored mapping relationship, wherein the mapping relationship includes the correspondence between functional information and version number ranges; determine a target version number matching the target application installed on the client device based on the version number and the found version number range; and send service data corresponding to the target version number to the client device, wherein the service data corresponds to the functional information.

[0046] Therefore, in this embodiment, the mapping relationship between different functional information of an application and different version number ranges can be pre-stored. When the server receives a data request from a client device, it only needs to look up the version number range corresponding to the functional information carried in the data request within this mapping relationship. Based on the found version number range and the version number carried in the data request, the server returns service data corresponding to the functional information carried in the data request to the client device. This eliminates the need to determine each version as in existing technologies. Therefore, in this embodiment, the server can quickly return the data requested by the client device, thus solving the problem of low efficiency in returning data to the client device.

[0047] Optionally, determining the target version number that matches the target application installed on the client device based on the version number and the obtained version number range includes:

[0048] If the version number is greater than or equal to the lower limit of the version number range and less than the upper limit of the version number range, the version number corresponding to the lower limit of the version number range is determined to be the target version number that matches the target application installed on the client device.

[0049] The lower limit of the version number range is the minimum value in the version number range, and the upper limit of the version number range is the maximum value in the version number range. For example, if the version number range is from "10.17.00.00" to "10.18.00.00", then "10.17.00.00" is the version number corresponding to the lower limit value, and "10.18.00.00" is the version number corresponding to the upper limit value.

[0050] For example, if the version number of the target application installed on the client device is "10.17.01.01", and the range of the obtained version number is "10.17.00.00 to 10.18.00.00", then the version number of the target program is greater than the lower limit of the version number range and less than the upper limit, so the target version number is "10.17.00.00".

[0051] Furthermore, in the embodiments of this application, when the version number of the target program is equal to the lower limit of the version number range, the version number corresponding to the lower limit of the version number range is determined as the target version number that matches the target application.

[0052] Optionally, determining the target version number that matches the target application installed on the client device based on the version number and the obtained version number range further includes:

[0053] If the version number is greater than or equal to the upper limit of the version number range, the version number corresponding to the upper limit of the version number range is determined to be the target version number that matches the target application installed on the client device.

[0054] In this embodiment of the application, for example, if the version number range is from "10.17.00.00" to "10.18.00.00", then "10.17.00.00" is the version number corresponding to the lower limit value, and "10.18.00.00" is the version number corresponding to the upper limit value.

[0055] For example, if the version number of the target application installed on the client device is "10.18.01.01", and the range of the obtained version number is "10.17.00.00 to 10.18.00.00", then the version number of the target program is greater than the upper limit of the version number range, so the target version number is "10.18.00.00".

[0056] Furthermore, in the embodiments of this application, when the version number of the target program is equal to the upper limit of the version number range, the version number corresponding to the upper limit of the version number range is determined as the target version number that matches the target application.

[0057] It should also be noted that if the version number is less than the lower limit of the version number range, then the target application does not have a matching target version number. For example, if the version number range is "10.17.00.00" to "10.18.00.00", and the target application's version number is "10.16.01.01", then the target application does not have a matching target version number. In this case, the server cannot return service data to the client device.

[0058] Optionally, the method further includes:

[0059] If the version number is less than the lower limit of the version number range, a preset indication message is sent to the client device, wherein the preset indication message is used to indicate that there is no service data that matches the version number of the target application.

[0060] After receiving the preset instruction, the client device will display a preset prompt on its screen. This prompt indicates that the version number of the target application installed on the client device is too low and needs to be updated. The prompt can include a "Confirm Update" button; clicking this button will install the latest version of the target application on the client device.

[0061] Optionally, sending service data corresponding to the target version number to the client device includes:

[0062] From the reserved storage space of the target version number, obtain the code file of the function indicated by the function information, wherein the code file of the same function is stored in the storage space of different version numbers;

[0063] The service data is sent to the client device according to the code file of the function indicated by the function information.

[0064] The storage space can be a data folder. In this embodiment, a data folder with a version number stores multiple code files with different functions. For example, the data folder with version number "10.17.00.00" stores code files such as "instant messaging function file (im.vm)" and "call function file (tel.vm)".

[0065] Furthermore, in this embodiment, code files with the same functionality are stored in storage spaces with different version numbers; that is, storage spaces with different version numbers can store code files with the same functionality. Therefore, the functionality of the target application can be determined by which code files with a given version number are stored in that storage space. For example, if "im.vm" is stored in storage spaces with version numbers "10.17.00.00", "10.18.00.00", and "10.19.00.00", then target applications with version numbers "10.17.00.00", "10.18.00.00", and "10.19.00.00" can all implement instant messaging functionality.

[0066] Furthermore, it should be noted that code files stored within a specific version number's storage space can be extracted using custom velocity and rewparse tags. For example, the storage directory for an application's code files might be as follows: Figure 2 As shown, to extract the userinfoarea.vm code file under version 10.17.00.00, the extraction method is "#rewparse("、 / 、 / job100100 / fragment / 10170000 / userinfoarea.vm")".

[0067] Velocity is a template engine based on the Java programming language. Through specific syntax, Velocity can obtain objects defined in the Java language, thereby achieving true separation between the interface and Java code.

[0068] Furthermore, sending the service data to the client device according to the code file of the function indicated by the function information includes:

[0069] Using a pre-set data protocol, the code file indicating the function in the function information is converted into the service data;

[0070] The service data is sent to the client device.

[0071] Therefore, after obtaining the code file corresponding to the functional information and target version number carried in the data request, the server can convert the code file into service data and send it to the client device. For example, if the code file is "im.vm", it can be converted into service data corresponding to the instant messaging function and then sent to the client device.

[0072] Optionally, before retrieving the code file for the function indicated by the function information from the reserved storage space of the target version number, the method further includes:

[0073] Obtain at least one page code file from different versions of the target application;

[0074] The page code file is split according to its function to obtain multiple function code files corresponding to the version number of the page code file;

[0075] Determine the storage space that corresponds one-to-one with the version number of the target application;

[0076] The code files for the multiple functions are stored in the storage space corresponding to the version number of the code files for the multiple functions.

[0077] Among them, the page code file can be the page that implements the function of the target application; a page can be split into multiple function code files according to function. For example, the recruitment page in application A (version number such as "10.17.00.00") can be split according to function (such as basic information, company information, recommendation list) to obtain code files for viewing basic information, code files for viewing company information, and code files for viewing recommendation list.

[0078] Furthermore, when splitting a page code file, code blocks are obtained. These code blocks are then combined according to function to obtain a code file corresponding to a function (also known as a function fragment). That is, a page code file can be split into multiple function fragments, and a function fragment includes multiple code blocks.

[0079] Furthermore, in this embodiment, for each version number of the target application, a storage space is reserved to store the functional code files obtained by splitting the page code files of the corresponding version number. For example... Figure 2This is the storage directory for the code files of application A. The data folder with version number "10.17.00.00" stores the application function files ("apply.vm"), "im.vm", "tel.vm", and the user information file ("userinfoarea") obtained after splitting the page code files of application A with version number "10.17.00.00". The data folder with version number "10.18.00.00" stores the "apply.vm", enterprise information file ("companyenv.vm"), "im.vm", "tel.vm", and "userinfoarea" obtained after splitting the page code files of application A with version number "10.18.00.00".

[0080] Therefore, storing code files for multiple functions within the storage space corresponding to the version numbers of those functions aligns with the Open / Closed Principle in software development, ensuring openness for extension but closedness for modification; it also conforms to the Single Responsibility Principle, ensuring that each version number's code file implements only one function. This makes the code files more concise and clear; when troubleshooting or clarifying logic, only the code file corresponding to the specified version number needs to be located. Furthermore, modifications to the code file for one version number will not affect code files for other versions.

[0081] As can be seen from the above, in this embodiment of the application, the code of different versions of the application is not coupled together, but is split according to function and stored in the storage space of the corresponding version. In this way, the code is flexible, concise, easy to manage, and highly readable.

[0082] Optionally, the process of establishing the mapping relationship includes:

[0083] Get the version number corresponding to the storage space where the code file of the i-th function is located, and use it as the i-th version number;

[0084] Obtain the maximum and minimum values ​​of the i-th version number, and establish a mapping relationship between the version number range represented by the maximum and minimum values ​​and the functional information of the i-th function;

[0085] Where i is any integer from 1 to n, and n is the number of types of functions of the code files stored in the storage space.

[0086] For example, the i-th function is the sending function. The version numbers corresponding to the storage space where the code file of this function is located are "10.17.00.00", "10.17.05.00", and "10.18.00.00". That is, the code file of the sending function is stored in the storage space of "10.17.00.00", "10.17.05.00", and "10.18.00.00". Among these version numbers, the maximum value is "10.18.00.00" and the minimum value is "10.17.00.00". Therefore, the version number range corresponding to the sending function is "10.17.00.00" to "10.18.00.00".

[0087] Optionally, the version number range in the mapping relationship is represented using a preset format;

[0088] The step of determining the target version number that matches the target application installed on the client device based on the version number and the obtained version number range includes:

[0089] Convert the version number to the preset format to obtain the converted version number;

[0090] Based on the converted version number and the range of version numbers obtained from the search, a target version number that matches the target application installed on the client device is determined.

[0091] The version number can be represented by 8 digits, for example, the default format for the version number range is "00.00.00.00" to "99.99.99.99". If the version number of the target application installed on the received client device is "7.1.5", it can be converted to "07.01.05.00".

[0092] Additionally, after obtaining the version number of the target application after conversion, it can be compared with the obtained version number range. If the version number of the target application is greater than or equal to the lower limit of the version number range and less than the upper limit of the version number range, the version number corresponding to the lower limit of the version number range is determined as the target version number matching the target application; or, if the version number of the target application is greater than or equal to the upper limit of the version number range, the version number corresponding to the upper limit of the version number range is determined as the target version number matching the target application.

[0093] In summary, the specific implementation method of the data transmission method in this application can be described as follows: Firstly, as... Figure 3 As shown, the server's pre-processing stage includes steps H1 to H6 as described below.

[0094] Step H1: Obtain a page code file for the application with different version numbers.

[0095] Step H2: Split the page code file to obtain multiple code blocks, and combine the code blocks according to their functions to obtain multiple function code files corresponding to the version number of the page code file.

[0096] Step H3: Create a data folder that corresponds one-to-one with the application's version number, where the name of the data folder is the same as its corresponding version number.

[0097] Step H4: Store the code files for multiple functions in the data folder corresponding to the version number of the code files for multiple functions.

[0098] Step H5: Create a storage directory for the code files according to the version number.

[0099] Step H6: Based on the storage directory, obtain the version number corresponding to the data folder where the code file of the i-th function is located, and use it as the i-th version number; where i is any integer from 1 to n, and n is the number of function types of the code files stored in all data folders.

[0100] Step H7: Obtain the maximum and minimum values ​​of the i-th version number, and establish a mapping relationship between the version number range represented by the maximum and minimum values ​​and the functional information of the i-th function.

[0101] Secondly, such as Figure 4 The actual application stage on the server side shown includes steps H8 to H13 as described below.

[0102] Step H8: The server receives a data request sent by the client device, wherein the data request includes the functional information and version number of the target application.

[0103] Step H9: Based on the functional information of the target application, find the version number range corresponding to the functional information from the pre-stored mapping relationship between functional information and version number range.

[0104] Step H10: Convert the version number of the target application to a preset format to obtain the converted version number;

[0105] Step H11: Based on the converted version number and the found version number range, determine the target version number that matches the target application. Specifically, if the converted version number is greater than or equal to the lower limit of the version number range and less than the upper limit of the version number range, determine the version number corresponding to the lower limit of the version number range, which is the target version number that matches the target application; if the converted version number is greater than or equal to the upper limit of the version number range, determine the version number corresponding to the upper limit of the version number range, which is the target version number that matches the target application.

[0106] Step H12: Obtain the code file indicating the function of the target application from the data folder of the target version number.

[0107] Step H13: Convert the code file indicating the function of the target application's function information into service data and send it to the client device.

[0108] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of this application are not limited to the described order of actions, because according to the embodiments of this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of this application.

[0109] Reference Figure 5 The diagram illustrates a structural block diagram of a data transmission device 500 according to an embodiment of this application. The data transmission device 500 may include the following modules:

[0110] The receiving module 501 is used to receive a data request sent by the client device, wherein the data request includes the functional information and version number of the target application;

[0111] The lookup module 502 is used to look up the version number range corresponding to the function information from a pre-stored mapping relationship, wherein the mapping relationship includes the correspondence between function information and version number range;

[0112] The determining module 503 is used to determine a target version number that matches the target application installed on the client device, based on the version number and the version number range obtained from the search.

[0113] The sending module 504 is used to send service data corresponding to the target version number to the client device, wherein the service data corresponds to the function information.

[0114] Optionally, the determining module 503 includes:

[0115] The first determining submodule is used to determine, when the version number is greater than the lower limit of the version number range and less than the upper limit of the version number range, the version number corresponding to the lower limit of the version number range, and the version number is a target version number that matches the target application installed on the client device.

[0116] Optionally, the determining module 503 further includes:

[0117] The second determining submodule is used to determine, when the version number is greater than the upper limit of the version number range, the version number corresponding to the upper limit of the version number range, and to determine the target version number that matches the target application installed on the client device.

[0118] Optionally, the sending module 504 includes:

[0119] The code file acquisition submodule is used to acquire the code file of the function indicated by the function information from the reserved storage space of the target version number, wherein code files of the same function are stored in storage spaces of different version numbers;

[0120] The service data sending submodule is used to send the service data to the client device according to the code file of the function indicated by the function information.

[0121] Optionally, the data transmission device 500 further includes:

[0122] The page code file acquisition module is used to acquire at least one page code file of different versions of the target application;

[0123] The splitting module is used to split the page code file according to its functions to obtain code files for multiple functions corresponding to the version number to which the page code file belongs;

[0124] A storage space determination module is used to determine the storage space that corresponds one-to-one with the version number of the target application.

[0125] The storage module is used to store the code files for the multiple functions in a storage space corresponding to the version number of the code files for the multiple functions.

[0126] Optionally, the data transmission device 500 further includes:

[0127] The version number acquisition module is used to obtain the version number corresponding to the storage space where multiple code files of the i-th function are located, and use it as the i-th version number;

[0128] The mapping relationship establishment module is used to obtain the maximum and minimum values ​​of the i-th version number, and establish a mapping relationship between the version number range represented by the maximum and minimum values ​​and the functional information of the i-th function;

[0129] Where i is any integer from 1 to n, and n is the number of types of functions of the code files stored in the storage space.

[0130] Optionally, the version number range in the mapping relationship is represented using a preset format;

[0131] The determining module 503 is specifically used for:

[0132] Convert the version number to the preset format to obtain the converted version number;

[0133] Based on the converted version number and the range of version numbers obtained from the search, a target version number that matches the target application installed on the client device is determined.

[0134] As described above, in the embodiments of this application, the server can receive data requests sent by a client device, wherein the data request includes functional information and version number of a target application; search for a range of version numbers corresponding to the functional information from a pre-stored mapping relationship, wherein the mapping relationship includes a correspondence between functional information and version number ranges; determine a target version number matching the target application installed on the client device based on the version number and the searched version number range; and send service data corresponding to the target version number to the client device, wherein the service data corresponds to the functional information.

[0135] Therefore, in this embodiment, the mapping relationship between different functional information of an application and different version number ranges can be pre-stored. When the server receives a data request from a client device, it only needs to look up the version number range corresponding to the functional information carried in the data request within this mapping relationship. Based on the found version number range and the version number carried in the data request, the server returns service data corresponding to the functional information carried in the data request to the client device. This eliminates the need to determine each version as in existing technologies. Therefore, in this embodiment, the server can quickly return the data requested by the client device, thus solving the problem of low efficiency in returning data to the client device.

[0136] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.

[0137] This application also provides an electronic device, including:

[0138] One or more processors; and one or more machine-readable media thereon storing instructions that, when executed by the one or more processors, cause the electronic device to perform the methods described in the embodiments of this application.

[0139] This application also provides one or more machine-readable media storing instructions that, when executed by one or more processors, cause the processors to perform the methods described in this application.

[0140] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0141] Those skilled in the art will understand that embodiments of this application can be provided as methods, apparatus, or computer program products. Therefore, embodiments of this application can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of this application can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0142] This application describes embodiments with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0143] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0144] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0145] Although preferred embodiments of the present application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present application.

[0146] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.

[0147] The data transmission method and apparatus provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A data transmission method, characterized in that, The method includes: The system receives a data request sent by a client device, wherein the data request includes the function information and version number of the target application; the data request is sent by the client device when the user authorizes the acquisition of function information, the user is using the function, or the user has opened the target application. From the pre-stored mapping relationship, find the version number range corresponding to the function information, wherein the mapping relationship includes the correspondence between function information and version number range; Based on the version number and the range of version numbers obtained from the search, determine the target version number that matches the target application installed on the client device; Obtain at least one page code file from different versions of the target application; The page code file is split according to its function to obtain multiple function code files corresponding to the version number of the page code file; Determine the storage space that corresponds one-to-one with the version number of the target application; The code files for the multiple functions are stored in the storage space corresponding to the version number of the code files for the multiple functions; Send service data corresponding to the target version number to the client device, wherein the service data corresponds to the functional information; The mapping relationship represents the mapping relationship between the maximum and minimum values ​​of the i-th version number and the functional information of the i-th function. The i-th version number is the version number corresponding to the storage space where the code file of the i-th function is located. i is each integer from 1 to n, and n is the number of types of functions of the code files stored in the storage space. Sending service data corresponding to the target version number to the client device includes: From the reserved storage space of the target version number, the code file of the function indicated by the function information is obtained by custom speed tag and re-parsing tag, wherein the code file of the same function is stored in the storage space of different version numbers; The service data is sent to the client device according to the code file of the function indicated by the function information.

2. The method according to claim 1, characterized in that, The step of determining the target version number that matches the target application installed on the client device based on the version number and the obtained version number range includes: If the version number is greater than or equal to the lower limit of the version number range and less than the upper limit of the version number range, the version number corresponding to the lower limit of the version number range is determined to be the target version number that matches the target application installed on the client device.

3. The method according to claim 2, characterized in that, The step of determining the target version number that matches the target application installed on the client device based on the version number and the obtained version number range further includes: If the version number is greater than or equal to the upper limit of the version number range, the version number corresponding to the upper limit of the version number range is determined to be the target version number that matches the target application installed on the client device.

4. The method according to claim 1, characterized in that, The process of establishing the mapping relationship includes: Get the version number corresponding to the storage space where the code file of the i-th function is located, and use it as the i-th version number; Obtain the maximum and minimum values ​​of the i-th version number, and establish a mapping relationship between the version number range represented by the maximum and minimum values ​​and the functional information of the i-th function; Where i is any integer from 1 to n, and n is the number of types of functions of the code files stored in the storage space.

5. The method according to claim 1, characterized in that, The version number range in the mapping relationship is represented using a preset format; The step of determining the target version number that matches the target application installed on the client device based on the version number and the obtained version number range includes: Convert the version number to the preset format to obtain the converted version number; Based on the converted version number and the range of version numbers obtained from the search, a target version number that matches the target application installed on the client device is determined.

6. A data transmission device, characterized in that, The device includes: A receiving module is used to receive data requests sent by a client device, wherein the data request includes functional information and version number of a target application; the data request is sent by the client device when the user authorizes access to functional information, the user is using the function, or the user has opened the target application; The lookup module is used to look up the version number range corresponding to the function information from a pre-stored mapping relationship, wherein the mapping relationship includes the correspondence between function information and version number range; The determination module is used to determine a target version number that matches the target application installed on the client device, based on the version number and the range of version numbers obtained from the search. A sending module is used to send service data corresponding to the target version number to the client device, wherein the service data corresponds to the functional information; The device further includes: The page code file acquisition module is used to acquire at least one page code file of different versions of the target application; The splitting module is used to split the page code file according to its functions to obtain code files for multiple functions corresponding to the version number to which the page code file belongs; A storage space determination module is used to determine the storage space that corresponds one-to-one with the version number of the target application. The storage module is used to store the code files for the multiple functions in a storage space corresponding to the version number of the code files for the multiple functions; The mapping relationship represents the mapping relationship between the maximum and minimum values ​​of the i-th version number and the functional information of the i-th function. The i-th version number is the version number corresponding to the storage space where the code file of the i-th function is located. i is each integer from 1 to n, and n is the number of types of functions of the code files stored in the storage space. The sending module includes: The code file acquisition submodule is used to acquire the code file of the function indicated by the function information from the reserved storage space of the target version number by means of a custom speed tag and a re-parsing tag, wherein code files of the same function are stored in storage spaces of different version numbers; The service data sending submodule is used to send the service data to the client device according to the code file of the function indicated by the function information.

7. An electronic device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the data transmission method as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, which, when executed by a processor, implements the steps of the data transmission method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Compiling method of source code and related equipment

    CN105511933A

  • Method and device for sending application information

    CN107957882A

  • Network shop generation method and device

    CN108304190A