Information display method, device, electronic device and storage medium

By marking and displaying abnormal signs in car category information, the inefficiency problem of users selecting category values ​​multiple times to view the car's sold-out situation, improving user experience and operational fluency.

CN117350798BActive Publication Date: 2024-12-06CHONGQING JINKANG NEW ENERGY VEHICLE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311121888.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-31
Publication Date
2024-12-06
Estimated Expiration
2043-08-31

AI Technical Summary

Technical Problem

When users check whether the car is sold out, they need to select the car's category value multiple times, resulting in low user experience and operational fluency.

Method used

By responding to the category information display instructions, several categories and category values ​​of the target object are obtained, and abnormal or normal category values ​​are marked according to the preset values ​​to display abnormal marks to reduce the operation steps of users' selection.

Benefits of technology

Users do not need to select category values ​​multiple times to check whether the car is sold out, which improves user experience and operational fluency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117350798B_ABST
    Figure CN117350798B_ABST
Patent Text Reader

Abstract

The present application relates to the field of terminal technology, and provides an information display method, device, electronic device and storage medium. When a user needs to view the sold-out status of a target object (e.g., the remaining inventory of a car) through a webpage or APP, after opening the category information display page of the target object (e.g., the product details page of a car), the method can determine the abnormal category value (i.e., the sold-out category value) in the category information according to the several categories corresponding to the target object and the category values ​​corresponding to each category, and display an abnormal mark in the display area corresponding to the abnormal category value, so that the user does not need to perform multiple category value selection operations to view whether the corresponding target object is sold out, but can directly determine the sold-out status of the target object according to whether the display area corresponding to the category value displays an abnormal mark, so that the user can reduce the operation steps of viewing the remaining quantity of the target object under each category value, thereby improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal technology, and in particular to an information display method, device, electronic device and storage medium. Background Art

[0002] Since the same model of car may have different category values, for example, the vehicle exterior color category may include white and black, and the vehicle wheel size may include 19 inches and 20 inches, etc., therefore, when a user needs to check whether the desired car is sold out on the terminal web page or APP page, he needs to select the corresponding category value for each category of the car before he can see whether the desired car is sold out. The above interaction method will cause the user to select the category value multiple times before he can check whether the corresponding car is sold out, which will lead to low user experience and operation fluency. Summary of the invention

[0003] In view of this, the embodiments of the present application provide an information display method, device, electronic device and computer-readable storage medium to solve the problem in the prior art that users need to perform multiple category value selection operations to check whether the corresponding car is sold out, which leads to low user experience and operation fluency.

[0004] In a first aspect of an embodiment of the present application, a method for displaying information is provided, the method comprising:

[0005] In response to a category information display instruction of a target object, a plurality of categories corresponding to the target object and a category value corresponding to each category are obtained; wherein the number of categories corresponding to the target object is N;

[0006] For the first category of the target object, obtain the remaining quantity of the object corresponding to each category value of the first category; for the nth category of the target object, determine the remaining quantity of the object corresponding to each category value of the nth category according to the normal category values ​​corresponding to the first category to the n-1th category and the category value of the nth category; wherein n is greater than 1 and less than or equal to N;

[0007] If the remaining amount of the object corresponding to the category value is a preset value, the category value is marked as an abnormal category value; if the remaining amount of the object corresponding to the category value is greater than the preset value, the category value is marked as a normal category value;

[0008] The category information of the target object is displayed, wherein an abnormal indicator is displayed in a display area corresponding to an abnormal category value in the category information.

[0009] According to a second aspect of the embodiments of the present application, an information display device is provided, the device comprising:

[0010] The information acquisition module is configured to: in response to the category information display instruction of the target object, acquire a number of categories corresponding to the target object and a category value corresponding to each category; wherein the number of categories corresponding to the target object is N;

[0011] The surplus determination module is configured to: for a first category of the target object, obtain the object surplus corresponding to each category value of the first category; for an nth category of the target object, determine the object surplus corresponding to each category value of the nth category according to normal category values ​​corresponding to the first category to the n-1th category and the category value of the nth category; wherein n is greater than 1 and less than or equal to N;

[0012] The marking determination module is configured to: if the remaining amount of the object corresponding to the category value is a preset value, mark the category value as an abnormal category value; if the remaining amount of the object corresponding to the category value of the nth category is greater than the preset value, mark the category value as a normal category value;

[0013] The information display module is configured to: display the category information of the target object, wherein the display area corresponding to the abnormal category value in the category information displays an abnormal mark.

[0014] According to a third aspect of an embodiment of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.

[0015] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0016] Compared with the prior art, the embodiments of the present application have the following beneficial effects: the embodiments first respond to the category information display instruction of the target object to obtain several categories corresponding to the target object and the category values ​​corresponding to each category. For the first category of the target object, the remaining amount of the object corresponding to each category value of the first category is obtained; for the nth category of the target object, the remaining amount of the object corresponding to each category value of the nth category is determined according to the normal category values ​​corresponding to the first category to the n-1th category and the category value of the nth category, where n is greater than 1 and less than or equal to N; if the remaining amount of the object corresponding to the category value is a preset value, the category value is marked as an abnormal category value; if the remaining amount of the object corresponding to the category value of the nth category is greater than the preset value, the category value is marked as a normal category value. Then, the category information of the target object can be displayed, wherein the display area corresponding to the abnormal category value in the category information displays an abnormal mark. In this embodiment, when the user needs to view the sold-out status of the target object (for example, the remaining inventory of a car) through a web page or APP, after opening the category information display page of the target object (for example, the product details page of the car), the abnormal category value (that is, the sold-out category value) in the category information can be determined based on the several categories corresponding to the target object and the category values ​​corresponding to each category, and an abnormal mark is displayed in the display area corresponding to the abnormal category value. In this way, the user does not need to perform multiple category value selection operations to view whether the corresponding target object is sold out, but can directly determine the sold-out status of the target object based on whether the display area corresponding to the category value displays an abnormal mark. In this way, the user's operation steps for viewing the remaining quantity of the target object under each category value can be reduced, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0018] Figure 1 It is a schematic diagram of an application scenario of an embodiment of the present application;

[0019] Figure 2 It is a flowchart of an information display method provided in an embodiment of the present application;

[0020] Figure 3a This is a schematic diagram of another information display operation interface provided in an embodiment of the present application;

[0021] Figure 3bIt is a flowchart of another information display method provided in an embodiment of the present application;

[0022] Figure 4 It is a structural schematic diagram of an information display device provided in an embodiment of the present application;

[0023] Figure 5 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0024] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0025] An information display method and device according to an embodiment of the present application will be described in detail below with reference to the accompanying drawings.

[0026] Figure 1 1 is a schematic diagram of an application scenario of an embodiment of the present application. The application scenario may include a terminal device 1.

[0027] The terminal device 1 can be hardware or software. When the terminal device 1 is hardware, it can be various electronic devices with a display screen and supporting communication with the server 4, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers and car displays, etc.; when the terminal device 1 is software, it can be installed in the above electronic devices. The terminal device 1 can be implemented as multiple software or software modules, or as a single software or software module, and the embodiments of the present application are not limited to this. Furthermore, various applications can be installed on the terminal device 1, such as data processing applications, instant messaging tools, social platform software, search applications, shopping applications, etc.

[0028] Specifically, when the user needs to view the category information of the target object, the terminal device 1 can first respond to the category information display instruction of the target object, and obtain several categories corresponding to the target object and the category values ​​corresponding to each category. Then, for the first category of the target object, the terminal device 1 can obtain the object remaining quantity corresponding to each category value of the first category; for the nth category of the target object, according to the normal category values ​​corresponding to the first category to the n-1th category and the category value of the nth category, determine the object remaining quantity corresponding to each category value of the nth category; wherein n is greater than 1 and less than or equal to N; if the object remaining quantity corresponding to the category value is a preset value, the category value is marked as an abnormal category value; if the object remaining quantity corresponding to the category value of the nth category is greater than the preset value, the category value is marked as a normal category value. Then, the terminal device 1 can display the category information of the target object, wherein the display area corresponding to the abnormal category value in the category information displays an abnormal mark. Thus, in this embodiment, when the user needs to view the sold-out status of the target object (e.g., the remaining inventory of a car) through a web page or APP, after opening the category information display page of the target object (e.g., the product details page of a car), the abnormal category value (i.e., the sold-out category value) in the category information can be determined based on the several categories corresponding to the target object and the category values ​​corresponding to each category, and an abnormal mark can be displayed in the display area corresponding to the abnormal category value. In this way, the user does not need to perform multiple category value selection operations to view whether the corresponding target object is sold out, but can directly determine the sold-out status of the target object based on whether the display area corresponding to the category value displays an abnormal mark. In this way, the user's operation steps for viewing the remaining quantity of the target object under each category value can be reduced, thereby improving the user experience.

[0029] It should be noted that the specific type, quantity and combination of the terminal devices 1 can be adjusted according to the actual needs of the application scenario, and the embodiments of the present disclosure are not limited to this.

[0030] It should be noted that the above application scenarios are only shown for the purpose of facilitating the understanding of the present disclosure, and the embodiments of the present disclosure are not limited in this respect. On the contrary, the embodiments of the present disclosure can be applied to any applicable scenario.

[0031] Figure 2 It is a flowchart of an information display method provided in an embodiment of the present application. Figure 2 The information display method can be Figure 1 The terminal device executes. Figure 2 As shown, the information display method includes:

[0032] S201, in response to a category information display instruction of a target object, obtaining a number of categories corresponding to the target object and a category value corresponding to each category; wherein the number of categories corresponding to the target object is N, and N is a positive integer greater than 1.

[0033] In this embodiment, when the user needs to use the terminal device to view the category information of the target object, the user can execute a preset operation to generate a category information display instruction for the target object. The terminal device can respond to the category information display instruction of the target object and first obtain several categories corresponding to the target object and the category values ​​corresponding to each category.

[0034] It should be noted that the target object can be understood as the object for which the sold-out status needs to be checked, for example, the target object can be a car, a wheel, etc. The category of the target object can be understood as the attribute dimension of the target object. For example, when the target object is a car wheel, the category can include categories such as wheel size, wheel hub type, and wheel type. The category value of a category can be understood as a specific category attribute under a category. For example, when the target object is a wheel and the category is wheel size, the category value of wheel size can include 19 inches, 20 inches, and 21 inches.

[0035] S202, for the first category of the target object, obtain the object remaining quantity corresponding to each category value of the first category; for the nth category of the target object, determine the object remaining quantity corresponding to each category value of the nth category according to the normal category values ​​corresponding to the first category to the n-1th category and the category value of the nth category; wherein n is greater than 1 and less than or equal to N, and n is a positive integer.

[0036] S203, if the remaining quantity of the object corresponding to the category value is a preset value, mark the category value as an abnormal category value; if the remaining quantity of the object corresponding to the category value is greater than the preset value, mark the category value as a normal category value.

[0037] In this embodiment, the several categories corresponding to the target object may include a first category, a second category, ..., an Nth category.

[0038] For the first category of the target object, the remaining quantity of the object corresponding to each category value of the first category can be obtained from the preset database; if the remaining quantity of the object corresponding to the category value of the first category is the preset value, the category value is marked as an abnormal category value; if the remaining quantity of the object corresponding to the category value of the first category is greater than the preset value, the category value is marked as a normal category value. It should be noted that in one implementation, the preset value can be 0, in which case the abnormal category value can be a category value that has been sold out, that is, there is no remaining quantity, and the normal category value can be a category value that has not been sold out, that is, there is still a remaining quantity.

[0039] Specifically, the specific method for obtaining the remaining quantity of the object corresponding to each category value of the first category can be adopted in the following manner. For each category value of the first category, a temporary variable can be generated according to the first category and the category value. For example, a key-value pair can be generated according to the first category and the category value, wherein the key in the key-value pair is the first category, and the value in the key-value pair is the category value; and, the key-value pair is used as a temporary variable. Then, a mapping function can be called to process the temporary variable to obtain the category detail value corresponding to the category value, for example, Figure 3b As shown, assuming that the terminal device is an Android system, you can call the map mapping function provided by the Android system: fun<T,R> Iterable <t>.map(transform:(T)->R):List <r>, process the temporary variable to obtain the category detail value corresponding to the category value, for example, obtain the list of category values ​​that are sold out under the current category; the input parameter required by the mapping function is a callback function, the system will traverse the category value list, and the callback function can be called when processing each category value.

[0040] Then, the callback function can be called to process the category detail value corresponding to the category value to obtain the remaining amount of the object corresponding to the category value, and the remaining amount of the object corresponding to the category value can be understood as the inventory balance. As an example, the callback function can be called to process the category detail value corresponding to the category value to obtain the return value returned by the callback function. It should be noted that the category detail value can be understood as a category value obtained according to each category corresponding to the target object. For example, the target object is a wheel, and the category of the wheel includes wheel size, wheel hub type, and wheel type. Among them, the category detail value corresponding to the category value wheel size 19 inches may include: "19 inches, steel hub, ordinary wheel", "19 inches, steel hub, explosion-proof wheel", "19 inches, steel hub, anti-skid wheel", "19 inches, alloy hub, ordinary wheel", "19 inches, alloy hub, explosion-proof wheel", "19 inches, alloy hub, anti-skid wheel". Specifically, the category detail value list corresponding to the category value can be input into the callback function, wherein the category detail value list corresponding to the category value includes multiple category detail values ​​corresponding to the category value. For example, assuming that the category value is "19 inches", the category detail value list corresponding to the category value "19 inches" includes multiple category detail values ​​corresponding to the category value "19 inches": "19 inches, steel wheel hub, ordinary wheel", "19 inches, steel wheel hub, explosion-proof wheel", "19 inches, steel wheel hub, anti-skid wheel", "19 inches, alloy wheel hub, ordinary wheel", "19 inches, alloy wheel hub, explosion-proof wheel", "19 inches, alloy wheel hub, anti-skid wheel". Then, the callback function can be used to obtain the remaining object quantity of each category detail value corresponding to the category value; if the remaining object quantities of all category detail values ​​corresponding to the category value are the preset values, the return function returns the first return value, for example, Figure 3b As shown, the first return value can be "true"; if the remaining amount of the object of at least one category detail value corresponding to the category value is greater than the preset value, the return function returns the second return value, for example, Figure 3b As shown, the first return value can be "false". If the return value is the first return value, the remaining quantity of the object corresponding to the category value is the preset value, that is, the target object corresponding to the category value has been sold out; if the return value is the second return value, the remaining quantity of the object corresponding to the category value is greater than the preset value, that is, the target object corresponding to the category value has not been sold out. For example, Figure 3b As shown, when the terminal device is Android, you can call the callback function provided by the Android system: fun <t>Iterable <t>.none(predicate:(T)->Boolean):Boolean, this function indicates whether none of the conditions are met. The required input parameter is a callback function. The system will traverse the preset "category detail list". Each item in the list is a category detail value. If each category detail value does not meet the condition in the callback function (for example, the remaining quantity of each category detail value corresponding to the category value is 0), the Boolean type "true" is returned. If one item meets the condition (for example, if at least one category detail value corresponding to the category value In the callback function, you can call the "Category Detail Value List" of the "Category Detail" object to get the "Category Detail Value List" property. Boolean expression: If the "Category Detail Value List" property contains the "Category Detail Value List" and the "Remaining Quantity" of the "Category Detail" object is greater than 0; return result: If it is "True", it means that in the "Category Detail List", the remaining quantity of each category detail value object corresponding to the category value is 0, that is, the target object of this category has been sold out.

[0041] For the nth category of the target object, the remaining quantity of the object corresponding to each category value of the nth category can be determined according to the normal category values ​​corresponding to the first category to the n-1th category and the category value of the nth category. Wherein, n is greater than 1 and less than or equal to N. It should be noted that in one implementation, the preset value can be 0, in which case the abnormal category value can be the value of the category that has been sold out, that is, there is no remaining quantity, and the normal category value can be the value of the category that has not been sold out, that is, there is still a remaining quantity.

[0042] Specifically, for the nth category of the target object, the method for determining the remaining amount of the object corresponding to each category value of the nth category according to the normal category values ​​corresponding to the first category to the n-1th category and the category value of the nth category can be adopted in the following manner: for each category value of the nth category, a temporary variable can be first generated according to the nth category, the normal category values ​​corresponding to the first category to the n-1th category, and the category value of the nth category; for example, a key-value pair can be generated according to the nth category, the normal category values ​​corresponding to the first category to the n-1th category, and the category value of the nth category, wherein the key in the key-value pair is the nth category, and the value in the key-value pair is the normal category values ​​corresponding to the first category to the n-1th category and the category value of the nth category; and, the key-value pair is used as a temporary variable. In this way, the category values ​​corresponding to the first category to the n-1th category that have been identified as having an object remaining quantity of 0 do not need to be combined with the category value of the nth category to determine the object remaining quantity, which greatly reduces the number of logical processing times.

[0043] Then, the mapping function can be called to process the temporary variable to obtain the category detail value corresponding to the category value, for example, Figure 3b As shown, assuming that the terminal device is an Android system, you can call the map mapping function provided by the Android system: fun<T,R> Iterable <t>.map(transform:(T)->R):List <r>, process the temporary variable to obtain the category detail value corresponding to the category value, for example, obtain the list of category values ​​that are sold out under the current category; the input parameter required by the mapping function is a callback function, the system will traverse the category value list, and the callback function can be called when processing each category value.

[0044] Then, the callback function can be called to process the category detail value corresponding to the category value to obtain the remaining amount of the object corresponding to the category value. As an example, the callback function can be called to process the category detail value corresponding to the category value to obtain the return value returned by the callback function. It should be noted that the category detail value can be understood as a category value obtained according to each category corresponding to the target object. For example, the target object is a wheel, and the category of the wheel includes wheel size, wheel hub type, and wheel type. Among them, the category detail value corresponding to the category value wheel size 19 inches may include: "19 inches, steel hub, ordinary wheel", "19 inches, steel hub, explosion-proof wheel", "19 inches, steel hub, anti-skid wheel", "19 inches, alloy hub, ordinary wheel", "19 inches, alloy hub, explosion-proof wheel", "19 inches, alloy hub, anti-skid wheel". Specifically, the category detail value corresponding to the category value can be input into the callback function; the callback function is used to obtain the remaining quantity of the object of each category detail value corresponding to the category value; if the remaining quantity of the object of all category detail values ​​corresponding to the category value is the preset value, the return function returns the first return value, for example, Figure 3b As shown, the first return value can be "true"; if the remaining amount of the object of at least one category detail value corresponding to the category value is greater than the preset value, the return function returns the second return value, for example, Figure 3b As shown, the first return value can be "false". If the return value is the first return value, the remaining quantity of the object corresponding to the category value is the preset value, that is, the target object corresponding to the category value has been sold out; if the return value is the second return value, the remaining quantity of the object corresponding to the category value is greater than the preset value, that is, the target object corresponding to the category value has not been sold out. For example, Figure 3b As shown, when the terminal device is Android, you can call the callback function provided by the Android system: fun <t>Iterable <t>.none(predicate:(T)->Boolean):Boolean, this function indicates whether none of the conditions are met. The required input parameter is a callback function. The system will traverse the preset "category detail list". Each item in the list is a category detail value. If each category detail value does not meet the condition in the callback function (for example, the remaining quantity of each category detail value corresponding to the category value is 0), the Boolean type "true" is returned. If one item meets the condition (for example, if at least one category detail value corresponding to the category value In the callback function, you can call the "Category Detail Value List" of the "Category Detail" object to get the "Category Detail Value List" property. Boolean expression: If the "Category Detail Value List" property contains the "Category Detail Value List" and the "Remaining Quantity" of the "Category Detail" object is greater than 0; return result: If it is "True", it means that in the "Category Detail List", the remaining quantity of each category detail value object corresponding to the category value is 0, that is, the target object of this category has been sold out.

[0045] S204, displaying the category information of the target object, wherein the display area corresponding to the abnormal category value in the category information displays an abnormal mark.

[0046] In this embodiment, after determining the abnormal category value of the target object, when displaying the category information of the target object, an abnormal mark may be displayed in the display area corresponding to the abnormal category value in the category information. Figure 3a As shown, assuming that the target object is a car wheel, the categories may include wheel size, hub type, wheel type and other categories. When the category information of the target object is displayed on the page, an abnormal sign "Sold out" may be displayed in the display area of ​​the abnormal category value "explosion-proof wheel".

[0047] Compared with the prior art, the embodiments of the present application have the following beneficial effects: the embodiments first respond to the category information display instruction of the target object to obtain several categories corresponding to the target object and the category values ​​corresponding to each category. For the first category of the target object, the remaining amount of the object corresponding to each category value of the first category is obtained; for the nth category of the target object, the remaining amount of the object corresponding to each category value of the nth category is determined according to the normal category values ​​corresponding to the first category to the n-1th category and the category value of the nth category, where n is greater than 1 and less than or equal to N; if the remaining amount of the object corresponding to the category value is a preset value, the category value is marked as an abnormal category value; if the remaining amount of the object corresponding to the category value of the nth category is greater than the preset value, the category value is marked as a normal category value. Then, the category information of the target object can be displayed, wherein the display area corresponding to the abnormal category value in the category information displays an abnormal mark. In this embodiment, when the user needs to view the sold-out status of the target object (for example, the remaining inventory of a car) through a web page or APP, after opening the category information display page of the target object (for example, the product details page of the car), the abnormal category value (that is, the sold-out category value) in the category information can be determined based on the several categories corresponding to the target object and the category values ​​corresponding to each category, and an abnormal mark is displayed in the display area corresponding to the abnormal category value. In this way, the user does not need to perform multiple category value selection operations to view whether the corresponding target object is sold out, but can directly determine the sold-out status of the target object based on whether the display area corresponding to the category value displays an abnormal mark. In this way, the user's operation steps for viewing the remaining quantity of the target object under each category value can be reduced, thereby improving the user experience.

[0048] Next, combine Figure 3b introduce Figure 2 A specific implementation of the corresponding embodiment may include the following steps in this embodiment:

[0049] Step 1: Initialize data;

[0050] You can draw the controls first, that is, draw the corresponding category value controls on the interface according to the category classification list, and the order is consistent with the order of the category classification list. Then, initialize the data, specifically, mark the category values ​​in the category classification list as in stock, so that each category value control does not have a sold out mark. Next, initialize an ordered container, such as an array, a linked list, a hash table, etc., and use it as a container for storing the selected category value combinations in order from top to bottom, hereinafter referred to as a container. Set its content to empty. It can be seen that the maximum number of ordered containers is the number of category classification lists. In one implementation, the maximum number of ordered containers can be 3 (for example, wheel size, hub type, wheel type).

[0051] Step 2: Create data structure;

[0052] You can first create a category class with member variables: picture, type: string, which means the web URL of the picture; category name, type: string; category value list, type: the type of each item in the list is the category value type. For example: if the category is wheel type, the category value list is: ordinary wheel, explosion-proof wheel, anti-skid wheel.

[0053] Then, create a class for category value, member variable: display name, type: string, which is the specific display name of the category value, for example: car wheels.

[0054] Next, you can create a category details class with member variables: category details value list, type: the type of each item in the list is the category details value type; remaining quantity, type: number, which can be used to determine whether it has been sold out.

[0055] Next, you can create a class for category detail values, with member variables: category name, type: string, which is the specific name of the category, corresponding to the category name in the above category, for example: wheel type in the above category; category value, type: string, which is the specific value under a certain category, corresponding to the display name in the above category value, for example: anti-skid wheel in the wheel type category.

[0056] Step 3: Call the main process function;

[0057] Create a new function to execute the main process. Create the storage container required by the algorithm to store temporary variables during the algorithm:

[0058] (1) Create a storage variable and call it category index: variable type: numeric, function: record which category of the row is currently being processed, initial value: 0.

[0059] (2) Create a global storage variable called sold-out categories. The variable type is a hash table. The hash table consists of key-value pairs. Its key type is a category object, which means a category, such as wheel type. Its value is a collection of category value types, which means a specific category value, such as anti-skid wheels. Function: Record the categories that have been sold out. When drawing the external interface, it will traverse this "sold-out category" and draw each item as a sold-out mark as required by business requirements.

[0060] (3) Create a storage variable and call it a temporary variable. Variable type: hash table. Its key type is a category object, which means a category, such as wheel type. Its value is a category value type, which means a specific category value, such as anti-skid wheel. Function: used to record the category value selected by the user.

[0061] Next, execute the main process:

[0062] (1) Create a loop body, and enter the condition: the category index is less than the total number of category lists. If the category index is less than the total number of category rows, then enter the loop body. If the category index is not less than the total number of category rows, then do not enter the loop body and end the main process. The list comes from the category data returned by the server, and the type of each data item is the class of the category mentioned above.

[0063] (2) The loop body specifically includes: calling the member attribute of the category list: obtaining the category under the current category index. For example, if the current category index is 0, it means processing the first row of categories;

[0064] (3) Call the member attribute "category value list" for the category in step (2) to obtain the "category value list" attribute under the current category;

[0065] (4) Calculate the category value of the sold-out category under this row of categories using the category list obtained in step (3). For example, the specific implementation logic is:

[0066] Call the mapping function provided by the Android system for the "category value list": fun<T,R> Iterable <t>.map(transform:(T)->R):List <r>Get the list of sold-out category values ​​under the current category; the function requires a callback function as an input parameter. The system will traverse the "category value list" and call the callback function for each item. The callback function has one parameter, which is the category value.

[0067] Write the logic in the callback function: store the category value in the "temporary variable", use the current category as the key of the "temporary variable", the category value as the value of the "temporary variable", and call the mapping function for the "temporary variable": fun<T,R> Iterable <t>.map(transform:(T)->R):List <r>, the parameter of the callback function is the key-value pair of "temporary variable". In the callback function, create an object of "category detail value", assign the key of the previous key-value pair to the "category name" of the "category detail value" object, and assign the value of the key-value pair to the "category value" of the "category detail value" object. The map mapping function returns a list of "category detail values"; call the function provided by the Android system for the "category detail list": fun <t>Iterable <t>.none(predicate:(T)->Boolean):Boolean, this function indicates whether none of the conditions are met. It requires a callback function as an input parameter. The system will traverse the "category detail list", and each of its items is a "category detail" object. If each item does not meet the conditions in the callback function, it returns the Boolean type "true", and if one item meets the conditions, it returns the Boolean type "false". In the callback function, write: call the "category detail value list" of the "category detail" object to get the "category detail value list" attribute; Boolean expression: if the "category detail value list" attribute contains the returned "category detail value list" and the "remaining quantity" of the "category detail" object is greater than 0. Return result: If it is "true", it means that in the "category detail list", the remaining quantity of all "category details" that contain the "category detail value" list is 0, which means that the target objects of this category have been sold out. If it is determined that the product has been sold out, the "category index" is set to the total number of category rows, so that the loop of step (1) ends and the "category value" is returned. Therefore, the result returned by step (4) is the list of category values ​​that have been sold out under the current category index.

[0068] (5) Store the "list of sold-out category values" obtained in step (4)

[0069] The "list of sold-out category values" finally obtained in step (4) is recorded in the above-mentioned global storage variable "sold-out category", where the current category is used as the key of "sold-out category" and the "list of sold-out category values" is used as the value of "sold-out category".

[0070] (6) Store the default selected category value of the current category in the "temporary variable"

[0071] Reset the "Category Value" of the "Key" in the "Temporary Variable" to the category value of the current category selected by default. This is to combine the category value selected in the previous row with the category value of the next row when processing the next row.

[0072] (7) The category index is incremented, indicating that the category in this row has been processed, and the next row of categories is processed.

[0073] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described one by one here.

[0074] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.

[0075] Figure 4 Schematic diagram of an information display device provided in an embodiment of the present application. Figure 4 As shown, the information display device includes:

[0076] The information acquisition module 401 is configured to: in response to a category information display instruction of a target object, acquire a number of categories corresponding to the target object and a category value corresponding to each category; wherein the number of categories corresponding to the target object is N;

[0077] The remaining quantity determination module 402 is configured to: for the first category of the target object, obtain the remaining quantity of the object corresponding to each category value of the first category; for the nth category of the target object, determine the remaining quantity of the object corresponding to each category value of the nth category according to the normal category values ​​corresponding to the first category to the n-1th category and the category value of the nth category; wherein n is greater than 1 and less than or equal to N;

[0078] The marking determination module 403 is configured to: if the remaining amount of the object corresponding to the category value is a preset value, mark the category value as an abnormal category value; if the remaining amount of the object corresponding to the category value of the nth category is greater than the preset value, mark the category value as a normal category value;

[0079] The information display module 404 is configured to: display the category information of the target object, wherein the display area corresponding to the abnormal category value in the category information displays an abnormal mark.

[0080] Optionally, the margin determination module 402 is configured to:

[0081] For each category value of the first category, generate a temporary variable according to the first category and the category value;

[0082] Calling a mapping function to process the temporary variable to obtain a category detail value corresponding to the category value;

[0083] The callback function is called to process the category detail value corresponding to the category value to obtain the remaining quantity of the object corresponding to the category value.

[0084] Optionally, the margin determination module 402 is configured to:

[0085] Generate a key-value pair according to the first category and the category value, wherein the key in the key-value pair is the first category, and the value in the key-value pair is the category value;

[0086] Use the key-value pair as a temporary variable.

[0087] Optionally, the margin determination module 402 is configured to:

[0088] For each category value of the nth category, a temporary variable is generated according to the nth category, normal category values ​​corresponding to the first category to the n-1th category, and the category value of the nth category;

[0089] Calling a mapping function to process the temporary variable to obtain a category detail value corresponding to the category value;

[0090] The callback function is called to process the category detail value corresponding to the category value to obtain the remaining quantity of the object corresponding to the category value.

[0091] Optionally, the margin determination module 402 is configured to:

[0092] Generate a key-value pair according to the nth category, the normal category values ​​corresponding to the first category to the n-1th category, and the category value of the nth category, wherein the key in the key-value pair is the nth category, and the value in the key-value pair is the normal category values ​​corresponding to the first category to the n-1th category and the category value of the nth category;

[0093] Use the key-value pair as a temporary variable.

[0094] Optionally, the margin determination module 402 is configured to:

[0095] Calling the callback function to process the category detail value corresponding to the category value to obtain the return value returned by the callback function;

[0096] If the return value is the first return value, the remaining quantity of the object corresponding to the category value is the preset value;

[0097] If the return value is the second return value, the remaining quantity of the object corresponding to the category value is greater than the preset value.

[0098] Optionally, the margin determination module 402 is configured to:

[0099] Inputting a category detail value list corresponding to the category value into the callback function; wherein the category detail value list corresponding to the category value includes a plurality of category detail values ​​corresponding to the category value;

[0100] Using the callback function to obtain the remaining quantity of the object of each category detail value corresponding to the category value;

[0101] If the remaining quantities of objects of all category detail values ​​corresponding to the category value are all the preset values, the return function returns the first return value;

[0102] If the remaining quantity of objects of at least one category detail value corresponding to the category value is greater than the preset value, the return function returns the second return value.

[0103] The beneficial effect of the embodiments of the present application compared with the prior art is: in this embodiment, when the user needs to view the sold-out status of the target object (for example, the remaining inventory of a car) through a web page or APP, after opening the category information display page of the target object (for example, the product details page of a car), the abnormal category value (that is, the sold-out category value) in the category information can be determined according to the several categories corresponding to the target object and the category values ​​corresponding to each category, and an abnormal mark is displayed in the display area corresponding to the abnormal category value. In this way, the user does not need to perform multiple category value selection operations to view whether the corresponding target object is sold out, but can directly determine the sold-out status of the target object based on whether the display area corresponding to the category value displays an abnormal mark. In this way, the user can reduce the number of operation steps for viewing the remaining quantity of the target object under each category value, thereby improving the user experience.

[0104] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0105] Figure 5 Schematic diagram of an electronic device 5 provided in an embodiment of the present application. Figure 5 As shown, the electronic device 5 of this embodiment includes: a processor 501, a memory 502, and a computer program 503 stored in the memory 502 and executable on the processor 501. When the processor 501 executes the computer program 503, the steps in the above-mentioned method embodiments are implemented. Alternatively, when the processor 501 executes the computer program 503, the functions of the modules / units in the above-mentioned device embodiments are implemented.

[0106] The electronic device 5 may be a desktop computer, a notebook, a PDA, a cloud server, or other electronic device. The electronic device 5 may include, but is not limited to, a processor 501 and a memory 502. Those skilled in the art will appreciate that Figure 5 The electronic device 5 is merely an example and does not limit the electronic device 5 , and may include more or less components than those shown in the figure, or different components.

[0107] The processor 501 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0108] The memory 502 may be an internal storage unit of the electronic device 5, for example, a hard disk or memory of the electronic device 5. The memory 502 may also be an external storage device of the electronic device 5, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 5. The memory 502 may also include both an internal storage unit of the electronic device 5 and an external storage device. The memory 502 is used to store computer programs and other programs and data required by the electronic device.

[0109] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units.

[0110] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. The computer program may include computer program code, and the computer program code may be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electric carrier signals and telecommunication signals.

[0111] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.< / t> < / t> < / r> < / t> < / r> < / t> < / t> < / t> < / r> < / t> < / t> < / t> < / r> < / t>

Claims

1. An information display method, characterized in that: The method comprises: In response to a target object category information display instruction, obtain a number of categories corresponding to the target object and a category value corresponding to each category; wherein the number of categories corresponding to the target object is N; For the first category of the target object, obtain the remaining quantity of the object corresponding to each category value of the first category; for the nth category of the target object, determine the remaining quantity of the object corresponding to each category value of the nth category based on the normal category values ​​corresponding to the first category to the n-1th category and the category value of the nth category; where n is greater than 1 and less than or equal to N; If the remaining quantity of the object corresponding to the category value is the preset value, the category value is marked as an abnormal category value; if the remaining quantity of the object corresponding to the category value is greater than the preset value, the category value is marked as a normal category value; Displaying the category information of the target object, wherein the display area corresponding to the abnormal category value in the category information is displayed with an abnormality mark; The step of determining the remaining quantity of the target object corresponding to each category value of the nth category according to the normal category values ​​corresponding to the first category to the n-1th category and the category value of the nth category for the nth category includes: Generate a second key-value pair based on the nth category, the normal category values ​​corresponding to the first to n-1th categories, and the category value of the nth category, wherein the key in the second key-value pair is the nth category, and the value in the second key-value pair is the normal category values ​​corresponding to the first to n-1th categories and the category value of the nth category; use the second key-value pair as a second temporary variable; Calling a mapping function to process the second temporary variable to obtain a category detail value corresponding to the category value of the nth category; The callback function is called to process the category detail value corresponding to the category value of the n-th category to obtain the remaining quantity of the object corresponding to the category value of the n-th category.

2. The method according to claim 1, characterized in that For the first category of the target object, obtaining the remaining quantity of the object corresponding to each category value of the first category includes: For each category value of the first category, generate a first temporary variable according to the first category and the category value of the first category; Calling a mapping function to process the first temporary variable to obtain a category detail value corresponding to the category value of the first category; The callback function is called to process the category detail value corresponding to the category value of the first category to obtain the remaining amount of the object corresponding to the category value of the first category.

3. The method according to claim 2, characterized in that Generating a first temporary variable according to the first category and the category value of the first category includes: generating a first key-value pair according to the first category and the category value of the first category, wherein the key in the first key-value pair is the first category, and the value in the first key-value pair is the category value of the first category; The first key-value pair is used as a first temporary variable.

4. The method according to claim 1, wherein The calling callback function processes the category detail value corresponding to the category value of the n-th category to obtain the remaining quantity of the object corresponding to the category value of the n-th category, including: Calling the callback function to process the category detail value corresponding to the category value of the nth category, and obtaining the return value returned by the callback function; If the return value is the first return value, the remaining quantity of the object corresponding to the category value of the nth category is the preset value; If the return value is the second return value, the remaining quantity of objects corresponding to the category value of the nth category is greater than the preset value.

5. The method according to claim 4, characterized in that The calling callback function processes the category detail value corresponding to the category value of the nth category to obtain a return value returned by the callback function, including: Inputting a list of category detail values ​​corresponding to the category value of the nth category into the callback function; wherein the list of category detail values ​​corresponding to the category value of the nth category includes multiple category detail values ​​corresponding to the category value of the nth category; Using the callback function, obtain the remaining quantity of each category detail value corresponding to the category value of the nth category; If the remaining quantities of all the category detail values ​​corresponding to the category value of the nth category are all the preset values, the callback function returns the first return value; If the remaining quantity of objects of at least one category detail value corresponding to the category value of the nth category is greater than the preset value, the callback function returns the second return value.

6. The method according to claim 2, characterized in that The calling callback function processes the category detail value corresponding to the category value of the first category to obtain the remaining quantity of the object corresponding to the category value of the first category, including: Calling the callback function to process the category detail value corresponding to the category value of the first category, and obtaining a return value returned by the callback function; If the return value is the first return value, the remaining quantity of the object corresponding to the category value of the first category is the preset value; If the return value is the second return value, the remaining quantity of objects corresponding to the category value of the first category is greater than the preset value.

7. The method according to claim 6, characterized in that The calling callback function processes the category detail value corresponding to the category value of the first category to obtain a return value returned by the callback function, including: Inputting a list of category detail values ​​corresponding to the category value of the first category into the callback function; wherein the list of category detail values ​​corresponding to the category value of the first category includes multiple category detail values ​​corresponding to the category value of the first category; Using the callback function, obtain the remaining quantity of each category detail value corresponding to the category value of the first category; If the remaining quantities of all the category detail values ​​corresponding to the category value of the first category are all the preset values, the callback function returns the first return value; If the remaining quantity of objects of at least one category detail value corresponding to the category value of the first category is greater than the preset value, the callback function returns the second return value.

8. An information display device, characterized in that: The device comprises: The information acquisition module is configured to: in response to a category information display instruction of a target object, acquire a number of categories corresponding to the target object and a category value corresponding to each category; wherein the number of categories corresponding to the target object is N; The remaining quantity determination module is configured to: for a first category of the target object, obtain the remaining quantity of the object corresponding to each category value of the first category; for an nth category of the target object, determine the remaining quantity of the object corresponding to each category value of the nth category based on the normal category values ​​corresponding to the first category to the n-1th category and the category value of the nth category; wherein n is greater than 1 and less than or equal to N; The marking determination module is configured to: mark the category value as an abnormal category value if the remaining quantity of the object corresponding to the category value is a preset value; and mark the category value as a normal category value if the remaining quantity of the object corresponding to the category value of the nth category is greater than the preset value; An information display module is configured to: display category information of the target object, wherein a display area corresponding to an abnormal category value in the category information displays an abnormality mark; Among them, the balance determination module is specifically configured to: generate a second key-value pair according to the nth category, the normal category values ​​corresponding to the first category to the n-1th category, and the category value of the nth category, wherein the key in the second key-value pair is the nth category, and the value in the second key-value pair is the normal category values ​​corresponding to the first category to the n-1th category and the category value of the nth category; use the second key-value pair as a second temporary variable; call the mapping function to process the second temporary variable to obtain the category detail value corresponding to the category value of the nth category; call the callback function to process the category detail value corresponding to the category value of the nth category to obtain the object remaining quantity corresponding to the category value of the nth category.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, 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, characterized in that The computer-readable storage medium stores a computer program, which implements the steps of the method according to any one of claims 1 to 7 when executed by a processor.

Citation Information

Patent Citations

  • Inventory information query method and device

    CN112307274A

  • Data query method and device based on multi-level cache

    CN113360528A