An electronic price tag data transmission method, terminal and storage medium
By maintaining a local database on the server side and using a unique identifier, only the identification information of the electronic price tag is transmitted, which solves the problem of long data transmission time of the electronic price tag and improves the transmission performance and user experience.
Patent Information
- Application Number
- CN202110844847.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-26
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2041-07-26
AI Technical Summary
The data transmission of existing electronic price tags takes a long time, resulting in a poor user experience.
Maintain a local database on the server side, identify the server data that has been pushed by generating a unique identifier, and only push the identification information to the electronic price tag. The electronic price tag reads the corresponding data in the cache according to the identifier and displays it.
It reduces the amount of data transmitted, improves transmission performance, solves the problem of long data transmission time, and enhances user experience.
Smart Images

Figure CN113505146B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the technical field of electronic price tags, and in particular to a method, terminal, and storage medium for electronic price tag data transmission. Background Art
[0002] The rapid development of smart retail is making life increasingly convenient for everyone, and it's foreseeable that it will become an essential part of our lives in the future. Electronic price tags, a representative product of smart retail, have significantly improved retail efficiency and saved significant labor costs. The most basic operation of an electronic price tag is image push, where the server directly pushes image data containing new product information to the electronic price tag for display. However, image data is quite large compared to the bandwidth of IoT networks, so existing image push methods often require a long time to complete the data transmission process, severely impacting the user experience. Summary of the Invention
[0003] The main purpose of the embodiments of the present invention is to provide a method, terminal and storage medium for electronic price tag data transmission, aiming to solve the technical problem that the existing electronic price tag data transmission method takes a long time and leads to poor user experience.
[0004] To achieve the above-mentioned purpose, an embodiment of the present invention provides a method for transmitting electronic price tag data, which is based on the server side and includes the following steps: querying the server data in a local database according to a first identifier of the server data to be pushed; if the first identifier is queried in the local database, further querying the electronic price tag in a historical push list of the server data according to a second identifier of the electronic price tag to be pushed; if the electronic price tag is queried in the historical push list, only the first identifier is pushed to the electronic price tag, so that the electronic price tag reads the corresponding cached data in the cache according to the first identifier for display.
[0005] Optionally, before the step of querying the server data in the local database according to the first identifier of the server data to be pushed, the method further includes the following steps: performing hash calculation on the server data to generate the first identifier.
[0006] Optionally, after the step of querying the server data in the local database according to the first identifier of the server data to be pushed, the step further includes: if the first identifier cannot be found in the local database, the server data is directly pushed to the electronic price tag in its entirety, and the first identifier is stored in the local database and the second identifier is stored in the historical push list of the server data.
[0007] Optionally, if the first identifier is queried in the local database, after the step of further querying the electronic price tag in the historical push list of the server data based on the second identifier of the electronic price tag to be pushed, the following steps are also included: if the electronic price tag cannot be found in the historical push list, the server data is directly pushed to the electronic price tag in its entirety, and the second identifier is stored in the historical push list of the server data.
[0008] Optionally, if the electronic price tag is found in the historical push list, only the first identifier is pushed to the electronic price tag so that the electronic price tag reads the corresponding cache data in the cache for display according to the first identifier, and the step specifically includes: if after pushing the first identifier to the electronic price tag, a response message indicating successful display is received from the electronic price tag, then the sorting of the server data is updated in the local database; if after pushing the first identifier to the electronic price tag, a response message indicating unsuccessful display is received from the electronic price tag, then the server data is completely pushed to the electronic price tag again, and the server data is stored in the cache of the electronic price tag.
[0009] In addition, to achieve the above-mentioned purpose, an embodiment of the present invention also proposes a method for transmitting electronic price tag data. Based on the electronic price tag end, the method includes the following steps: receiving data pushed by the server end, and determining whether the data is a first identifier; if the data is a first identifier, further querying the corresponding cache data in the cache according to the first identifier; if the corresponding cache data is queried in the cache, reading and displaying the cache data, and updating the sorting of the cache data in the cache, and feeding back a response message of successful display to the server end.
[0010] Optionally, after the step of receiving the data pushed from the server and determining whether the data is a first identifier, the following step is further included: if the data is not the first identifier, directly reading and displaying the data.
[0011] Optionally, if the data is a first identifier, after further querying the corresponding cache data in the cache according to the first identifier, the following steps are also included: if the corresponding cache data cannot be found in the cache, a response message of unsuccessful display is fed back to the server side.
[0012] In addition, to achieve the above-mentioned purpose, an embodiment of the present invention also proposes a terminal, which includes a memory, a processor, a program stored on the memory and executable on the processor, and a data bus for realizing connection and communication between the processor and the memory. When the program is executed by the processor, the steps of the above-mentioned method are implemented.
[0013] In addition, to achieve the above-mentioned purpose, an embodiment of the present invention further proposes a storage medium for computer-readable storage, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the above-mentioned method.
[0014] The method, terminal and storage medium for transmitting electronic price tag data proposed in the embodiment of the present invention are such that when the electronic price tag needs to update the product information displayed on its electronic screen, its server side will first query the server data in the local database based on the first identifier of the server data to be pushed. Then, if the first identifier is queried in the local database, the electronic price tag is further queried in the historical push list of the server data based on the second identifier of the electronic price tag to be pushed. Finally, if the electronic price tag is queried in the historical push list, only the first identifier is pushed to the electronic price tag so that the electronic price tag reads the corresponding cache data in the cache according to the first identifier for display. In this way, the method for transmitting electronic price tag data maintains a local database on the server side to record the relevant information of the server data that has been sent, so that when the server data is pushed to the same electronic price tag again, it only needs to transmit the first identifier of the server data, so that the electronic price tag end can read the corresponding cache data in the cache according to the first identifier for display. Since only the first identifier of the server data needs to be transmitted, and the server data does not need to be transmitted in its entirety, the amount of transmitted data is greatly reduced and the transmission performance is greatly improved, thereby effectively solving the technical problem that the existing electronic price tag data transmission takes a long time and causes poor user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 A schematic diagram of the hardware structure of a mobile terminal implementing various embodiments of the present invention.
[0016] Figure 2 For example Figure 1 The communication network system architecture diagram on which the mobile terminal is based is shown.
[0017] Figure 3 This is a flow chart of a method for transmitting electronic price tag data according to an embodiment of the present invention.
[0018] Figure 4 for Figure 3 The specific flow chart of step S130 of the method for transmitting electronic price label data is shown.
[0019] Figure 5 This is a flow chart of a method for transmitting electronic price tag data according to embodiment 2 of the present invention.
[0020] Figure 6 This is a structural block diagram of a terminal according to embodiment 3 of the present invention.
[0021] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION
[0022] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0023] In the subsequent description, suffixes such as "module," "component," or "unit" used to represent elements are only used to facilitate the description of the present invention and have no specific meaning. Therefore, "module," "component," or "unit" can be used interchangeably.
[0024] The terminal can be implemented in various forms. For example, the terminal described in the present invention may include mobile terminals such as mobile phones, tablet computers, laptop computers, PDAs, portable media players (PMPs), navigation devices, wearable devices, smart bracelets, pedometers, etc., as well as fixed terminals such as digital TVs and desktop computers.
[0025] The following description will be made by taking a mobile terminal as an example. It will be understood by those skilled in the art that, in addition to components specifically used for mobile purposes, the configuration according to the embodiments of the present invention can also be applied to fixed type terminals.
[0026] See also Figure 1 , which is a schematic diagram of the hardware structure of a mobile terminal for implementing various embodiments of the present invention. The mobile terminal 100 may include: an RF (Radio Frequency) unit 101, a WiFi module 102, an audio output unit 103, an A / V (Audio / Video) input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, a processor 110, and a power supply 111. Those skilled in the art will understand that Figure 1 The structure of the mobile terminal shown in the figure does not constitute a limitation to the mobile terminal. The mobile terminal may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0027] The following combination Figure 1A detailed introduction to the various components of the mobile terminal:
[0028] The RF unit 101 can be used to send and receive messages or receive signals during calls. Specifically, it receives downlink messages from the base station and passes them to the processor 110 for processing. It also sends uplink data to the base station. Typically, the RF unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low-noise amplifier, a duplexer, and more. Furthermore, the RF unit 101 can communicate with the network and other devices via wireless communication. The above-mentioned wireless communications may use any communication standard or protocol, including but not limited to GSM (Global System of Mobile communication), GPRS (General Packet Radio Service), CDMA2000 (Code Division Multiple Access 2000), WCDMA (Wideband Code Division Multiple Access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access), FDD-LTE (Frequency Division Duplexing- Long Term Evolution) and TDD-LTE (Time Division Duplexing- Long Term Evolution), etc.
[0029] WiFi is a short-range wireless transmission technology. Mobile terminals can help users send and receive emails, browse web pages, and access streaming media through the WiFi module 102. It provides users with wireless broadband Internet access. Figure 1 The WiFi module 102 is shown, but it is understandable that it is not an essential component of the mobile terminal and can be omitted as needed without changing the essence of the invention.
[0030] The audio output unit 103 can convert audio data received by the RF unit 101 or the WiFi module 102 or stored in the memory 109 into an audio signal and output it as sound when the mobile terminal 100 is in a call signal reception mode, a talk mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Furthermore, the audio output unit 103 can also provide audio output related to a specific function performed by the mobile terminal 100 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 103 may include a speaker, a buzzer, or the like.
[0031] The A / V input unit 104 is used to receive audio or video signals. The A / V input unit 104 may include a graphics processing unit (GPU) 1041 and a microphone 1042. The GPU 1041 processes image data from still images or videos captured by an image capture device (such as a camera) in video capture mode or image capture mode. The processed image frames may be displayed on the display unit 106. The image frames processed by the GPU 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the RF unit 101 or the WiFi module 102. The microphone 1042 can receive sound (audio data) in various operating modes, such as phone call mode, recording mode, and voice recognition mode, and process such sound into audio data. In phone call mode, the processed audio (voice) data may be converted into a format that can be transmitted to a mobile communication base station via the RF unit 101. The microphone 1042 may implement various noise cancellation (or suppression) algorithms to eliminate (or suppress) noise or interference generated during the reception and transmission of audio signals.
[0032] The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor. The ambient light sensor can adjust the brightness of the display panel 1061 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 1061 and / or the backlight when the mobile terminal 100 is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (generally three axes) and the magnitude and direction of gravity when stationary. It can be used for applications that recognize the posture of the mobile phone (such as switching between horizontal and vertical screens, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors that can be configured in the mobile phone, such as fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they are not described here.
[0033] The display unit 106 is used to display messages input by the user or messages provided to the user. The display unit 106 may include a display panel 1061, which may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
[0034] The user input unit 107 can be used to receive input numeric or character messages and generate key signal input related to user settings and function control of the mobile terminal. Specifically, the user input unit 107 may include a touch panel 1071 and other input devices 1072. The touch panel 1071, also known as a touch screen, can detect user touch operations on or near it (for example, operations performed on or near the touch panel 1071 using a finger, stylus, or any other suitable object or accessory) and drive corresponding connected devices according to pre-set programs. The touch panel 1071 may include a touch detection device and a touch controller. The touch detection device detects the user's touch position and detects signals generated by the touch operation, transmitting the signals to the touch controller. The touch controller receives touch signals from the touch detection device, converts them into touch point coordinates, and then sends them to the processor 110. The touch controller can also receive and execute commands from the processor 110. Furthermore, the touch panel 1071 can be implemented using various types of sensors, including resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 may further include other input devices 1072. Specifically, the other input devices 1072 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, power keys, etc.), a trackball, a mouse, a joystick, etc., and are not specifically limited here.
[0035] Furthermore, the touch panel 1071 may cover the display panel 1061. When the touch panel 1071 detects a touch operation on or near it, it transmits the information to the processor 110 to determine the type of touch event. Subsequently, the processor 110 provides corresponding visual output on the display panel 1061 according to the type of touch event. Figure 1 In the embodiment, the touch panel 1071 and the display panel 1061 are two independent components to realize the input and output functions of the mobile terminal. However, in some embodiments, the touch panel 1071 and the display panel 1061 can be integrated to realize the input and output functions of the mobile terminal, which is not limited here.
[0036] The interface unit 108 serves as an interface through which at least one external device can be connected to the mobile terminal 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, an audio input / output (I / O) port, a video I / O port, a headphone port, etc. The interface unit 108 may be used to receive input (e.g., data messages, power, etc.) from the external device and transmit the received input to one or more elements within the mobile terminal 100 or may be used to transmit data between the mobile terminal 100 and the external device.
[0037] Memory 109 can be used to store software programs and various data. Memory 109 may primarily include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for a function (such as sound playback or image playback); the data storage area may store data generated based on the use of the phone (such as audio data and a phone book). Memory 109 may also include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state memory device.
[0038] Processor 110 is the control center of the mobile terminal, connecting all components of the mobile terminal using various interfaces and circuits. By running or executing software programs and / or modules stored in memory 109 and accessing data stored in memory 109, it executes various functions of the mobile terminal and processes data, thereby providing overall monitoring of the mobile terminal. Processor 110 may include one or more processing units; preferably, processor 110 may integrate an application processor and a modem processor. The application processor primarily handles the operating system, user interface, and application programs, while the modem processor primarily handles wireless communications. It is understood that the modem processor may not be integrated into processor 110.
[0039] The mobile terminal 100 may further include a power supply 111 (such as a battery) for supplying power to various components. Preferably, the power supply 111 may be logically connected to the processor 110 via a power management system, thereby enabling the power management system to manage charging, discharging, and power consumption.
[0040] although Figure 1 Not shown, the mobile terminal 100 may further include a Bluetooth module, etc., which will not be described in detail here.
[0041] To facilitate understanding of the embodiments of the present invention, the communication network system on which the mobile terminal of the present invention is based is described below.
[0042] See also Figure 2 , Figure 2 A communication network system architecture diagram is provided for an embodiment of the present invention. The communication network system is an LTE system based on universal mobile communication technology. The LTE system includes a UE (User Equipment) 201, an Evolved UMTS Terrestrial Radio Access Network (E-UTRAN) 202, an Evolved Packet Core (EPC) 203, and an operator's IP service 204, which are sequentially connected in communication.
[0043] Specifically, UE201 may be the above-mentioned terminal 100, which will not be described in detail here.
[0044] E-UTRAN 202 includes eNodeB 2021 and other eNodeBs 2022 , etc. Among them, eNodeB 2021 can be connected to other eNodeBs 2022 via a backhaul (eg, an X2 interface). eNodeB 2021 is connected to EPC 203 , and eNodeB 2021 can provide UE 201 with access to EPC 203 .
[0045] The EPC 203 may include an MME (Mobility Management Entity) 2031, an HSS (Home Subscriber Server) 2032, other MMEs 2033, an SGW (Serving GateWay) 2034, a PGW (PDN GateWay) 2035, and a PCRF (Policy and Charging Rules Function) 2036. The MME 2031 is the control node that processes signaling between the UE 201 and the EPC 203, providing bearer and connection management. The HSS 2032 provides registers for managing functions such as the Home Location Register (not shown) and stores user-specific information such as service features and data rates. All user data can be sent through SGW2034. PGW2035 can provide IP address allocation and other functions for UE 201. PCRF2036 is the policy and charging control policy decision point for service data flows and IP bearer resources. It selects and provides available policy and charging control decisions for the policy and charging execution function unit (not shown in the figure).
[0046] The IP service 204 may include the Internet, an intranet, an IMS (IP Multimedia Subsystem), or other IP services.
[0047] Although the above description is based on the LTE system as an example, those skilled in the art should know that the present invention is not only applicable to the LTE system, but also to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA, and future new network systems, and is not limited here.
[0048] Based on the above-mentioned mobile terminal hardware structure and communication network system, various embodiments of the method of the present invention are proposed.
[0049] Example 1
[0050] like Figure 3 As shown, the first embodiment of the present invention proposes a method for transmitting electronic price tag data. Based on the server side, the method specifically includes the following steps:
[0051] Step S110: According to the first identifier of the server data to be pushed, query the server data in the local database.
[0052] Specifically, the method in the embodiments of the present invention is primarily applied to the following electronic price tag system, which primarily consists of a server, a gateway (master control + broadcast and data gateway), and several electronic price tags. The server and gateway are connected via wired Ethernet, while the gateway and electronic price tags communicate via a 2.4G proprietary communication protocol or other protocols. The server is primarily responsible for data calculation and data communication with the gateway and electronic price tags to update the data on the electronic price tags. The electronic price tags should include independent storage media (for storing original product information) and an electronic screen for displaying product information.
[0053] To implement the method in the embodiments of the present invention, the server side must maintain a local database to record the server data previously pushed by the server side and the electronic price tags to which the server data has been pushed. To better identify whether a piece of server data to be pushed is previously pushed, a best approach is to generate a unique identifier for each piece of server data. This means that the unique identifiers of different pieces of server data are different; when their unique identifiers are the same, they represent the same piece of server data. A common method for generating unique identifiers for server data is hashing. Therefore, before executing the step of "querying the server data in the local database based on the first identifier of the server data to be pushed," the method also includes the following step: performing a hashing calculation on the server data to be pushed to generate a first identifier. This first identifier serves as the unique identifier for the server data. Furthermore, since the local database records each piece of server data previously pushed by the server side and the corresponding first identifier for each piece of server data, querying the server data in the local database based on the first identifier of the server data to be pushed can determine whether the server data to be pushed is previously pushed by the server side, allowing for the subsequent implementation of appropriate push strategies.
[0054] Step S120: If the first identifier is found in the local database, the electronic price tag to be pushed is further searched in the historical push list of the server data according to the second identifier of the electronic price tag to be pushed.
[0055] Specifically, through the query of the above method steps, if the first identifier is found in the local database, it means that the server data to be pushed is server data that has been pushed by the server. At this time, it is necessary to further query the electronic price tag in the historical push list of the server data based on the second identifier of the electronic price tag to be pushed. This is because the server generally connects to multiple electronic price tags at the same time. The electronic price tag to be pushed is not necessarily an electronic price tag that has been pushed by the server data. By querying the electronic price tag in the historical push list of the server data based on the second identifier of the electronic price tag to be pushed, it can be determined whether the electronic price tag to be pushed is an electronic price tag that has been pushed by the server data, so that the corresponding push strategy can be adopted later. The second identifier is generally the identity ID of the electronic price tag itself. When the identity IDs are the same, it means that they are the same electronic price tag.
[0056] In addition, if the first identifier cannot be found in the local database, it means that the server data to be pushed is not the server data that has been pushed by the server. At this time, only the conventional push strategy can be adopted, that is, the server data is directly pushed to the electronic price tag in its entirety so that the electronic price tag can directly read and display it. At the same time, since the server data is completely pushed to the electronic price tag, it is the server data that has been pushed by the server for subsequent pushes. Therefore, at this time, the first identifier of the server data needs to be stored in the local database and the second identifier of the electronic price tag needs to be stored in the historical push list of the server data.
[0057] Step S130: If the electronic price tag is found in the historical push list, only the first identifier is pushed to the electronic price tag, so that the electronic price tag reads corresponding cache data in the cache according to the first identifier for display.
[0058] Specifically, through the query of the above method steps, if the electronic price tag is found in the historical push list, it means that the electronic price tag to be pushed is also the electronic price tag that has been pushed by the server data, that is, the electronic price tag to be pushed has received the server data to be pushed, and its cache may still store the server data to be pushed. At this time, it is only necessary to push the first identifier to the electronic price tag, and the electronic price tag can read the corresponding cache data in the cache according to the first identifier for display. Figure 4 As shown, the specific process is as follows:
[0059] Step S131: if after pushing the first identifier to the electronic price tag, a response message indicating successful display is received from the electronic price tag, the order of the server data is updated in the local database.
[0060] Step S132: If after pushing the first identifier to the electronic price tag, the electronic price tag returns a response message indicating that the display was not successful, the server data is completely pushed to the electronic price tag again and the server data is stored in the cache of the electronic price tag.
[0061] Since the electronic price tag cache can store a limited amount of cache data, generally 10 sets of cache data, when the 11th set of cache data is written to the cache, the first set of cache data written will be overwritten (because the price of the product is relatively stable, most of the updated data changes are switching between regular price and special price, so the 10 sets of cache data can fully cover more than 90% of application scenarios). Therefore, when the server pushes only the first identifier to the electronic price tag, so that the electronic price tag reads the corresponding cached data from the cache for display based on the first identifier, there is a possibility that the display may fail (this is because the corresponding set of cached data was written too long ago and has been overwritten by new cached data). In this case, if after pushing the first identifier to the electronic price tag, the electronic price tag receives a response message indicating that the display failed, it indicates that the corresponding set of cached data was written too long ago and has been overwritten by new cached data. The only option is to adopt a conventional push strategy, that is, to push the server data in full to the electronic price tag again so that the electronic price tag can directly read and display it. At the same time, after pushing the server data in full to the electronic price tag, the server data must be stored in the electronic price tag's cache to facilitate subsequent successful push and display. If, after pushing the first identifier to the electronic price tag, the electronic price tag receives a response message indicating that the display was successful, it indicates that the push process has been successfully completed. At the same time, to indicate that the currently pushed server data is the last displayed data, the order of the server data must be updated in the local database.
[0062] In addition, through the query of the above method steps, if no electronic price tag is found in the historical push list, it means that the electronic price tag to be pushed is not the electronic price tag that has been pushed by the server data. At this time, the server data can only be pushed directly to the electronic price tag in its entirety so that the electronic price tag can directly read and display it. At the same time, since after the server data is pushed in its entirety to the electronic price tag, for subsequent pushes, it belongs to the electronic price tag that has been pushed by the server data. Therefore, at this time, the second identifier needs to be stored in the historical push list of the server data.
[0063] Example 2
[0064] like Figure 5 As shown, the second embodiment of the present invention proposes a method for transmitting electronic price tag data. Based on the electronic price tag end, the method includes the following steps:
[0065] Step S210: receiving data pushed from the server, and determining whether the data is a first identifier.
[0066] Specifically, based on the method for transmitting electronic price tag data in the first embodiment of the present invention, the data pushed from the server may be either complete server data or the first identifier of the server data. Therefore, when it receives the data pushed from the server, it is necessary to first determine whether the data is the first identifier in order to adopt a corresponding display strategy.
[0067] Step S220: If the data is the first identifier, then further query the corresponding cache data in the cache according to the first identifier.
[0068] Specifically, if the data is the first identifier according to the above method steps, it is necessary to further query the corresponding cache data in the cache based on the first identifier. This is because the amount of cache data that can be stored in the electronic price tag cache is limited, generally 10 groups of cache data. In this way, when the 11th group of cache data is written to the cache, the first group of cache data written will be overwritten (because the price of the product is relatively stable, most of the updated data changes are switching between regular price and special price, so the 10 groups of cache data can fully cover more than 90% of the application scenarios).
[0069] In addition, when it is determined through the above method steps that the data is not the first identifier, it means that the data pushed by the server is complete server data. At this time, it is only necessary to directly read and display the data.
[0070] Step S230: If the corresponding cache data is found in the cache, the cache data is read and displayed, and the order of the cache data is updated in the cache, and a response message indicating successful display is fed back to the server.
[0071] Specifically, when querying through the above method steps, if the corresponding cached data is found in the cache, it means that the cached data has not been overwritten by the new cached data. At this time, it is only necessary to read and display the cached data. At the same time, in order to facilitate the subsequent push and display success, it is also necessary to update the sorting of the cached data in the cache (that is, to use the cached data as the last displayed data, and minimize the possibility of it being overwritten among all current cached data), and feedback the successful display response information to the server.
[0072] In addition, when querying through the above method steps, if the corresponding cache data cannot be found in the cache, it means that the corresponding set of cache data was written too long ago and has been overwritten by the new cache data. At this time, it is necessary to feedback the response information of the unsuccessful display to the server side so that the server side can re-push the server data corresponding to the first identifier in full.
[0073] Example 3
[0074] like Figure 6As shown, embodiment three of the present invention proposes a terminal 20, which includes a memory 21, a processor 22, a program stored in the memory and executable on the processor, and a data bus 23 for realizing connection and communication between the processor 21 and the memory 22. When the program is executed by the processor, the steps of the method for transmitting electronic price tag data in embodiment one or embodiment two are implemented, as described above, and will not be repeated here.
[0075] It should be noted that the terminal 20 embodiment of the embodiment of the present invention and the method embodiment 1 or method embodiment 2 belong to the same concept, and the specific implementation process is detailed in method embodiment 1 or method embodiment 2, and the technical features in method embodiment 1 or method embodiment 2 are correspondingly applicable in the terminal 20 embodiment, and will not be repeated here.
[0076] Example 4
[0077] Embodiment 4 of the present invention proposes a storage medium for computer-readable storage, which stores one or more programs. The one or more programs can be executed by one or more processors to implement the specific steps of the method for electronic price tag data transmission in the above-mentioned embodiment 1 or embodiment 2.
[0078] It should be noted that the above-mentioned storage medium and method embodiment 1 or method embodiment 2 belong to the same concept, and its specific implementation process is detailed in method embodiment 1 or method embodiment 2, and the technical features in method embodiment 1 or method embodiment 2 are applicable in the storage medium embodiment, and will not be repeated here.
[0079] The method, terminal and storage medium for transmitting electronic price tag data proposed in the embodiment of the present invention are such that when the electronic price tag needs to update the product information displayed on its electronic screen, its server side will first query the server data in the local database based on the first identifier of the server data to be pushed. Then, if the first identifier is queried in the local database, the electronic price tag is further queried in the historical push list of the server data based on the second identifier of the electronic price tag to be pushed. Finally, if the electronic price tag is queried in the historical push list, only the first identifier is pushed to the electronic price tag so that the electronic price tag reads the corresponding cache data in the cache according to the first identifier for display. In this way, the method for transmitting electronic price tag data maintains a local database on the server side to record the relevant information of the server data that has been sent, so that when the server data is pushed to the same electronic price tag again, it only needs to transmit the first identifier of the server data, so that the electronic price tag end can read the corresponding cache data in the cache according to the first identifier for display. Since only the first identifier of the server data needs to be transmitted, and the server data does not need to be transmitted in its entirety, the amount of transmitted data is greatly reduced and the transmission performance is greatly improved, thereby effectively solving the technical problem that the existing electronic price tag data transmission takes a long time and causes poor user experience.
[0080] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.
[0081] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.
[0082] Through the above description of the embodiments, those skilled in the art will clearly understand that the methods of the above embodiments can be implemented using software plus the necessary general-purpose hardware platform. Of course, hardware can also be used, but in many cases the former is the more preferred implementation method. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, or optical disk) and includes a number of instructions for enabling a terminal device (such as a mobile phone, computer, server, air conditioner, or network device) to execute the methods described in the various embodiments of the present invention.
[0083] The above are only preferred embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention description and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for transmitting electronic price tag data, based on the server side, characterized in that: The method comprises the following steps: Perform hash calculation on the server data to be pushed to generate a first identifier; querying the server data in a local database according to the first identifier of the server data; If the first identifier is found in the local database, the electronic price tag to be pushed is further searched in the historical push list of the server data according to the second identifier of the electronic price tag to be pushed; If the electronic price tag is found in the historical push list, only the first identifier is pushed to the electronic price tag, so that the electronic price tag reads corresponding cache data in the cache according to the first identifier for display; If the first identifier cannot be found in the local database, the server data is directly pushed to the electronic price tag in its entirety, and the first identifier is stored in the local database and the second identifier is stored in the historical push list of the server data; If the electronic price tag cannot be found in the historical push list, directly pushing the server data to the electronic price tag in its entirety, and storing the second identifier in the historical push list of the server data; If, after pushing the first identifier to the electronic price tag, a response message indicating successful display is received from the electronic price tag, the order of the server data is updated in the local database; If, after pushing the first identifier to the electronic price tag, a response message indicating that the electronic price tag has not been successfully displayed is received from the electronic price tag, the server data is completely pushed to the electronic price tag again, and the server data is stored in the cache of the electronic price tag.
2. A terminal, characterized in that: include: A memory, a processor, a program stored in the memory and executable on the processor, and a data bus for realizing connection and communication between the processor and the memory, wherein the steps of the method according to claim 1 are realized when the program is executed by the processor.
3. A storage medium for computer-readable storage, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the method according to claim 1.
Citation Information
Patent Citations
Data synchronization method and device, readable storage medium and electronic equipment
CN110489484A