Web page business data processing method, device, equipment and storage medium

By using arrays to assemble business data in Web pages, the problems of large memory consumption and slow loading speed caused by accumulation operation symbols are solved, the loading speed and customer experience are improved, and the workload of web developers is reduced.

CN113626103BActive Publication Date: 2024-09-24SHENZHEN PING AN MEDICAL HEALTH TECHNOLOGY SERVICES CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110908886.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-09
Publication Date
2024-09-24
Estimated Expiration
2041-08-09

AI Technical Summary

Technical Problem

In the existing technology, when a Web page accumulates a large amount of business data, the accumulation operation symbol is used, which leads to large memory consumption and slow loading speed, which affects the customer experience.

Method used

By obtaining the client's string assembly request, create an array, obtain and assign business data collections, use the JION method of the array for data assembly, send the target string and delete the array, avoiding the use of cumulative operation symbols.

Benefits of technology

It increases the speed of assembling business data, increases the loading speed of web pages, improves customer experience, and reduces the workload of web developers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113626103B
    Figure CN113626103B
Patent Text Reader

Abstract

The present application relates to the field of client technology, and discloses a method, device, equipment and storage medium for processing business data of a Web page, wherein the method comprises: obtaining a string assembly request sent by a client in the process of loading a target Web page, the string assembly request carrying assembly configuration data; responding to the string assembly request, creating an array to obtain an array to be assigned; obtaining a set of business data to be assembled according to the assembly configuration data; assigning values ​​to the array to be assigned according to the set of business data to be assembled to obtain a target array; assembling business data according to the target array to obtain a target string; sending the target string to the client, deleting the target array, and the target string is used by the client to load the target Web page. Avoiding the use of accumulation operation symbols for business data assembly, assembling business data based on arrays improves the assembly speed of business data and the loading speed of Web pages.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of client technology, and in particular to a method, device, equipment and storage medium for processing business data of a Web page. Background Art

[0002] String accumulation is a very common technology used in front-end development. In order to make the information visible to the naked eye on the Web page not just static development, it is necessary to write code to implement dynamic string accumulation when developing the page code.

[0003] The traditional accumulation method is to use the accumulation operator to assemble business data. If a small amount of business data needs to be accumulated, the impact on the loading of the Web page is small, and the accumulation operator can be used for accumulation. If a large amount of business data needs to be accumulated, the accumulation operator will consume a large amount of memory, resulting in a slow loading speed of the Web page, affecting the customer experience. Summary of the invention

[0004] The main purpose of this application is to provide a method, device, equipment and storage medium for processing business data of a Web page, aiming to solve the technical problem that the Web page of the prior art uses an accumulation operator to assemble business data, which consumes a large amount of memory when a large amount of business data needs to be accumulated, resulting in a relatively slow loading speed of the Web page, affecting the customer experience.

[0005] In order to achieve the above-mentioned invention object, the present application proposes a method for processing business data of a web page, the method comprising:

[0006] Acquire a string assembly request sent by the client during the process of loading a target Web page, wherein the string assembly request carries assembly configuration data;

[0007] In response to the string assembly request, an array is created to obtain an array to be assigned;

[0008] Acquire a set of business data to be assembled according to the assembly configuration data;

[0009] According to the business data set to be assembled, assigning values ​​to the array to be assigned, to obtain a target array;

[0010] Assemble the business data according to the target array to obtain a target character string;

[0011] The target character string is sent to the client, and the target array is deleted, wherein the target character string is used to enable the client to load the target Web page.

[0012] Furthermore, the string assembly request is a request sent by the client when loading a target module of the target Web page, and the target module is a module developed based on JavaScript.

[0013] Furthermore, the step of obtaining a set of business data to be assembled according to the assembly configuration data includes:

[0014] According to the data value range of the assembly configuration data, data is acquired from the data source of the assembly configuration data to obtain a business data set to be cached;

[0015] The service data set to be cached is stored in a stack to obtain the service data set to be assembled.

[0016] Furthermore, the step of assigning values ​​to the array to be assigned based on the business data set to be assembled to obtain a target array includes:

[0017] Adopting a cyclic value taking method and a PUSH method, taking out each business data from the business data set to be assembled in the stack respectively to assign values ​​to the array to be assigned;

[0018] The array to be assigned that has completed the assignment is used as the target array.

[0019] Furthermore, the step of assembling the business data according to the target array to obtain the target character string includes:

[0020] The business data is obtained from the target array by using an array JION method, and the obtained business data is assembled, and the assembled character string is used as the target character string.

[0021] Furthermore, the step of obtaining business data from the target array by using an array JION method, assembling the obtained business data, and using the assembled string as the target string includes:

[0022] The business data is obtained from the target array by using an array JION method, and the obtained business data is assembled by using the parameter separator of the assembly configuration data, and the assembled character string is used as the target character string.

[0023] Furthermore, the assembly configuration data includes a page identifier and a business function identifier, and the step of sending the target character string to the client includes:

[0024] The target character string is sent to the client according to the page identifier and the business function identifier.

[0025] The present application also proposes a business data processing device for a Web page, the device comprising:

[0026] A request acquisition module, used to acquire a string assembly request sent by a client in the process of loading a target Web page, wherein the string assembly request carries assembly configuration data;

[0027] An array creation module, used to respond to the string assembly request, create an array, and obtain an array to be assigned;

[0028] A business data set acquisition module to be assembled, used to acquire the business data set to be assembled according to the assembly configuration data;

[0029] A target array determination module, used for assigning values ​​to the array to be assigned according to the business data set to be assembled, to obtain a target array;

[0030] A target string determination module, used to assemble business data according to the target array to obtain a target string;

[0031] The target string feedback module is used to send the target string to the client and perform deletion processing on the target array, wherein the target string is used to enable the client to load the target Web page.

[0032] The present application also proposes a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the above methods when executing the computer program.

[0033] The present application also proposes a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above methods are implemented.

[0034] The present application discloses a method, apparatus, device and storage medium for processing business data of a Web page, wherein the method first obtains a string assembly request sent by a client during the process of loading a target Web page, wherein the string assembly request carries assembly configuration data, then responds to the string assembly request, creates an array, obtains an array to be assigned, obtains a set of business data to be assembled according to the assembly configuration data, assigns values ​​to the array to be assigned according to the set of business data to be assembled, obtains a target array, assembles business data according to the target array, obtains a target string, and finally sends the target string to the client, deletes the target array, wherein the target string is used to enable the client to load the target Web page, avoids using an accumulation operator to assemble business data, improves the assembly speed of business data by assembling business data based on an array, improves the loading speed of Web pages, and improves customer experience; and does not require Web developers to develop code to process business data assembly, thereby reducing the workload of Web developers. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 A flowchart of a method for processing business data of a Web page according to an embodiment of the present application;

[0036] Figure 2 This is a schematic block diagram of the structure of a business data processing device for a Web page according to an embodiment of the present application;

[0037] Figure 3 A schematic block diagram of the structure of a computer device according to an embodiment of the present application.

[0038] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0039] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0040] Reference Figure 1 In an embodiment of the present application, a method for processing business data of a web page is provided, the method comprising:

[0041] S1: Obtain a string assembly request sent by a client during the process of loading a target Web page, wherein the string assembly request carries assembly configuration data;

[0042] S2: responding to the string assembly request, creating an array, and obtaining an array to be assigned;

[0043] S3: Acquire a business data set to be assembled according to the assembly configuration data;

[0044] S4: assigning values ​​to the array to be assigned according to the business data set to be assembled to obtain a target array;

[0045] S5: Assembling business data according to the target array to obtain a target character string;

[0046] S6: Send the target character string to the client and perform deletion processing on the target array, wherein the target character string is used to enable the client to load the target Web page.

[0047] This embodiment first obtains a string assembly request sent by a client during the process of loading a target Web page, wherein the string assembly request carries assembly configuration data, then responds to the string assembly request, creates an array, obtains an array to be assigned, obtains a business data set to be assembled according to the assembly configuration data, assigns values ​​to the array to be assigned according to the business data set to be assembled, obtains a target array, assembles business data according to the target array, obtains a target string, and finally sends the target string to the client, deletes the target array, wherein the target string is used to enable the client to load the target Web page, avoids using an accumulation operator to assemble business data, and improves the assembly speed of business data by assembling business data based on an array, improves the loading speed of Web pages, and improves customer experience; and does not require Web developers to develop code to process business data assembly, thereby reducing the workload of Web developers.

[0048] For S1, the string assembly request is a request to assemble multiple business data into a string. The assembly includes but is not limited to: direct splicing and splicing using a preset connection method. For example, the preset connection method is splicing using a preset character "-", which is not specifically limited in this example.

[0049] The client includes: any one of a terminal of a mobile device, a web page of a mobile device, a terminal of a computer, and a web page of a computer.

[0050] The business data is the data required by the target web page to implement business functions. Business data includes but is not limited to: user data, behavior data, and product data. User data includes but is not limited to: basic information of the user. Behavior data is data that records what the user has done. Product data includes but is not limited to: product identification, product name, product category, product review, and inventory. The product identification is the product ID. Product review is the text data of the user's review of the product.

[0051] The assembly configuration data includes but is not limited to: page identifier, business function identifier, data source, data value range, parameter separator. The page identifier can be data such as page name, page ID, etc. that uniquely identifies a web page. The business function identifier can be data such as business function name, business function ID, etc. that uniquely identifies a business function. The data source is the source of the business data, such as a database identifier. The data value range can be a time range or a storage location range. The data value range includes: a value start range and a value end range. Parameter separators include but are not limited to: -.

[0052] The page identifier in the assembly configuration data is the page identifier of the target Web page.

[0053] Among them, when the client needs to accumulate strings of business data during the process of loading the target web page, the assembly configuration data is set according to the calling specifications of the program that implements this application, the string assembly request is generated according to the set assembly configuration data, and the generated string assembly request is sent to the program that implements this application.

[0054] For S2, in response to the string assembly request, an array is created using a preset array creation method, and the created values ​​are used as the array to be assigned.

[0055] The default array creation method is var variable name = []. For example, varstr2 = "", which is not specifically limited in this example.

[0056] Optionally, an array is created according to the number of business data in the assembly configuration data, and the created array is used as the array to be assigned. That is, the number of array elements in the array to be assigned is greater than or equal to the number of business data in the assembly configuration data.

[0057] For S3, according to the data value range of the assembly configuration data, the business data is obtained from the data source of the assembly configuration data, and all the obtained business data is used as the business data set to be assembled.

[0058] For S4, each business data in the business data set to be assembled is assigned to an array element in the array to be assigned, and the array to be assigned after the assignment is completed is used as the target array. In other words, the target array includes all the business data in the business data set to be assembled, and each array element in the target array stores one business data in the business data set to be assembled.

[0059] For S5, business data is obtained from each array element in the target array, and a string concatenation method is used to perform string concatenation according to the obtained business data, and the concatenated string is used as the target string. Because the business data before concatenation does not meet the requirements of the business function, the target string is obtained by concatenating the strings according to the obtained business data, and the target string is used to meet the requirements of the business function.

[0060] For S6, the target string is sent to the client according to the assembly configuration data, and the target array is deleted, thereby clearing the storage space; after receiving the target string, the client continues to load the target Web page according to the target string.

[0061] Because steps S1 to S6 define an array variable and then operate on the array variable, the memory consumption is only the consumption of one variable, which reduces the memory consumption, thereby increasing the speed of assembling business data and the speed of loading Web pages. Compared with using the accumulation operator, steps S1 to S6 using array variables consume less time, have good readability, and are less prone to errors.

[0062] It is understandable that steps S1 to S6 can be encapsulated into a plug-in. The client only needs to send the string assembly request carrying the assembly configuration data to the plug-in. After the plug-in completes the string splicing, it sends the target string to the client. The client does not need to care about the entire process of obtaining business data and business assembly.

[0063] In one embodiment, the string assembly request is a request sent by the client when loading a target module of the target Web page, and the target module is a module developed based on JavaScript.

[0064] Among them, JavaScript's String object provides a wealth of methods, but due to the immutability of the String object, a new String object will be recreated whenever the string changes. Using the accumulation operator "+" to change the string also creates a new string, and a new String object needs to be created, which results in a large amount of memory consumption when accumulating a large amount of business data, resulting in a slow loading speed of the Web page; and the immutability of the String object will result in a large memory overhead and generate a lot of garbage memory, which requires a garbage collection mechanism to handle; and the use of the accumulation operator "+" to concatenate strings generates anonymous strings, which are difficult to use a second time.

[0065] JavaScript, referred to as "JS", is a lightweight, interpreted or just-in-time compiled programming language with function-first approach.

[0066] This embodiment implements sending the string assembly request in the module developed by JavaScript, thereby eliminating the need for Web developers to develop JavaScript code to process the acquisition and assembly of business data, thereby reducing the workload of Web developers.

[0067] For S11, when the client loads the target module that needs to accumulate strings during the process of loading the target Web page, it sets assembly configuration data, generates the string assembly request according to the set assembly configuration data, and sends the string assembly request to the program that implements this application.

[0068] In one embodiment, the step of acquiring the service data set to be assembled according to the assembly configuration data includes:

[0069] S31: acquiring data from a data source of the assembly configuration data according to a data value range of the assembly configuration data to obtain a business data set to be cached;

[0070] S32: storing the service data set to be cached in a stack to obtain the service data set to be assembled.

[0071] In this embodiment, a business data set to be cached is obtained according to the assembly configuration data, and the business data set to be cached is stored in a stack. Since the stack adopts a first-in-last-out method, data is subsequently extracted from the stack and put into an array. After the array assignment is completed, it is beneficial to extract business data from the tail of the array for splicing, and the business data first obtained from the data source is extracted.

[0072] For S31, according to the data value range of the assembly configuration data, business data is obtained from the data source of the assembly configuration data, and all the obtained business data is used as a business data set to be cached.

[0073] For S32, the business data in the business data set to be cached are stored in a stack in the order of acquisition, and the business data stored in the stack is used as the business data set to be assembled. It can be understood that the business data set to be assembled has the same data as the business data set to be cached.

[0074] In one embodiment, the step of assigning values ​​to the array to be assigned based on the business data set to be assembled to obtain a target array includes:

[0075] S41: adopting a cyclic value taking method and a PUSH method to respectively take out each business data from the business data set to be assembled in the stack to assign values ​​to the array to be assigned values;

[0076] S42: The array to be assigned that has completed the assignment is used as the target array.

[0077] This embodiment adopts a circular value-taking method and a PUSH method to take values ​​from a stack to assign values ​​to the array to be assigned, thereby providing a basis for subsequent business data assembly based on the array.

[0078] For S41, a circular value taking method is adopted to take out business data from the business data set to be assembled in the stack, and then a PUSH method is adopted to assign the taken out business data to the array elements in the array to be assigned.

[0079] The PUSH method is to use the PUSH method to add business data sequentially to the end of the array.

[0080] For S42, after all the business data sets to be assembled in the stack are assigned to the array to be assigned, the array to be assigned is used as the target array.

[0081] In one embodiment, the step of assembling the business data according to the target array to obtain the target string includes:

[0082] S51: using an array JION method to obtain business data from the target array, assembling the obtained business data, and using the assembled character string as the target character string.

[0083] This embodiment adopts the array JION method to obtain business data from the target array and assemble the obtained business data. Due to the array JION method, the array is used internally for storage, which is easy to operate and modify. It directly solves the inconvenience caused by the immutability of the String object and improves the utilization rate of the memory space.

[0084] For S51, the array JION method is adopted to obtain business data from the end of the target array, convert the obtained business data into a character string, and then concatenate the converted character strings in sequence, and use the concatenated data as the target character string.

[0085] Use the array JION method, that is, use the Array.join method.

[0086] In one embodiment, the steps of obtaining business data from the target array by using the array JION method, assembling the obtained business data, and using the assembled string as the target string include:

[0087] S511: Acquire business data from the target array using an array JION method, assemble the acquired business data using the parameter separator of the assembly configuration data, and use the assembled string as the target string.

[0088] This embodiment adopts the array JION method to obtain business data from the target array, and assembles the obtained business data using the parameter delimiter of the assembly configuration data, thereby realizing the assembly using personalized parameter delimiters, meeting the personalized string accumulation requirements, and improving the user experience.

[0089] For S511, the JION method of the array is used to obtain business data from the target array respectively, and the obtained business data is converted into a character string; then the JION method of the array is used, the parameter delimiter is used as a connector, the converted character strings are concatenated, and the concatenated data is used as the target character string.

[0090] The JION method of an array can automatically loop through all the data in the array according to a custom parameter delimiter, use the parameter delimiter to perform string concatenation, and finally get a value of the concatenation of all the data in the array.

[0091] For example, the parameter separator of the assembly configuration data is "," and the business data in the target array includes: c, b, a from the beginning to the end. Then, the array JION method and the parameter separator of the assembly configuration data are used to obtain the business data starting from the end of the target array, and the obtained business data is converted into a string and assembled to obtain "a, b, c". No specific limitation is given in this example.

[0092] In one embodiment, the assembly configuration data includes a page identifier and a business function identifier, and the step of sending the target string to the client includes:

[0093] S61: Send the target character string to the client according to the page identifier and the business function identifier.

[0094] This embodiment sends the target string to the client according to the page identifier and business function identifier of the assembly configuration data, which is conducive to the program of this application responding to multiple string assembly requests at the same time, and is also conducive to quickly loading the target Web page according to the target string sent by the program implementing this application.

[0095] For S61, a response value is generated according to the page identifier, business function identifier and the target string of the assembly configuration data, and the response value is sent to the client. After receiving the response value, the client parses the target string, page identifier and business function identifier of the response value; the client uses the parsed target string to load the business function (that is, the business function corresponding to the business function identifier) ​​in the Web page (that is, the Web page corresponding to the parsed page identifier).

[0096] Reference Figure 2 The present application also proposes a business data processing device for a Web page, the device comprising:

[0097] The request acquisition module 100 is used to acquire a string assembly request sent by the client in the process of loading a target Web page, wherein the string assembly request carries assembly configuration data;

[0098] An array creation module 200 is used to respond to the string assembly request, create an array, and obtain an array to be assigned;

[0099] A business data set acquisition module 300 to be assembled, used to acquire the business data set to be assembled according to the assembly configuration data;

[0100] A target array determination module 400 is used to assign values ​​to the array to be assigned according to the business data set to be assembled, so as to obtain a target array;

[0101] A target character string determination module 500 is used to assemble business data according to the target array to obtain a target character string;

[0102] The target string feedback module 600 is used to send the target string to the client and perform deletion processing on the target array, wherein the target string is used to enable the client to load the target Web page.

[0103] This embodiment first obtains a string assembly request sent by a client during the process of loading a target Web page, wherein the string assembly request carries assembly configuration data, then responds to the string assembly request, creates an array, obtains an array to be assigned, obtains a business data set to be assembled according to the assembly configuration data, assigns values ​​to the array to be assigned according to the business data set to be assembled, obtains a target array, assembles business data according to the target array, obtains a target string, and finally sends the target string to the client, deletes the target array, wherein the target string is used to enable the client to load the target Web page, avoids using an accumulation operator to assemble business data, and improves the assembly speed of business data by assembling business data based on an array, improves the loading speed of Web pages, and improves customer experience; and does not require Web developers to develop code to process business data assembly, thereby reducing the workload of Web developers.

[0104] In one embodiment, the request acquisition module 100 further includes:

[0105] The string assembly request sent by the client is obtained, wherein the string assembly request is a request sent by the client when loading a target module of the target Web page, and the target module is a module developed based on JavaScript.

[0106] In one embodiment, the business data set acquisition module 300 to be assembled includes: a business data acquisition submodule, a storage stack submodule;

[0107] The business data acquisition submodule is used to acquire data from the data source of the assembly configuration data according to the data value range of the assembly configuration data to obtain a set of business data to be cached;

[0108] The storage stack submodule is used to store the service data set to be cached in a stack to obtain the service data set to be assembled.

[0109] In one embodiment, the target array determination module 400 further includes: adopting a loop value taking method and a PUSH method, taking out each business data from the business data set to be assembled in the stack to assign values ​​to the array to be assigned, and taking the array to be assigned after the assignment is completed as the target array.

[0110] In one embodiment, the target character string determination module 500 further includes:

[0111] The business data is obtained from the target array by using the array JION method, and the obtained business data is assembled, and the assembled character string is used as the target character string.

[0112] In one embodiment, the target character string determination module 500 further includes:

[0113] The business data is obtained from the target array by using an array JION method, and the obtained business data is assembled by using the parameter separator of the assembly configuration data, and the assembled character string is used as the target character string.

[0114] In one embodiment, the target character string feedback module 600 further includes:

[0115] The target character string is sent to the client according to the page identifier and the business function identifier of the assembly configuration data.

[0116] Reference Figure 3 In an embodiment of the present application, a computer device is also provided. The computer device may be a server, and its internal structure may be as follows: Figure 3 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor designed by the computer is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data such as a business data processing method for a Web page. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a business data processing method for a Web page is implemented. The business data processing method of the Web page includes: obtaining a string assembly request sent by a client during the process of loading a target Web page, wherein the string assembly request carries assembly configuration data; in response to the string assembly request, creating an array to obtain an array to be assigned; obtaining a business data set to be assembled according to the assembly configuration data; assigning values ​​to the array to be assigned according to the business data set to be assembled to obtain a target array; assembling business data according to the target array to obtain a target string; sending the target string to the client and deleting the target array, wherein the target string is used to enable the client to load the target Web page.

[0117] This embodiment first obtains a string assembly request sent by a client during the process of loading a target Web page, wherein the string assembly request carries assembly configuration data, then responds to the string assembly request, creates an array, obtains an array to be assigned, obtains a business data set to be assembled according to the assembly configuration data, assigns values ​​to the array to be assigned according to the business data set to be assembled, obtains a target array, assembles business data according to the target array, obtains a target string, and finally sends the target string to the client, deletes the target array, wherein the target string is used to enable the client to load the target Web page, avoids using an accumulation operator to assemble business data, and improves the assembly speed of business data by assembling business data based on an array, improves the loading speed of Web pages, and improves customer experience; and does not require Web developers to develop code to process business data assembly, thereby reducing the workload of Web developers.

[0118] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, a method for processing business data of a Web page is implemented, including the following steps: obtaining a string assembly request sent by a client during the process of loading a target Web page, wherein the string assembly request carries assembly configuration data; in response to the string assembly request, an array is created to obtain an array to be assigned; according to the assembly configuration data, a set of business data to be assembled is obtained; according to the set of business data to be assembled, the array to be assigned is assigned to obtain a target array; according to the target array, business data is assembled to obtain a target string; the target string is sent to the client and the target array is deleted, wherein the target string is used to enable the client to load the target Web page.

[0119] The business data processing method of the Web page executed above first obtains a string assembly request sent by the client during the process of loading the target Web page, the string assembly request carries assembly configuration data, then responds to the string assembly request, creates an array, obtains the array to be assigned, obtains the business data set to be assembled according to the assembly configuration data, assigns values ​​to the array to be assigned according to the business data set to be assembled, obtains the target array, assembles business data according to the target array, obtains the target string, finally sends the target string to the client, and deletes the target array, wherein the target string is used to enable the client to load the target Web page, avoids using the accumulation operator to assemble business data, and improves the assembly speed of business data by assembling business data based on the array, improves the loading speed of the Web page, and improves the customer experience; and does not require Web developers to develop code to process business data assembly, thereby reducing the workload of Web developers.

[0120] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided in this application and used in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0121] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, device, article or method including the element.

[0122] The above description is only a preferred embodiment of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A method for processing business data of a Web page, characterized in that: The method comprises: Acquire a string assembly request sent by the client during the process of loading a target Web page, wherein the string assembly request carries assembly configuration data; In response to the string assembly request, an array is created to obtain an array to be assigned; Acquire a set of business data to be assembled according to the assembly configuration data; According to the business data set to be assembled, assigning values ​​to the array to be assigned, to obtain a target array; Assemble the business data according to the target array to obtain a target character string; Sending the target string to the client and deleting the target array, wherein the target string is used to enable the client to load the target Web page; The step of assigning values ​​to the array to be assigned according to the business data set to be assembled to obtain a target array comprises: Assigning a value to each business data in the business data set to be assembled to an array element in the array to be assigned a value; The array to be assigned that has completed the assignment is used as the target array.

2. The method for processing business data of a Web page according to claim 1, characterized in that: The string assembly request is a request sent by the client when loading a target module of the target Web page, and the target module is a module developed based on JavaScript.

3. The method for processing business data of a Web page according to claim 1, characterized in that: The step of acquiring the business data set to be assembled according to the assembly configuration data comprises: According to the data value range of the assembly configuration data, data is acquired from the data source of the assembly configuration data to obtain a business data set to be cached; The service data set to be cached is stored in a stack to obtain the service data set to be assembled.

4. The method for processing business data of a Web page according to claim 3, characterized in that: The step of assigning values ​​to the array to be assigned according to the business data set to be assembled to obtain a target array includes: Adopting a cyclic value taking method and a PUSH method, taking out each business data from the business data set to be assembled in the stack respectively to assign values ​​to the array to be assigned; The array to be assigned that has completed the assignment is used as the target array.

5. The method for processing business data of a Web page according to claim 1, characterized in that: The step of assembling the business data according to the target array to obtain the target character string includes: The business data is obtained from the target array by using the array JION method, and the obtained business data is assembled, and the assembled character string is used as the target character string.

6. The method for processing business data of a Web page according to claim 5, characterized in that: The step of using the array JION method to obtain business data from the target array, assembling the obtained business data, and using the assembled string as the target string includes: The business data is obtained from the target array by using an array JION method, and the obtained business data is assembled by using the parameter separator of the assembly configuration data, and the assembled character string is used as the target character string.

7. The method for processing business data of a Web page according to claim 1, characterized in that: The assembly configuration data includes a page identifier and a business function identifier, and the step of sending the target character string to the client includes: The target character string is sent to the client according to the page identifier and the business function identifier.

8. A business data processing device for a Web page, characterized in that: The device comprises: A request acquisition module, used to acquire a string assembly request sent by a client in the process of loading a target Web page, wherein the string assembly request carries assembly configuration data; An array creation module, used to respond to the string assembly request, create an array, and obtain an array to be assigned; A business data set acquisition module to be assembled, used to acquire the business data set to be assembled according to the assembly configuration data; The target array determination module is used to assign values ​​to the array to be assigned according to the business data set to be assembled to obtain a target array; the assigning of values ​​to the array to be assigned according to the business data set to be assembled to obtain the target array includes: assigning each business data in the business data set to be assembled to an array element in the array to be assigned; and taking the array to be assigned after the assignment as the target array; A target string determination module, used to assemble business data according to the target array to obtain a target string; The target string feedback module is used to send the target string to the client and perform deletion processing on the target array, wherein the target string is used to enable the client to load the target Web page.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Data verification method and device, computer device and storage medium

    CN110442756A

  • Method and device for reading data

    CN112131287A