Data processing method and device for mobile client
By converting EL expressions into abstract objects in the mobile client and extracting server data, the application problem of EL expressions in the mobile client is solved, and the changes in client object properties are realized and the synchronization of server data is achieved.
Patent Information
- Application Number
- CN202110084693.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-21
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2041-01-21
AI Technical Summary
In the prior art, EL expressions can only be applied on the web side and cannot be applied on the mobile client side.
By obtaining the EL expression used to represent the object attributes of the mobile client, converting it into at least one level of abstract objects, and extracting the represented data from the data sent by the server based on these abstract objects, and finally assigning the object attributes.
It implements the use of EL expressions in mobile clients to process object properties to ensure that changes in client object properties are synchronized with server data.
Smart Images

Figure CN113760241B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and more specifically, to a data processing method and device for a mobile client, an electronic device, a computer-readable storage medium, and a computer program product. Background Art
[0002] EL expression (Expression Language) is a special general-purpose programming language in Java. Its main function is to access objects in the context of a page, obtain variable values of object attributes, or perform simple calculations or judgment operations when a Java Web application is embedded in a web page, such as JSP (Java Server Pages).
[0003] In the process of implementing the inventive concept of the present disclosure, the inventors discovered that the EL expression in the related art can only be applied on the Web side, but cannot be applied on the mobile client side. Summary of the invention
[0004] In view of this, the present disclosure provides a data processing method and device for a mobile client, an electronic device, a computer-readable storage medium, and a computer program product.
[0005] One aspect of the present disclosure provides a data processing method for a mobile client, comprising: obtaining an EL expression for characterizing an object attribute of the mobile client; converting a character string corresponding to the EL expression into at least one level of abstract object, wherein each level of abstract object includes one of the following combination information: a key variable and a key value, an index variable and an index value, and there is an association relationship between an upper level abstract object and a lower level abstract object; in response to receiving data sent by a server, based on the combination information contained in each level of abstract object in the at least one level of abstract object and the association relationship, extracting data represented by the EL expression from the data sent by the server; and assigning a value to the object attribute based on the extracted data represented by the EL expression.
[0006] According to an embodiment of the present disclosure, the string corresponding to the above-mentioned EL expression is converted into at least one level of abstract object, including: extracting the initial string in the above-mentioned EL expression; in response to the above-mentioned initial string not being a string starting with the first identifier, adding a second identifier before the above-mentioned initial string to obtain a first target string, wherein the string between the above-mentioned first identifier and the next identifier represents the index value corresponding to the index variable, and the string between the above-mentioned second identifier and the next identifier represents the key value corresponding to the key variable; performing a first operation on the above-mentioned first target string to obtain a first-level abstract object, wherein the above-mentioned first operation includes: intercepting the string between the above-mentioned second identifier and the next identifier in the above-mentioned first target string as the key value in the combination information contained in the above-mentioned first-level abstract object.
[0007] According to an embodiment of the present disclosure, it also includes: extracting a new target string starting with the above-mentioned next identifier from the above-mentioned first target string; in response to the above-mentioned next identifier being the above-mentioned second identifier, performing a second operation on the new target string to obtain the next-level abstract object of the above-mentioned first-level abstract object, and the above-mentioned second operation includes: intercepting the string between the above-mentioned second identifier and the next identifier in the new target string as the key value in the combination information contained in the next-level abstract object.
[0008] According to an embodiment of the present disclosure, it also includes: extracting a new target string starting with the above-mentioned next identifier from the above-mentioned first target string; in response to the above-mentioned next identifier being the above-mentioned first identifier, performing a third operation on the new target string to obtain the next-level abstract object of the above-mentioned first-level abstract object, and the above-mentioned third operation includes: intercepting the string between the above-mentioned first identifier and the next identifier in the new target string as the index value in the combination information contained in the next-level abstract object.
[0009] According to an embodiment of the present disclosure, the method further includes: extracting a character string starting with or after the next identifier from the new target character string as another new target character string; and performing the second operation or the third operation on the other new target character string to obtain an abstract object of another level.
[0010] According to an embodiment of the present disclosure, it also includes: in response to the above-mentioned initial string being a string starting with the above-mentioned first identifier, performing a fourth operation on the above-mentioned initial string to obtain a first-level abstract object, wherein the above-mentioned fourth operation includes: intercepting the string between the above-mentioned first identifier and the next identifier in the above-mentioned initial string as the index value in the combination information contained in the first-level abstract object.
[0011] According to an embodiment of the present disclosure, it also includes: extracting a second target string after the next identifier from the above-mentioned initial string; in response to the next identifier being the above-mentioned first identifier, performing a fifth operation on the second target string, wherein the above-mentioned fifth operation includes: intercepting the string between the above-mentioned first identifier and the next identifier in the second target string as the index value in the combination information contained in the next-level abstract object of the first-level abstraction.
[0012] According to an embodiment of the present disclosure, it also includes: extracting a second target string after the next identifier from the above-mentioned initial string; in response to the next identifier being the above-mentioned second identifier, performing a sixth operation on the second target string, wherein the above-mentioned sixth operation includes: intercepting the string between the above-mentioned second identifier and the next identifier in the second target string as the key value in the combination information contained in the next-level abstract object of the first-level abstraction.
[0013] According to an embodiment of the present disclosure, the method further includes: extracting a character string starting with or after the next identifier from the second target character string as a new target character string; and performing the fifth operation or the sixth operation on the new target character string to obtain abstract objects of other levels.
[0014] Another aspect of the present disclosure provides a data processing device for a mobile client, including: an acquisition module, used to acquire an EL expression for characterizing an object attribute of the mobile client; a conversion module, used to convert a character string corresponding to the EL expression into at least one level of abstract object, wherein each level of abstract object includes one of the following combination information: a key variable and a key value, an index variable and an index value, and there is an association relationship between an upper level abstract object and a lower level abstract object; an extraction module, used to extract data represented by the EL expression from the data sent by the server in response to receiving data sent by the server, based on the combination information contained in each level of the at least one level of abstract object and the association relationship; and an assignment module, used to assign values to the object attributes based on the extracted data represented by the EL expression.
[0015] Another aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the above method of the embodiment of the present disclosure.
[0016] Another aspect of the present disclosure provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, enables the processor to implement the above method of the embodiment of the present disclosure.
[0017] Another aspect of the present disclosure provides a computer program product, including a computer program, which implements the method according to the embodiment of the present disclosure when executed by a processor.
[0018] According to an embodiment of the present disclosure, by parsing the EL expression into multi-level abstract objects layer by layer on the mobile client, after the mobile client receives the data related to the change of object attributes sent by the server, the multi-level abstract objects can be matched with the data sent by the server layer by layer to obtain the variable value of the object attribute represented by the EL expression, and then the variable value is assigned to the corresponding variable, so as to realize the change of the client object attribute. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The above and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:
[0020] Figure 1 An exemplary system architecture of a data processing method and device for a mobile client to which the embodiments of the present disclosure can be applied is schematically shown;
[0021] Figure 2 The application scenarios of the data processing method and device for a mobile client according to the embodiments of the present disclosure are schematically shown;
[0022] Figure 3 A flowchart of a data processing method for a mobile client according to an embodiment of the present disclosure is schematically shown;
[0023] Figure 4 The schematic diagram shows the principle diagram of converting the string corresponding to the EL expression into the first-level abstract object;
[0024] Figure 5~Figure 6 A schematic diagram showing a principle diagram of converting a string corresponding to an EL expression into at least one level of abstract object;
[0025] Figure 7 A block diagram schematically shows a data processing device for a mobile client to which the present disclosure can be applied; and
[0026] Figure 8 A block diagram of an electronic device suitable for implementing a data processing method and apparatus for a mobile client according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0027] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
[0028] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.
[0029] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0030] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0031] The embodiment of the present disclosure provides a data processing method for a mobile client, including the following operations: obtaining an EL expression for representing an object property of a mobile client; converting a string corresponding to the EL expression into at least one level of abstract object, wherein each level of abstract object includes one of the following combination information: a key variable and a key value, an index variable and an index value, and there is an association relationship between the upper level abstract object and the lower level abstract object; in response to receiving data sent by a server, based on the combination information and association relationship contained in each level of abstract objects in at least one level of abstract objects, extracting data represented by the EL expression from the data sent by the server; and assigning values to object properties based on the data represented by the extracted EL expression.
[0032] Figure 1 The exemplary system architecture of the data processing method and device for a mobile client to which the embodiments of the present disclosure can be applied is schematically shown. It should be noted that: Figure 1What is shown is merely an example of a system architecture to which the embodiments of the present disclosure can be applied, in order to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.
[0033] like Figure 1 As shown, the system architecture 100 according to this embodiment may include a terminal device 101 (various mobile clients may be installed on the terminal device 101, hereinafter referred to as a client), a network 102 and a server 103. The network 102 is used to provide a medium for a communication link between the terminal device 101 and the server 103. The network 102 may include various connection types, such as wired and / or wireless communication links, etc.
[0034] The user can use the terminal device 101 to interact with the server 103 through the network 102 to receive or send messages, etc. Various communication client applications can be installed on the terminal device 101, such as shopping applications, instant messaging tools, email clients and / or social platform software, etc. (only as examples).
[0035] The terminal device 101 may be any electronic device having a display screen and supporting the use of various APPs, including but not limited to a smart phone.
[0036] The server 103 may be a server that provides various services, such as a background management server (only as an example) that provides support for an APP accessed by a user using the terminal device 101. The background management server may analyze and process received data such as user requests, and feed back processing results (such as information or data obtained or generated according to user requests) to the terminal device 101.
[0037] For example, a user clicks on a client (APP) through the terminal device 101 to enter the homepage of the client, and the client loads the relevant content of the homepage of the client in response to the user's click operation. During the content loading process, the attribute information (i.e., variable value) of the relevant object involved in the homepage of the client can be obtained from the data sent by the server 103 through the EL expression defined for the homepage of the client, and the corresponding attribute variable of the relevant object is assigned according to the obtained attribute information, so as to display the content consistent with the data sent by the server 103 on the homepage of the APP.
[0038] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0039] Figure 2The application scenarios to which the data processing method and device for a mobile client of the present disclosure can be applied are schematically shown according to an embodiment of the present disclosure.
[0040] like Figure 2 As shown, in this application scenario, when a user opens a specific APP, the homepage of the APP can be displayed as a user interface 210. When the user clicks the "My" control on the user interface 210, the APP will jump from the homepage to the page corresponding to "My", which can be displayed as a user interface 220. It should be noted that the client loads the relevant content of the user interface 220 in response to the user clicking the "My" control, including loading the relevant content involved in the columns such as "Recently Used" and "My Mini Programs". Taking the loading of the relevant content of the "Recently Used" column as an example, in the embodiment of the present disclosure, the EL expression defined for the "Recently Used" object can be obtained, the data represented by the EL expression can be obtained from the data sent by the server, and then the obtained data can be assigned to the relevant attribute variables of the "Recently Used" object, so that the relevant content can be displayed in the corresponding position of the "Recently Used" column.
[0041] For example, for the EL expression defined for the “Recently Used” object, the data represented by the EL expression is obtained from the data sent by the server, for example, the name of the most recently used mini-program is obtained as “My Express”, and the icon of the mini-program is obtained as a circle. Then, based on the obtained data, the variables of the mini-program name and mini-program icon of the “Recently Used” object can be assigned values. As a result, the name of the mini-program displayed in the “Recently Used” column is “My Express”, and the mini-program icon is a circle, as shown in user interface 220.
[0042] Figure 3 The flowchart of the data processing method for a mobile client according to an embodiment of the present disclosure is schematically shown. Figure 3 As shown, the method may include operations S310 to S340.
[0043] In operation S310, an EL expression for representing an object property of a mobile client is obtained.
[0044] It should be noted that, in the embodiment of the present disclosure, the object properties of any object involved in the mobile client can be accessed through EL expressions, and the object properties can include the name, style, color, and pattern of the client. In addition, in the embodiment of the present disclosure, the format of the EL expression can start with "${" and end with "}", for example, ${sessionScope.user[0]} can be used as an EL expression in the embodiment of the present disclosure.
[0045] According to the embodiment of the present disclosure, the data related to the object attribute represented by the EL expression and issued by the server can be accessed through the EL expression to obtain the object attribute of the mobile client. Therefore, to obtain the object attribute of the mobile client, the EL expression used to represent the object attribute of the mobile client can be obtained first.
[0046] For example, in an APP, the color of a component or control needs to change every minute. In this case, you can get an EL expression for representing the color of the component or control, and then use the EL expression to get the parameters for describing the color of the component or control from the data sent by the server, and assign the obtained parameters to the color variable of the component or control, so that the component can display different colors at different times.
[0047] In operation S320, the string corresponding to the EL expression is converted into at least one level of abstract object, wherein each level of abstract object includes one of the following combination information: key variable and key value, index variable and index value, and there is an association relationship between the upper level abstract object and the lower level abstract object.
[0048] According to an embodiment of the present disclosure, when converting a string corresponding to an EL expression into a first-level abstract object, the following steps may be included:
[0049] When the initial string corresponding to the EL expression starts with the first identifier, it indicates that the first-level abstract object is the index variable. The string between the first identifier (i.e., the beginning identifier) and the next identifier (for example, "]" can be used as the next identifier) in the initial string can be intercepted as the index value corresponding to the index variable in the first-level abstract object.
[0050] Alternatively, when the initial string corresponding to the EL expression starts with the second identifier, it indicates that the first-level abstract object is a key variable, and the string between the second identifier (i.e., the beginning identifier) and the next identifier (for example, "[" can be used as the next identifier) in the initial string can be intercepted as the key value corresponding to the key variable in the first-level abstract object.
[0051] Alternatively, when the initial string corresponding to the EL expression does not start with the first identifier or the second identifier, it indicates that the first-level abstract object is a key variable. The second identifier can be added to the beginning of the initial string (i.e., before the first character) to obtain the target string. Then, for the target string, the string between the second identifier (i.e., the beginning identifier) and the next identifier (for example, "[" can be used as the next identifier) in the target string can be intercepted as the key value corresponding to the key variable in the first-level abstract object.
[0052] According to an embodiment of the present disclosure, converting a string corresponding to an EL expression into a multi-level abstract object may include, after converting the string corresponding to the EL expression into a first-level abstract object, extracting the remaining string starting with the next identifier in the initial string, and performing the same or similar operation as the operation of converting the initial string corresponding to the EL expression or the target string obtained by correcting the initial string into the first-level abstract object to obtain the next-level abstract object, and repeating this cycle, nesting layer by layer, until the last-level abstract object is obtained.
[0053] In operation S330 , in response to receiving the data sent by the server, based on the combination information and association relationship contained in each level of abstract objects in at least one level of abstract objects, data represented by the EL expression is extracted from the data sent by the server.
[0054] According to an embodiment of the present disclosure, the operation may include using a first-level abstract object to obtain first data corresponding to the combination information in the first-level abstract object from data received from a server; and using a second-level abstract object to further obtain second data corresponding to the combination information in the second-level abstract object from the first data, ... until using a last-level abstract object to obtain data corresponding to the combination information in the last-level abstract object from corresponding data obtained through the combination information in the penultimate-level abstract object, the data thus obtained is the target data to be finally obtained, and the target data is the data represented by the EL expression.
[0055] In operation S340, the object attributes are assigned values based on the data represented by the extracted EL expression.
[0056] According to an embodiment of the present disclosure, the data acquired in operation S330 is used to assign values to the object properties corresponding to the EL expression used to acquire the data, so that the relevant properties of the object can be changed or displayed.
[0057] For example, using the EL expression corresponding to a component in the interface, the relevant data representing the shape of the component at a certain moment is obtained from the data sent by the server, for example, the relevant data representing that the button shape of the component is a circle at 10 o'clock is obtained. Then, according to the obtained relevant data, the shape variable of the component can be assigned so that the component can become a circle as expected at 10 o'clock.
[0058] Through the embodiments of the present disclosure, by parsing the EL expression into multi-level abstract objects layer by layer on the mobile client, after the mobile client receives the data related to the change of object attributes sent by the server, the multi-level abstract objects can be matched with the data sent by the server layer by layer to obtain the variable value of the object attribute represented by the EL expression, and then the variable value is assigned to the corresponding variable, so as to realize the change of the client object attribute.
[0059] Reference below Figure 4~Figure 6 , combined with specific embodiments Figure 3 The method shown is further explained.
[0060] According to an embodiment of the present disclosure, converting a string corresponding to an EL expression into at least one level of abstract object may include: extracting an initial string in the EL expression; in response to the initial string not being a string starting with a first identifier, adding a second identifier before the initial string to obtain a first target string, wherein the string between the first identifier and the next identifier represents an index value corresponding to an index variable, and the string between the second identifier and the next identifier represents a key value corresponding to a key variable; performing a first operation on the first target string to obtain a first level abstract object, wherein the first operation includes: intercepting a string between the second identifier and the next identifier in the first target string as a key value in the combination information contained in the first level abstract object.
[0061] According to the embodiment of the present disclosure, the format of the EL expression starts with "${" and ends with "}". Therefore, the initial string in the EL expression can be the string remaining after removing the initial "${" and the ending "}".
[0062] For example, if an EL expression is: ${data[0].appList[0].appName}, then the initial string extracted from the EL expression is: data[0].appList[0].appName.
[0063] According to an embodiment of the present disclosure, it is determined whether the extracted initial character string starts with a first identifier, and preferably, the first identifier is “[”.
[0064] According to an embodiment of the present disclosure, in response to the initial string not starting with the first identifier, a second identifier is added before the initial string to obtain a first target string. Preferably, the second identifier is ".". For example, the initial string of the extracted EL expression is: data[0].appList[0].appName. In response to the initial string not starting with the first identifier (the first identifier is "["), a second identifier is added before the initial string (the second identifier is ".") to obtain the first target string, whereby the first target string is: .data[0].appList[0].appName.
[0065] According to an embodiment of the present disclosure, in response to an initial character string starting with a first identifier, a fourth operation is performed on the initial character string to obtain a first-level abstract object.
[0066] According to an embodiment of the present disclosure, a first operation is performed on the acquired first target string, and the first operation includes: intercepting the string between the initial identifier (i.e., the second identifier ".") and the next identifier in the first target string as the key value in the combined information contained in the first-level abstract object, wherein the next identifier refers to the identifier next to the identifier at the beginning.
[0067] For example, assuming the first target string is: .data[0].appList[0].appName, the first operation is performed on the first target string, intercepting the string between the initial identifier "." and the next identifier "[", that is, the intercepted string is "data", and "data" is used as the key value corresponding to the key variable in the combined information contained in the first-level abstract object.
[0068] Figure 4 The schematic diagram shows the principle diagram of converting the string corresponding to the EL expression into the first-level abstract object. Figure 4 As shown, step S401, extracting the initial string in the EL expression; step S402, determining whether the initial string starts with a first identifier; step S403, in response to the initial string starting with the first identifier, performing a fourth operation on the initial string; step S404, in response to the initial string not starting with the first identifier, adding a second identifier before the initial string to obtain a first target string; step S405, performing the first operation on the first target string.
[0069] According to an embodiment of the present disclosure, the above-mentioned conversion of the string corresponding to the EL expression into at least one level of abstract object may also include: extracting a new target string starting with the next identifier from the first target string; in response to the next identifier being the second identifier, performing a second operation on the new target string to obtain the next level abstract object of the first level abstract object, the second operation including: intercepting the string between the second identifier and the next identifier in the new target string as the key value in the combination information contained in the next level abstract object.
[0070] According to an embodiment of the present disclosure, a new target string starting with the next identifier is extracted from the first target string, wherein the next identifier may be an identifier next to the identifier at the beginning of the first target string.
[0071] For example, it can be assumed that the first target string is: .data[0].appList[0].appName. The identifier at the beginning of the first target string is ".", and the identifier next to the identifier at the beginning is "[". Therefore, a new target string starting with this identifier ("[") is extracted, that is, the new target string is: [0].appList[0].appName.
[0072] According to an embodiment of the present disclosure, it is determined whether the above-mentioned next identifier is the second identifier, and the next identifier refers to the identifier at the beginning of the acquired new target string. For example, assuming that the acquired new target string is: [0].appList[0].appName, then the next identifier here refers to the identifier at the beginning of the new target string, that is: "[".
[0073] According to an embodiment of the present disclosure, in response to the next identifier being a second identifier, a second operation is performed on the new target string. For example, it can be assumed that the new target string is: .appList[0].appName, and in response to the identifier "." at the beginning of the new target string being the second identifier, the string between the identifier and the next identifier ("[") is intercepted, that is, "appList" is intercepted, and the intercepted string "appList" is used as the key value contained in the first-level abstract object corresponding to the new target string ".appList[0].appName".
[0074] According to an embodiment of the present disclosure, the above-mentioned conversion of the string corresponding to the EL expression into at least one level of abstract object also includes: extracting a new target string starting with the above-mentioned next identifier from the above-mentioned first target string; in response to the next identifier being the first identifier, performing a third operation on the above-mentioned new target string to obtain the next level abstract object of the first level abstract object, the third operation including: intercepting the string between the first identifier and the next identifier in the new target string as the index value in the combination information contained in the next level abstract object.
[0075] According to an embodiment of the present disclosure, in response to the next identifier being the first identifier, a third operation is performed on the new target string. For example, it can be assumed that the new target string is: [0].appList[0].appName, and in response to the identifier "[" at the beginning of the new target string being the first identifier, the string between the identifier and the next identifier ("]") is intercepted, that is, "0" is intercepted, and the intercepted string "0" is used as the index value contained in the first-level abstract object corresponding to the new target string "[0].appList[0].appName".
[0076] Figure 5 The schematic diagram shows the principle of converting a character string corresponding to an EL expression into at least one level of abstract object.
[0077] like Figure 5As shown, step S501, extracting the initial string in the EL expression; step S502, in response to the initial string not starting with the first identifier, adding the second identifier before the initial string to obtain the first target string; step S503, performing a first operation on the first target string to obtain a first-level abstract object, wherein the first operation includes intercepting a string between the initial identifier and the next identifier in the first target string as a key value of the first-level abstract object; step S504, extracting a new target string from the first target string, including extracting a string starting with the next identifier of the first target string as a new target string; step S505, judging whether the first target string starts with the first identifier or the second identifier; step S506, in response to the new target string starting with the second identifier, performing a second operation on the new target string to obtain a next-level abstract object of the first-level abstract object, wherein the second operation includes intercepting a string between the initial identifier and the next identifier of the new target string as a key value of the next-level abstract object. Step S507, in response to the new target string starting with the first identifier, performing a third operation on the new target string to obtain a next-level abstract object of the first-level abstract object, wherein the third operation includes intercepting a string between the identifier at the beginning of the new target string and the next identifier as an index value of the next-level abstract object.
[0078] According to an embodiment of the present disclosure, the above-mentioned conversion of the string corresponding to the EL expression into at least one level of abstract object may also include: extracting a string starting with the next identifier or after the next identifier from the new target string as another new target string; performing a second operation or a third operation on the other new target string to obtain abstract objects of other levels.
[0079] According to an embodiment of the present disclosure, when the new target string starts with the second identifier, the string starting with the next identifier of the starting identifier in the new target string can be extracted as another new target string. Or when the new target string starts with the first identifier, the string after the next identifier of the starting identifier in the new target string can be extracted as another new target string.
[0080] For example, it can be assumed that the new target string obtained is [0].appList[0].appName, and the new target string starts with the first identifier, then the string after the next identifier of the starting identifier is extracted as another new target string, that is, the other new target string is: .appList[0].appName.
[0081] For another example, it can be assumed that the new target string obtained is .appList[0].appName, and the new target string starts with the second identifier. Then, the string starting with the next identifier of the starting identifier in the new target string is extracted as another new target string, that is, the other new target string is: [0].appName.
[0082] According to an embodiment of the present disclosure, for another new target string extracted, it is determined whether the identifier at the beginning of the other new target string is the first identifier or the second identifier. In response to the identifier at the beginning being the first identifier, the third operation is performed on the other new target string. In response to the identifier at the beginning being the second identifier, the second operation is performed on the other new target string.
[0083] According to an embodiment of the present disclosure, the above-mentioned conversion of the string corresponding to the EL expression into at least one level of abstract object also includes: in response to the initial string being a string starting with a first identifier, performing a fourth operation on the initial string to obtain a first level abstract object, wherein the fourth operation includes: intercepting the string between the first identifier and the next identifier in the initial string as the index value in the combination information contained in the first level abstract object.
[0084] According to an embodiment of the present disclosure, in response to an initial string starting with a first identifier, a fourth operation is performed on the initial string, and the fourth operation includes: intercepting the string between the beginning identifier and the next identifier in the initial string as an index value in the combination information contained in the first-level abstract object, preferably, the first identifier is "[".
[0085] For example, assuming the initial string is: [0].appList[0].appName, the starting identifier "[" of the initial string is the first identifier, then the fourth operation is performed on the initial string, intercepting the string "0" between the starting identifier "[" and the next identifier "]" as the index value of the first-level abstract object.
[0086] According to an embodiment of the present disclosure, the above-mentioned conversion of the string corresponding to the EL expression into at least one level of abstract object may also include: extracting a second target string after the next identifier from the initial string; in response to the next identifier being the first identifier, performing a fifth operation on the second target string, wherein the fifth operation includes: intercepting the string between the first identifier and the next identifier in the second target string as the index value in the combination information contained in the next level of abstract object of the first level of abstraction.
[0087] According to an embodiment of the present disclosure, a character string following an identifier next to a leading identifier in an initial character string is extracted as a second target character string.
[0088] For example, assuming that the initial string is: [0].appList[0].appName, and its starting identifier is "[", the string after the next identifier of the starting identifier is extracted, that is, the string is extracted: .appList[0].appName.
[0089] According to an embodiment of the present disclosure, the next identifier is an identifier at the beginning of the second target character string.
[0090] According to an embodiment of the present disclosure, in response to the identifier at the beginning of the second target string being the first identifier, the fifth operation is performed on the second target string. For example, assuming that the second target string is: [0].appName, the identifier at the beginning is "[", which is the first identifier, then the string 0 between the identifier at the beginning "[" and the next identifier "]" is intercepted as the index value in the next level abstract object of the first level abstraction.
[0091] According to an embodiment of the present disclosure, the above-mentioned conversion of the string corresponding to the EL expression into at least one level of abstract object also includes: extracting a second target string after the next identifier from the above-mentioned initial string; in response to the above-mentioned next identifier being the second identifier, performing a sixth operation on the second target string, wherein the sixth operation includes: intercepting the string between the second identifier and the next identifier in the second target string as the key value in the combination information contained in the next level abstract object of the first level abstraction.
[0092] According to an embodiment of the present disclosure, in response to the beginning identifier of the second target string being the second identifier, the sixth operation is performed on the second target string. For example, assuming that the second target string is: .appList[0].appName, the beginning identifier is ".", which is the second identifier, then the string appList between the beginning identifier "." and the next identifier "[" is intercepted as the key value in the next level abstract object of the first level abstraction.
[0093] Figure 6 The schematic diagram shows the principle of converting a character string corresponding to an EL expression into at least one level of abstract object.
[0094] like Figure 6As shown, step S601, extracting an initial string in the EL expression; step S602, in response to the initial string starting with a first identifier, performing a fourth operation on the initial string to obtain a first-level abstract object, wherein the fourth operation includes intercepting a string between the initial identifier and the next identifier in the initial string as an index value of the first-level abstract object; step S603, extracting a second target string from the initial string, including extracting a string after the next identifier of the initial identifier in the initial string as the second target string; step S604, determining whether the second target string starts with the first identifier or the second identifier header; step S605, in response to the second target string starting with the first identifier, performing a fifth operation on the second target string to obtain a next-level abstract object of the first-level abstract object, wherein the fifth operation includes intercepting a string between the identifier at the beginning of the second target string and the next identifier as an index value of the next-level abstract object; step S606, in response to the second target string starting with the second identifier, performing a sixth operation on the second target string to obtain a next-level abstract object of the first-level abstract object, wherein the sixth operation includes intercepting a string between the identifier at the beginning of the second target string and the next identifier as a key value of the next-level abstract object.
[0095] According to an embodiment of the present disclosure, the above-mentioned conversion of the string corresponding to the EL expression into at least one level of abstract object may also include: extracting a string starting with the next identifier or after the next identifier from the second target string as a new target string; performing the fifth operation or the sixth operation on the new target string to obtain abstract objects of other levels.
[0096] According to an embodiment of the present disclosure, when the second target string starts with the second identifier, the string starting with the next identifier of the starting identifier in the second target string can be extracted as a new target string. Or when the second target string starts with the first identifier, the string after the next identifier of the starting identifier in the second target string can be extracted as a new target string.
[0097] According to an embodiment of the present disclosure, for a new target string, it is determined whether the identifier at the beginning of the new target string is a first identifier or a second identifier. In response to the identifier at the beginning being the first identifier, the fifth operation is performed for the new target string. In response to the identifier being the second identifier, the sixth operation is performed for the new target string.
[0098] Exemplarily, assuming that the obtained EL expression representing the object attribute is ${data[0].appList[0].appName}, according to an embodiment of the present disclosure, the initial string extracted from the EL expression is: "data[0].appList[0].appName".
[0099] Further, it is determined whether the initial string begins with the first identifier. In response to the initial string not beginning with the first identifier, a second identifier “.” is added before the initial string, and the first target string is “.data[0].appList[0].appName”.
[0100] The first operation is performed on the first target string, and the intercepted "data" is used as the key value of the first-level abstract object. The string starting with the next identifier is extracted from the first target string as a new target string, and the new target string is "[0].appList[0].appName".
[0101] In response to the new target string starting with the first identifier (ie, the next identifier is the first identifier), a third operation is performed on the new target string, and the intercepted "0" is used as the index value in the combination information included in the second-level abstract object.
[0102] In response to the new target string starting with the first identifier, a string after the next identifier is extracted from the new target string as another new target string, and the other new target string is “.appList[0].appName”.
[0103] In response to the other new target string starting with the second identifier, a second operation is performed on the other new target string, and "appList" is intercepted as the key value of the third-level abstract object.
[0104] In response to the other new target string starting with the second identifier, a string starting with the next identifier in the other new target string is extracted as another target string, and the another target string is “[0].appName”.
[0105] In response to the further target character string starting with the first identifier, a third operation is performed on the further target character string, and the intercepted "0" is used as an index value in the combination information included in the fourth-level abstract object.
[0106] In response to the further target string starting with the first identifier, a character string after the next identifier is extracted from the further target string as another new target character string, and the further new target character string is “.appName”.
[0107] In response to the further target string starting with a second identifier, a second operation is performed on the further target string, and "appName" is intercepted as the key value of the fifth-level abstract object.
[0108] According to an embodiment of the present disclosure, in response to being unable to extract a string starting with or after the next identifier from the new target string, the conversion process is ended.
[0109] Moreover, assuming that the data sent by the server is as follows, then according to the combination information and association relationship included in each level of the at least one-level abstract object according to the embodiment of the present disclosure, the data represented by the EL expression extracted from the data may be: from the data sent by the server, according to the multi-level abstract object obtained after the conversion of the above ${data[0].appList[0].appName}, the corresponding data is obtained.
[0110] The data sent by the server received is:
[0111] {
[0112] "tinyAppIntroduction": "Official service of the mini program, official website x.x.com, if you have a cooperation intention, you can send it to xxx ",
[0113] "code": "0",
[0114] "data": [{
[0115] "applist": [{
[0116] "appid": "ao62c55e49158feb61",
[0117] "appName": "eQizu",
[0118] "apptype": "1",
[0119] "logurl": "http: / / img10.360buyimg.com / 5a27a67b.jpg",
[0120] "lisfollow": "1"
[0121] }],
[0122] "type": "history",
[0123] "title": "Recently Used"
[0124] ,
[0125] "applist":[{"
[0126] "appid":"B34A2EBF68D4A9C1E3455C248",
[0127] "appName":"Coupon",
[0128] "apptype":"1",
[0129] "logurl":"http: / / img10.360buyimg.com / bb912bb2ec79.jpg",
[0130] "lisfollow":"1"
[0131] }],"
[0132] "type": "follows",
[0133] "title": "My Followings",
[0134] },"
[0135] "searchworldtext": "Search Mini Program",
[0136] "success": "true"
[0137] }
[0138] Specifically, according to the key value "data" corresponding to the key variable included in the first-level abstract object, the first data obtained from the above data is:
[0139] "data":[{"
[0140] "applist":[{"
[0141] "appid":"ao62c55e49158feb61",
[0142] "appName":"e-Rental",
[0143] "apptype":"1",
[0144] "logurl":"http: / / img10.360buyimg.com / 5a27a67b.jpg",
[0145] "lisfollow": "1"
[0146] }],
[0147] "type": "history",
[0148] "title": "Recently Used"
[0149] ,
[0150] "applist": [{{END]]
[0151] "appid": "B34A2EBF68D4A9C1E3455C248",
[0152] "appName": "Coupon",
[0153] "apptype": "1",
[0154] "logurl": "http: / / img10.360buyimg.com / bb912bb2ec79.jpg",
[0155] "lisfollow": "1"
[0156] }],
[0157] "type": "follows",
[0158] "title": "My Followings",
[0159] },
[0160] Furthermore, according to the index value "0" corresponding to the index variable included in the second-level abstract object, the second data obtained from the above first data is:
[0161] {
[0162] "applist": [{{END]]
[0163] "appid": "ao62c55e49158feb61",
[0164] "appName": "e-Qizu",
[0165] "apptype": "1",
[0166] "logurl": "http: / / img10.360buyimg.com / 5a27a67b.jpg",
[0167] "lisfollow": "1"
[0168] }],
[0169] "type": "history",
[0170] "title": "Recently Used"
[0171] }
[0172] Furthermore, according to the key value "appList" corresponding to the key variable included in the third-level abstract object, the third data obtained from the above second data is:
[0173] "applist": [{
[0174] "appid": "ao62c55e49158feb61",
[0175] "appName": "e Qizu",
[0176] "apptype": "1",
[0177] "logurl": "http: / / img10.360buyimg.com / 5a27a67b.jpg",
[0178] "lisfollow": "1"
[0179] }],
[0180] Furthermore, according to the index value "0" corresponding to the index variable included in the fourth-level abstract object, the fourth data obtained from the above third data is:
[0181] {
[0182] "appid": "ao62c55e49158feb61",
[0183] "appName": "e Qizu",
[0184] "apptype": "1",
[0185] "logurl": "http: / / img10.360buyimg.com / 5a27a67b.jpg",
[0186] "lisfollow": "1"
[0187] }
[0188] Further, according to the key value "appName" corresponding to the key variable included in the fifth-level abstract object, the fifth data obtained from the above fourth data is:
[0189] "appName": "e Qizu",
[0190] Further, according to the embodiments of the present disclosure, in response to there being no next-level abstract object in at least one level of abstract object, the data obtained by the last-level abstract object is the data represented by the EL expression in the data sent by the server. Then, in this embodiment, the data represented by the EL expression is "e Qizu".
[0191] Figure 7 A block diagram of a data processing device for a mobile client to which the present disclosure can be applied is schematically shown.
[0192] As Figure 7 shown, the data processing device 700 includes an acquisition module 710, a conversion module 720, an extraction module 730, and an assignment module 740.
[0193] The acquisition module 710 is configured to acquire an EL expression for characterizing the object attributes of the above mobile client; the conversion module 720 is configured to convert the string corresponding to the above EL expression into at least one level of abstract object, where each level of abstract object includes one of the following combination information: a key variable and a key value, an index variable and an index value, and there is an association relationship between the upper-level abstract object and the lower-level abstract object; the extraction module 730 is configured to, in response to receiving the data sent by the server, extract the data represented by the above EL expression from the data sent by the server based on the combination information included in each level of abstract object in the above at least one level of abstract object and the above association relationship; and the assignment module 740 is configured to assign values to the above object attributes based on the data represented by the above EL expression extracted.
[0194] According to an embodiment of the present disclosure, the conversion module includes: a first extraction submodule, used to extract the initial string in the EL expression; an adding submodule, used to add a second identifier before the initial string to obtain a first target string in response to the initial string not being a string starting with the first identifier, wherein the string between the first identifier and the next identifier represents the index value corresponding to the index variable, and the string between the second identifier and the next identifier represents the key value corresponding to the key variable; a first execution submodule, used to perform a first operation on the first target string to obtain a first-level abstract object, wherein the first operation includes: intercepting the string between the second identifier and the next identifier in the first target string as the key value in the combination information contained in the first-level abstract object.
[0195] According to an embodiment of the present disclosure, the above-mentioned conversion module also includes: a second extraction submodule, used to extract a new target string starting with the above-mentioned next identifier from the above-mentioned first target string; a second execution submodule, used to perform a second operation on the new target string in response to the above-mentioned next identifier being the above-mentioned second identifier, so as to obtain the next-level abstract object of the above-mentioned first-level abstract object, and the above-mentioned second operation includes: intercepting the string between the above-mentioned second identifier and the next identifier in the new target string as the key value in the combination information contained in the next-level abstract object.
[0196] According to an embodiment of the present disclosure, the above-mentioned conversion module also includes: a third extraction sub-module, used to extract a new target string starting with the above-mentioned next identifier from the above-mentioned first target string; a third execution sub-module, used to perform a third operation on the new target string in response to the above-mentioned next identifier being the above-mentioned first identifier, so as to obtain the next-level abstract object of the above-mentioned first-level abstract object, and the above-mentioned third operation includes: intercepting the string between the above-mentioned first identifier and the next identifier in the new target string as the index value in the combination information contained in the next-level abstract object.
[0197] According to an embodiment of the present disclosure, the above-mentioned conversion module also includes: a fourth extraction submodule, used to extract a character string starting with the next identifier or after the next identifier from the new target character string as another new target character string; and a fourth execution submodule, used to perform the above-mentioned second operation or the above-mentioned third operation on the other new target character string to obtain abstract objects of other levels.
[0198] According to an embodiment of the present disclosure, the above-mentioned conversion module also includes: a fifth execution sub-module, which is used to perform a fourth operation on the above-mentioned initial string in response to the above-mentioned initial string being a string starting with the above-mentioned first identifier to obtain a first-level abstract object, wherein the above-mentioned fourth operation includes: intercepting the string between the above-mentioned first identifier and the next identifier in the above-mentioned initial string as the index value in the combination information contained in the first-level abstract object.
[0199] According to an embodiment of the present disclosure, the above-mentioned conversion module also includes: a fifth extraction submodule, used to extract a second target string after the next identifier from the above-mentioned initial string; a sixth execution submodule, used to perform a fifth operation on the second target string in response to the next identifier being the above-mentioned first identifier, wherein the above-mentioned fifth operation includes: intercepting the string between the above-mentioned first identifier and the next identifier in the second target string as the index value in the combination information contained in the next-level abstract object of the first-level abstraction.
[0200] According to an embodiment of the present disclosure, the above-mentioned conversion module also includes: a sixth extraction submodule, used to extract a second target string after the next identifier from the above-mentioned initial string; a seventh execution submodule, used to perform a sixth operation on the second target string in response to the next identifier being the above-mentioned second identifier, wherein the above-mentioned sixth operation includes: intercepting the string between the above-mentioned second identifier and the next identifier in the second target string as the key value in the combination information contained in the next-level abstract object of the first-level abstraction.
[0201] According to an embodiment of the present disclosure, the above-mentioned conversion module also includes: a seventh extraction sub-module, used to extract a character string starting with the next identifier or after the next identifier from the second target character string as a new target character string; and an eighth execution sub-module, used to perform the above-mentioned fifth operation or the above-mentioned sixth operation on the new target character string to obtain abstract objects of other levels.
[0202] According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits, or at least part of the functions of any one of them can be implemented in one module. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be split into multiple modules for implementation. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be at least partially implemented as hardware circuits, such as field programmable gate arrays (FPGAs), programmable logic arrays (PLAs), systems on chips, systems on substrates, systems on packages, application specific integrated circuits (ASICs), or can be implemented by hardware or firmware in any other reasonable way of integrating or packaging circuits, or can be implemented in any one of the three implementation methods of software, hardware, and firmware, or in any appropriate combination of any of them. Alternatively, according to the embodiments of the present invention, one or more of the modules, submodules, units, and subunits can be at least partially implemented as computer program modules, and when the computer program modules are run, the corresponding functions can be performed.
[0203] For example, any multiple of the acquisition module 710, the conversion module 720, the extraction module 730, and the assignment module 740 can be combined in one module / unit / sub-unit for implementation, or any one of the modules / units / sub-units can be split into multiple modules / units / sub-units. Alternatively, at least part of the functions of one or more of these modules / units / sub-units can be combined with at least part of the functions of other modules / units / sub-units and implemented in one module / unit / sub-unit. According to an embodiment of the present disclosure, at least one of the acquisition module 710, the conversion module 720, the extraction module 730, and the assignment module 740 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware, and firmware or in a suitable combination of any of them. Alternatively, at least one of the acquisition module 710 , the conversion module 720 , the extraction module 730 , and the assignment module 740 may be at least partially implemented as a computer program module, and when the computer program module is executed, a corresponding function may be performed.
[0204] It should be noted that the system implementation methods in the embodiments of the present disclosure are the same or similar to the method implementation methods in the embodiments of the present disclosure. For the description of the system implementation methods, please refer to the description of the method implementation methods, which will not be repeated here.
[0205] The present disclosure also provides an electronic device, a computer-readable storage medium, and a computer program product.
[0206] Figure 8 A block diagram of an electronic device suitable for implementing a data processing method and apparatus for a mobile client according to an embodiment of the present disclosure is schematically shown. Figure 8 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0207] like Figure 8 As shown, the electronic device 800 according to an embodiment of the present disclosure includes a processor 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage part 808 into a random access memory (RAM) 803. The processor 801 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 801 may also include an onboard memory for caching purposes. The processor 801 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
[0208] In RAM 803, various programs and data required for the operation of electronic device 800 are stored. Processor 801, ROM 802 and RAM 803 are connected to each other via bus 804. Processor 801 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 802 and / or RAM 803. It should be noted that the program can also be stored in one or more memories other than ROM 802 and RAM 803. Processor 801 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in the one or more memories.
[0209] According to an embodiment of the present disclosure, the electronic device 800 may further include an input / output (I / O) interface 805, which is also connected to the bus 804. The electronic device 800 may further include one or more of the following components connected to the I / O interface 805: an input part 806 including a keyboard, a mouse, etc.; an output part 807 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc. and a speaker, etc.; a storage part 808 including a hard disk, etc.; and a network interface card communication part 809 including a LAN card, a modem, etc. The communication part 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I / O interface 805 as needed. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 810 as needed, so that the computer program read therefrom is installed into the storage part 808 as needed.
[0210] In some embodiments, the method according to an embodiment of the present disclosure may be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, part or all of the computer program may be downloaded and installed from the network through the communication part 809, and / or installed from the removable medium 811. When the computer program is executed by the processor 801, one or more steps of the data processing method for the mobile client described above may be performed. According to an embodiment of the present disclosure, the system, device, means, module, unit, etc. described above may be implemented by a computer program module.
[0211] The program code for implementing the method of the embodiment of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code can implement the operations / functions shown in the flow chart and / or block diagram when executed by the processor or controller. The program code can be executed entirely on a local machine, or can also be executed entirely on a remote machine (such as a remote server), or can also be executed partially on a local machine and partially on a remote machine as an independent software package.
[0212] In some embodiments of the present disclosure, the computer-readable storage medium may be included in the device / apparatus / system described in the above embodiments; or it may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure can be implemented.
[0213] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium. For example, it may include, but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, apparatus, or device.
[0214] For example, according to an embodiment of the present disclosure, the computer-readable storage medium may include the ROM 802 and / or the RAM 803 described above and / or one or more memories other than the ROM 802 and the RAM 803 .
[0215] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0216] It will be appreciated by those skilled in the art that the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations and / or combinations are not explicitly described in the present disclosure. In particular, the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways without departing from the spirit and teachings of the present disclosure. All of these combinations and / or combinations fall within the scope of the present disclosure.
[0217] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.
Claims
1. A data processing method for a mobile client, comprising: Obtaining an EL expression for representing an object property of the mobile client; Convert the string corresponding to the EL expression into at least one level of abstract object, wherein each level of abstract object includes one of the following combination information: a key variable and a key value, an index variable and an index value, and there is an association relationship between the upper level abstract object and the lower level abstract object; in the string corresponding to the EL expression, the string between the first identifier and the next identifier represents the index value of the abstract object, and the string between the second identifier and the next identifier represents the key value of the abstract object; In response to receiving the data sent by the server, based on the combination information and the association relationship contained in each level of abstract objects in the at least one level of abstract objects, extracting the data represented by the EL expression from the data sent by the server; and Based on the extracted data represented by the EL expression, the object attribute is assigned a value.
2. The method according to claim 1, wherein: Converting the string corresponding to the EL expression into at least one level of abstract object includes: Extracting the initial string in the EL expression; In response to the initial character string not being a character string starting with the first identifier, adding a second identifier before the initial character string to obtain a first target character string; Performing a first operation on the first target string to obtain a first-level abstract object, wherein the first operation includes: A character string between the second identifier and the next identifier in the first target character string is intercepted to serve as a key value in the combination information included in the first-level abstract object.
3. The method according to claim 2, further comprising: Extracting a new target character string starting with the next identifier from the first target character string; In response to the next identifier being the second identifier, performing a second operation on the new target string to obtain a next-level abstract object of the first-level abstract object, the second operation comprising: The character string between the second identifier and the next identifier in the new target character string is intercepted to serve as the key value in the combination information contained in the next-level abstract object.
4. The method according to claim 2, further comprising: Extracting a new target character string starting with the next identifier from the first target character string; In response to the next identifier being the first identifier, performing a third operation on the new target string to obtain a next-level abstract object of the first-level abstract object, the third operation comprising: The character string between the first identifier and the next identifier in the new target character string is intercepted to serve as the index value in the combination information contained in the next-level abstract object.
5. The method according to claim 3 or 4, further comprising: Extracting a character string starting with or following the next identifier from the new target character string as another new target character string; as well as The second operation or the third operation is performed on the other new target character string to obtain an abstract object of another level.
6. The method according to claim 2, further comprising: In response to the initial character string being a character string starting with the first identifier, performing a fourth operation on the initial character string to obtain a first-level abstract object, wherein the fourth operation includes: A character string between the first identifier and the next identifier in the initial character string is intercepted to serve as an index value in the combination information included in the first-level abstract object.
7. The method according to claim 6, further comprising: Extracting a second target character string after the next identifier from the initial character string; In response to the next identifier being the first identifier, performing a fifth operation on the second target string, wherein the fifth operation includes: A character string between the first identifier and the next identifier in the second target character string is intercepted to serve as an index value in the combination information contained in the next level abstract object of the first level abstraction.
8. The method according to claim 6, further comprising: Extracting a second target character string after the next identifier from the initial character string; In response to the next identifier being the second identifier, performing a sixth operation on the second target character string, wherein the sixth operation includes: The character string between the second identifier and the next identifier in the second target character string is intercepted to serve as a key value in the combination information contained in the next level abstract object of the first level abstraction.
9. The method according to claim 7 or 8, further comprising: Extracting a character string starting with or following the next identifier from the second target character string as a new target character string; as well as The fifth operation or the sixth operation is performed on the new target character string to obtain an abstract object of another level.
10. A data processing device for a mobile client, comprising: An acquisition module, used for acquiring an EL expression for representing an object attribute of the mobile client; a conversion module, used for converting the character string corresponding to the EL expression into at least one level of abstract object, wherein each level of abstract object includes one of the following combination information: a key variable and a key value, an index variable and an index value, and there is an association relationship between the upper level abstract object and the lower level abstract object; In the character string corresponding to the EL expression, the character string between the first identifier and the next identifier represents the index value of the abstract object, and the character string between the second identifier and the next identifier represents the key value of the abstract object; An extraction module, configured to extract the data represented by the EL expression from the data sent by the server in response to receiving the data sent by the server, based on the combination information contained in each level of the at least one level of abstract objects and the association relationship; as well as The assignment module is used to assign values to the object attributes based on the extracted data represented by the EL expression.
11. An electronic device, comprising: one or more processors; as well as a memory for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 9.
12. A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, enables the processor to implement the method according to any one of claims 1 to 9.
13. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Code running method and device
CN110096264A
Generating specifications for expression language expressions and tag libraries
US20130054221A1