Sensor program display method, device, system and medium
By using token stream text to transfer display image data and parsing drawing instructions, the problem that the LED display cannot read or parse old program documents after upgrading is solved, and the program playback is not affected by the upgrade is achieved.
Patent Information
- Application Number
- CN202411775176.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2044-12-05
AI Technical Summary
In the prior art, LED display screens may not be able to read or parse the program documents before the upgrade, resulting in problems with program playback.
The token stream text is used to transmit the display image data, and the program image is generated by the drawing instructions of the token stream text, and sent to the LED display for display.
It is realized that program playback is not easily affected by upgrades, and the data transmission of content displayed by sensor programs is more convenient and flexible, reducing the problem of software incompatibility caused by hardware upgrades.
Smart Images

Figure CN119248412B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the technical field of smart showcases, and in particular to a sensor program display method, device, system and medium. Background Art
[0002] In the prior art, LED display screens have been widely used in various commercial environments, such as advertising and sensor programs. The sensor program data received by the prior art LED display screen generally directly includes the display size, position, program content, picture or path of the sensor program. Different programs have different display sizes and positions. Taking a single sensor as an example, if the pixel area size of the sensor program is 256×256, when centered, if the total width of the text of the sensor program content is 100 and the height is 50, then the prior art calculates the center coordinates (x, y) as follows: x=(area width-program content width) / 2=(256-100) / 2=78; y=(area height-program content width) / 2=(256-50) / 2=103; the image of the sensor program can be drawn according to the position of the starting coordinates (x, y). The display size, position, program content or picture of the existing sensor program is usually stored in a preset file path in the form of a fixed file. These display sizes, positions, program content, pictures or paths have different settings corresponding to the upgrade. Therefore, the upgraded LED display screen may not be able to read or parse the program files before the upgrade, and the LED display screen before the upgrade may not be able to read or parse the program files after the upgrade. Therefore, a sensor program display method is urgently needed to overcome the problem of program playback before and after the upgrade. Summary of the invention
[0003] The embodiments of the present invention provide a sensor program display method, device, system and medium, which achieve the effect that program playback is not easily affected by upgrades.
[0004] According to one aspect of the present invention, a sensor program display method is provided, the method comprising:
[0005] Receive the token stream text corresponding to the display image of the sensor program;
[0006] Parsing the token stream text to obtain drawing instructions and text information;
[0007] generating a program image according to the sensor parameter information, the drawing instruction and the text information;
[0008] Send the program image to the LED display screen for display.
[0009] Optionally, parsing the token stream text includes:
[0010] Traverse the token stream text to identify all strings, parse the strings including preset rules into drawing instructions, and parse other strings into text information.
[0011] Optionally, traversing the token stream text to identify all character strings includes:
[0012] Convert the received token stream text into numbers according to preset rules to form a token number string;
[0013] Determine whether the token stream text includes a character string that meets the preset rules according to the preset digital string sequence;
[0014] Parse the strings in the token stream text that meet the preset rules into drawing instructions, and parse other strings in the token stream text into text information.
[0015] Optionally, the numbers include at least a first number, a second number, a third number, and a fourth number, and converting the text of the received token stream text into numbers according to a preset rule includes:
[0016] Convert the text in the token stream text to a first number, convert the character { in the token stream text to a second number, convert the character} in the token stream text to a third number, and convert the character $ in the token stream text to a fourth number.
[0017] Optionally, the string of the preset rule is ${xxx}, where xxx is any text, and judging whether the token stream text includes the string of the preset rule according to the preset sequence of digital strings includes:
[0018] According to the order of the digital string, first check whether the token stream text matches $. If yes, parse the token stream text to see if there are one or more {xxx} after $ until the next $ is matched. After the next $ appears, continue to parse the token stream text to see if there are one or more {xxx} after $ until the token stream text is traversed.
[0019] Optionally, parsing a character string in the token stream text that complies with a preset rule into a drawing instruction includes:
[0020] Determine whether the {xxx} after $ in the token stream text is a string in the format of {HD_XXX}. If so, the string can be parsed as a drawing instruction.
[0021] Optionally, the drawing instructions include one or more of unsupported instructions, executable instructions, and sensor type instructions.
[0022] According to another aspect of the present invention, there is provided a sensor program display device, comprising:
[0023] A data receiving module, used for receiving a token stream text corresponding to a display image of a sensor program;
[0024] A data parsing module, used for parsing the token stream text to obtain drawing instructions and text information;
[0025] An image generation module, used for generating a program image according to the sensor parameter information, the drawing instruction and the text information;
[0026] The image sending module is used to send the program image to the LED display screen for display.
[0027] According to another aspect of the present invention, there is provided an image display system comprising:
[0028] one or more processors;
[0029] The memory is used to store one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the above-mentioned sensor program display method.
[0030] According to another aspect of the present invention, there is provided a storage medium having a computer program stored thereon, wherein the program implements the above-mentioned sensor program display method when executed by a processor.
[0031] Compared with the prior art, since token stream text is used to transmit display image data, the data transmission of the content displayed by the sensor program is more convenient and flexible, and the format adjustment of the display content is also more convenient. There will be no problems of display information loss or image loading failure due to upgrades such as changing the storage path, increasing display content, and increasing sensor types. By parsing the drawing instructions of the token stream text, various formats of drawing can be directly implemented and the number of displayed sensor programs can be increased arbitrarily, reducing the problem of software incompatibility caused by hardware upgrades, and achieving the effect that program playback is not easily affected by upgrades. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0033] Figure 1 is a flow chart of a sensor program display method provided by Embodiment 1 of the present invention;
[0034] Figure 2 is a schematic diagram of an image to be displayed drawn according to a token stream text according to an embodiment of the present invention;
[0035] Figure 3 is a flow chart of a sensor program display device provided by Embodiment 2 of the present invention;
[0036] Figure 4 It is a schematic diagram of an image display system provided in Embodiment 3 of the present invention. DETAILED DESCRIPTION
[0037] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0038] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0039] Embodiment 1
[0040] Figure 1 is a flow chart of a sensor program display method provided by the first embodiment of the present invention. This embodiment can be applied to a sensor program display device for execution. The device can be implemented by software and / or hardware and can generally be integrated into an image display system. Figure 1 As shown, the method includes the following operations:
[0041] S110 , receiving a token stream text corresponding to a display image of a sensor program.
[0042] In one embodiment, the image display system may be an LED display screen. The LED display screen receives the display data of the sensor program before playing the sensor program, and then converts the data into an image format for display. In this embodiment, the display data is sent from the host computer or the sending card via a network cable to a playback box connected to the LED display screen or a receiving card of the LED display screen in the form of a token stream text, or the playback box connected to the LED display screen or the receiving card of the LED display screen receives the token stream text corresponding to the display image from a laptop or mobile phone terminal via a USB interface or WIFI communication.
[0043] S120: Parse the token stream text to obtain drawing instructions and text information.
[0044] In one embodiment, parsing the token stream text includes: traversing the token stream text to identify all character strings, parsing the character strings including preset rules as drawing instructions, and parsing other character strings as text information.
[0045] Specifically, the traversal of the token stream text to identify all character strings includes: converting the text of the received token stream text into numbers according to preset rules to form a token number string; judging whether the token stream text includes a character string of preset rules according to a preset number string order; parsing the character string in the token stream text that meets the preset rules into drawing instructions, and parsing other character strings in the token stream text into text information. In one embodiment, the numbers include at least a first number, a second number, a third number, and a fourth number, and the conversion of the received token stream text into numbers according to the preset rules includes: converting the text in the token stream text into a first number, such as 0, converting the character { in the token stream text into a second number, such as 1, converting the character} in the token stream text into a third number, such as 2, and converting the character $ in the token stream text into a fourth number, such as 3.
[0046] In one embodiment, if the token stream text is: ${HD_ALIGNMENT}current temperature${HD_ARGS}{fontColor=#ff0000}{fontName=SimSun}{fontSize=16}{fontBold=false}{fontItalic=false}{fontUnderline=false}, the converted token digital string is 310000000000000200003100000002100000000000000002100000000000000210000000000000021000000000000000210000000000000000210000000000000000021000000000000000002.
[0047] In one embodiment, the string of the preset rule is ${xxx}, where xxx is any text. The process of judging whether the token stream text includes the string of the preset rule according to the preset sequence of the digital string includes: first checking whether the token stream text matches $ according to the sequence of the digital string, if yes, parsing the token stream text to see if there are one or more {xxx} after $ until the next $ is matched, and after the next $ appears, continuing to parse the token stream text to see if there are one or more {xxx} after $ until the token stream text is traversed. In one embodiment, ${xxx} is identified as an instruction, and the rest is identified as text content. In one embodiment, parsing the string that meets the preset rule in the token stream text as a drawing instruction includes: judging whether {xxx} after $ in the token stream text is a string in the format of {HD_XXX}, and if so, parsing the string as a drawing instruction, and the rest is identified as text content.
[0048] In one embodiment, the drawing instructions include one or more of unsupported instructions, executable instructions, and sensor type instructions, wherein the executable instructions may include format instructions and supplementary instructions.
[0049] In one embodiment, the results of the analysis can be divided into the following situations:
[0050] The first type is an unsupported command, the format is ${HD_XXX}, but because the version is too low, {HD_XXX} XXX cannot be recognized, so it is impossible to parse what specific command it is.
[0051] The second type is executable instructions, which may include format instructions and / or supplementary instructions, such as ${HD_ALIGNMENT} for alignment instructions, ${HD_SPACING} for content spacing instructions, and ${HD_LINE} for line break instructions. ${ARGS}{...}{...} is a supplementary instruction that adds additional parameters to the previous instruction. Supplementary instructions may also be display and hide instructions, index instructions, address text, or any other executable instructions.
[0052] The third type is a sensor type instruction, such as ${HD_Temperature} for a temperature sensor instruction and ${HD_Humidity} for a humidity sensor instruction. In this implementation, the sensor type instruction is a placeholder for sensor parameter information. Preferably, the sensor parameter information is the specific parameter content sensed by the corresponding type of sensor, such as the temperature value sensed by a temperature sensor or the humidity value sensed by a humidity sensor.
[0053] The fourth type is text content. If the parsed result is not any of the above instructions, it is parsed as text content.
[0054] In one embodiment, the token stream text is: "${HD_ALIGNMENT}Current temperature ${HD_ARGS}{fontColor=#ff0000}{fontName=SimSun}{fontSize=16}{fontBold=false}{fontItalic=false}{fontUnderline=false}${HD_ALIGNMENT}{direction=right}${HD_SPACING}{x=6}{y=6}${HD_Temperature}{Unit=1}℃${HD_ARGS}{fontColor=#ff0000}{fontName=SimSun}{fontSize=16}{fontBold=false}{fontItalic=false}{fontUnderline=false}{BindSensorTypeShow=HD_Temperature}${HD_ALIGNMENT}${HD_LINE}${HD_ALIGNMENT}Current humidity${HD_ARGS}{fontColor=#ff0000}{fontName=SimSun}{fontSize=16}{fontBold=false}{fontItalic=false}{fontUnderline=false}${HD_ALIGNMENT}{direction=right}${HD_SPACING}{x=6}{y=6}${HD_Humidity}{Unit=0}%${HD_ARGS}{fontColor=#ff0000}{fontName=SimSun}{fontSize=16}{fontBold=false}{fontItalic=false}{fontUnderline=false}{BindSensorTypeShow=HD_Humidity}"
[0055] According to the above rules, ${HD_ALIGNMENT} indicates that the displayed content starts from the alignment mark, and "Current Temperature" is parsed as text content and is the first content to be displayed. ${HD_ARGS}{fontColor=#ff0000}{fontName=SimSun}{fontSize=16}{fontBold=false}{fontItalic=false}{fontUnderline=false} indicates the font, size, color, bold, underline and other format information of the text content "Current Temperature" when it is displayed. Among them, ${HD_ALIGNMENT}{direction=right} indicates that the displayed content after the first content is right-aligned, and ${HD_SPACING}{x=6}{y=6} indicates the interval x between the second content displayed after the first content and the first content, and the line spacing y between the displayed content and the next line. ${HD_Temperature}{Unit=1}℃ indicates the temperature sensor command and the display unit symbol. Here, the temperature sensor command is the second content to be displayed. ${HD_ARGS}{fontColor=#ff0000}{fontName=SimSun}{fontSize=16}{fontBold=false}{fontItalic=false}{fontUnderline=false} indicates the font, size, color, bold, underline and other format information of the temperature sensor command as the second content. {BindSensorTypeShow=HD_Temperature} indicates that the temperature sensor command will be displayed only when the specific parameter content is received, otherwise the display content will be blocked. ${HD_ALIGNMENT}${HD_LINE} indicates alignment and line break. {HD_ALIGNMENT} Current humidity means that the content displayed after the line break starts from the alignment mark, "Current humidity" is parsed as text content and used as the third content to be displayed after the line break. ${HD_ARGS}{fontColor=#ff0000}{fontName=SimSun}{fontSize=16}{fontBold=false}{fontItalic=false}{fontUnderline=false} indicates the font, size, color, bold, underline and other format information of the text content "Current humidity" when it is displayed. ${HD_ALIGNMENT}{direction=right}${HD_SPACING}{x=6}{y=6} indicates the interval x between the fourth content displayed after the line break and the third content in front, and the line spacing y with the next line,
[0056] ${HD_Humidity}{Unit=0}%$ represents the humidity sensor instruction and the display unit symbol. Here, the humidity sensor instruction is the fourth content to be displayed. {HD_ARGS}{fontColor=#ff0000}{fontName=SimSun}{fontSize=16}{fontBold=false}{fontItalic=false}{fontUnderline=false} represents the font, size, color, bold, underline and other format information displayed as the fourth content of the humidity sensor instruction. {BindSensorTypeShow=HD_Humidity} means that the humidity sensor instruction will be displayed only after receiving the specific parameter content, otherwise the display content will be blocked.
[0057] In one embodiment, when the temperature sensor instruction receives a parameter of 26 and the humidity sensor instruction receives a parameter of 70, the content displayed on the display screen 210 according to the above analysis result is as follows: Figure 2 As shown, Figure 2 The center alignment mark may include a left alignment mark 221 and a right alignment mark 222 .
[0058] S130, generating a program image according to the sensor parameter information, the drawing instruction and the text information;
[0059] In this embodiment, the sensor parameter information is the specific parameter content received corresponding to the sensor type instruction, that is, the specific parameter value detected by the sensor. These specific parameter values are stored in the preset parameter information path in the form of a document and updated in real time according to the detection frequency of the sensor. In the above embodiment, the parameter information path can be specified or modified by the instruction ${HD_ARGS}{fikeKey=key1}, that is, modifying the index value key1 of the parameter information path, so that when upgrading later, you only need to replace the index value key1 or replace the corresponding specific parameter document to be compatible with the old version. In an alternative embodiment, the index value of the parameter information path can be confirmed by determining which text stream the current token stream text is, such as: SensorTokenStream1, SensorTokenStream2, these two text streams correspond to the index of the temperature parameter information path and the humidity parameter information path respectively.
[0060] In one embodiment, multiple token stream texts are received. After each token stream text is parsed, the appearance or format of the sensor parameter information and / or text information is adjusted according to the obtained executable instructions for format adjustment to generate a sub-image to be displayed for each token stream text, and then the sub-images to be displayed corresponding to all token stream texts are merged and drawn into an image to be displayed.
[0061] In an alternative embodiment, after obtaining all the token stream texts, the image to be displayed is drawn once in a loop in the aforementioned manner and a drawing template is formed. The appearance or format of each text message is adjusted according to the executable instructions for format adjustment obtained to generate the corresponding first image. The first images corresponding to the relevant text information are pre-loaded. When drawing the complete image to be displayed, the drawing is performed in the order of the corresponding instructions of the token stream text. If it is a sensor instruction, the corresponding sensor parameter information is obtained and the second image is drawn at the corresponding position of the drawing template. If it is text information, the first image loaded at the corresponding position on the drawing template is directly drawn. After each loop, a frame of the image to be displayed is generated on the drawing template. If there is no other content to be displayed, the program image can be generated according to the image to be displayed. If there are other images to be displayed, the image to be displayed and the other images to be displayed are merged to generate each frame of the program image.
[0062] S140, sending the program image to the LED display screen for display.
[0063] In this embodiment, the program image is encoded and sent to the LED screen for display. In this embodiment, the program image encoding can be appropriately scaled according to the resolution of the LED display screen, or the brightness or chromaticity of the program image can be adjusted according to the brightness of the environment.
[0064] Compared with the prior art, the embodiment of the present invention adopts token stream text to transmit display image data, so the data transmission of the content displayed by the sensor program is more convenient and flexible, and the format adjustment of the display content is also more convenient. There will be no problems of display information loss or image loading failure due to upgrades such as changing the storage path, increasing the display content, and increasing the sensor type. By parsing the drawing instructions of the token stream text, various formats of drawings can be directly implemented, and the number of displayed sensor programs can be increased arbitrarily, which reduces the problem of software incompatibility caused by hardware upgrades and achieves the effect that program playback is not easily affected by upgrades.
[0065] Embodiment 2
[0066] Figure 3300 is a schematic diagram of the structure of a sensor program display device provided in the second embodiment of the present invention. The device 300 can be implemented by software and / or hardware, and can generally be integrated into an image display system, such as Figure 3 As shown, the device 300 includes a data receiving module 310 , a data parsing module 320 , an image generating module 330 and an image sending module 340 .
[0067] The data receiving module 310 is used to receive the token stream text corresponding to the display image of the sensor program.
[0068] In one embodiment, the image display system may be an LED display screen. The LED display screen receives the display data of the sensor program before playing the sensor program, and then converts the data into an image format for display. In this embodiment, the display data is sent from the host computer or the sending card via a network cable to a playback box connected to the LED display screen or a receiving card of the LED display screen in the form of a token stream text, or the playback box connected to the LED display screen or the receiving card of the LED display screen receives the token stream text corresponding to the display image from a laptop or mobile phone terminal via a USB interface or WIFI communication.
[0069] The data parsing module 320 is used to parse the token stream text to obtain drawing instructions and text information.
[0070] Optionally, the data parsing module 320 further includes a text parsing module for parsing the token stream text. Specifically, the text parsing module traverses the token stream text to identify all character strings, parses the character strings including preset rules into drawing instructions, and parses other character strings into text information.
[0071] Optionally, the text parsing module includes a text conversion module, a character judgment module and an instruction generation module. The text conversion module is used to convert the text of the received token stream text into numbers according to preset rules to form a token number string; the character judgment module is used to judge whether the token stream text includes a character string of preset rules according to a preset number string sequence. The instruction generation module is used to parse the character string in the token stream text that meets the preset rules into a drawing instruction, and parse other character strings in the token stream text into text information.
[0072] Optionally, the numbers include at least a first digit, a second digit, a third digit, and a fourth digit, and the text conversion module is further used to convert the text in the token stream text into a first digit, convert the character { in the token stream text into a second digit, convert the character} in the token stream text into a third digit, and convert the character $ in the token stream text into a fourth digit, and the character string of the preset rule is ${xxx}, where xxx is any text.
[0073] Optionally, the string of the preset rule is ${xxx}, where xxx is any text, and the character judgment module is further used to first check whether the token stream text matches $ according to the order of the digital string, and if so, parse the token stream text to see whether there are one or more {xxx} after $ until the next $ is matched. After the next $ appears, continue to parse the token stream text to see whether there are one or more {xxx} after $ until the token stream text is traversed.
[0074] Optionally, the character judgment module is further used to judge whether {xxx} after $ in the token stream text is a string in the format of {HD_XXX}, and if so, the string can be parsed as a drawing instruction.
[0075] In one embodiment, the numbers include at least a first number 0, a second number 1, a third number 2, and a fourth number 3, and converting the text of the received token stream text into numbers according to a preset rule includes: converting the text in the token stream text into a first number, such as 0, converting the character { in the token stream text into a second number, such as 1, converting the character} in the token stream text into a third number, such as 2, and converting the character $ in the token stream text into a fourth number, such as 3. In one embodiment, if the token stream text is: ${HD_ALIGNMENT} current temperature ${HD_ARGS}{fontColor=#ff0000}{fontName=SimSun}{fontSize=16}{fontBold=false}{fontItalic=false}{fontUnderline=false}, the converted token digital string is 3100000000000002000031000000021000000000000000002100000000000000210000000000000021000000000000000021000000000000000002. In this embodiment, converting the token digital string into a digital string and then performing rule recognition can reduce the amount of data storage and speed up the calculation.
[0076] In one embodiment, the character string of the preset rule is ${xxx}, where xxx is any text. The step of judging whether the token stream text includes the character string of the preset rule according to the preset sequence of the digital string includes: first checking whether the token stream text matches $ according to the sequence of the digital string, and if so, parsing the token stream text to see whether there are one or more {xxx} after $ until the next $ is matched, and after the next $ appears, continuing to parse the token stream text to see whether there are one or more {xxx} after $ until the token stream text is traversed.
[0077] In one embodiment, ${xxx} is recognized as an instruction, and the rest is recognized as text content. In one embodiment, the character string in the token stream text that meets the preset rules is parsed as a drawing instruction, including: determining whether {xxx} after $ in the token stream text is a character string in the format of {HD_XXX}, and if so, the character string can be parsed as a drawing instruction, and the rest is recognized as text content.
[0078] In one embodiment, the drawing instructions include one or more of unsupported instructions, executable instructions, and sensor type instructions, wherein the executable instructions may include format instructions and supplementary instructions.
[0079] The results of the analysis can be divided into the following situations:
[0080] The first type is unsupported instructions, the format is ${HD_XXX}, but because the version is too low, {HD_XXX} cannot be parsed into what specific instruction it is.
[0081] The second type is executable instructions, which may include format instructions, such as ${HD_ALIGNMENT} for alignment instructions, ${HD_SPACING} for content spacing instructions, and ${HD_LINE} for line break instructions. ${ARGS}{...}{...} is a supplementary instruction that adds additional parameters to the previous instruction. The supplementary instruction can be a display and hide instruction, an index instruction, an address text, or any executable instruction.
[0082] The third type is a sensor type instruction, such as ${HD_Temperature} for a temperature sensor instruction and ${HD_Humidity} for a humidity sensor instruction. In this implementation, the sensor type instruction is a placeholder for sensor parameter information. Preferably, the sensor parameter information is the specific parameter content sensed by the corresponding type of sensor, such as the temperature value sensed by a temperature sensor or the humidity value sensed by a humidity sensor.
[0083] The fourth type is text content. If the parsed result is not any of the above instructions, it is parsed as text content.
[0084] In one embodiment, the token stream text is: "${HD_ALIGNMENT}Current Temperature ${HD_ARGS}{fontColor=#ff0000}{fontName=SimSun}{fontSize=16}{fontBold=false}{fontItalic=false}{fontUnderline=false}${HD_ALIGNMENT}{direction=right}${HD_SPACING}{x=6}{y=6}${HD_Temperature}{Unit=1}℃${HD_ARGS}{fontColor=#ff0000}{fontName=SimSun}{fontSize=16}{fontBold=false}{fontItalic=false}{fontUnderline=false}{BindSensorTypeShow=HD_Temperature}${HD_ALIGNMENT}${HD_LINE}${HD_ALIGNMENT}Current Humidity${HD_ARGS}{fontColor=#ff0000}{fontName=SimSun}{fontSize=16}{fontBold=false}{fontItalic=false}{fontUnderline=false}${HD_ALIGNMENT}{direction=right}${HD_SPACING}{x=6}{y=6}${HD_Humidity}{Unit=0}%${HD_ARGS}{fontColor=#ff0000}{fontName=SimSun}{fontSize=16}{fontBold=false}{fontItalic=false}{fontUnderline=false}{BindSensorTypeShow=HD_Humidity}"
[0085] According to the above rules, ${HD_ALIGNMENT} indicates that the displayed content starts from the alignment mark, and "Current Temperature" is parsed as text content and is the first content to be displayed. ${HD_ARGS}{fontColor=#ff0000}{fontName=SimSun}{fontSize=16}{fontBold=false}{fontItalic=false}{fontUnderline=false} indicates the font, size, color, bold, underline and other format information of the text content "Current Temperature" when it is displayed. Among them, ${HD_ALIGNMENT}{direction=right} indicates that the displayed content after the first content is right-aligned, and ${HD_SPACING}{x=6}{y=6} indicates the interval x between the second content displayed after the first content and the first content, and the line spacing y between the displayed content and the next line. ${HD_Temperature}{Unit=1}℃ indicates the temperature sensor command and the display unit symbol. Here, the temperature sensor command is the second content to be displayed. ${HD_ARGS}{fontColor=#ff0000}{fontName=SimSun}{fontSize=16}{fontBold=false}{fontItalic=false}{fontUnderline=false} indicates the font, size, color, bold, underline and other format information of the temperature sensor command as the second content. {BindSensorTypeShow=HD_Temperature} indicates that the temperature sensor command will be displayed only when the specific parameter content is received, otherwise the display content will be blocked. ${HD_ALIGNMENT}${HD_LINE} indicates alignment and line break. {HD_ALIGNMENT} means that the content displayed after the line break starts from the alignment mark, and "Current humidity" is parsed as text content and used as the third content to be displayed after the line break. ${HD_ARGS}{fontColor=#ff0000}{fontName=SimSun}{fontSize=16}{fontBold=false}{fontItalic=false}{fontUnderline=false} means the font, size, color, bold, underline and other format information of the text content "Current humidity" when it is displayed.${HD_ALIGNMENT}{direction=right}${HD_SPACING}{x=6}{y=6} indicates the interval x between the fourth content displayed after the line break and the third content in front, and the line spacing y between the fourth content and the next line. ${HD_Humidity}{Unit=0}%$ indicates the humidity sensor instruction and the display unit symbol. Here, the humidity sensor instruction is the fourth content to be displayed. {HD_ARGS}{fontColor=#ff0000}{fontName=SimSun}{fontSize=16}{fontBold=false}{fontItalic=false}{fontUnderline=false} indicates the font, size, color, bold, underline and other format information of the humidity sensor instruction displayed as the fourth content. {BindSensorTypeShow=HD_Humidity} indicates that the humidity sensor instruction is displayed only when the specific parameter content is received, otherwise the display content is blocked.
[0086] The image generation module 330 is used to generate a program image according to the sensor parameter information, the drawing instruction and the text information.
[0087] When the temperature parameter value received corresponding to the temperature sensor instruction is 26, and the humidity parameter received corresponding to the humidity sensor instruction is 70, the content displayed on the display screen 210 according to the above analysis results is as follows: Figure 2 As shown, Figure 2 The center alignment mark may include a left alignment mark 221 and a right alignment mark 222 .
[0088] In this embodiment, the sensor parameter information is the specific parameter content received corresponding to the sensor type instruction, that is, the specific parameter value detected by the sensor. These specific parameter values are stored in the preset parameter information path in the form of a document and updated in real time according to the detection frequency of the sensor. In the above embodiment, the parameter information path can be specified or modified by the instruction ${HD_ARGS}{fikeKey=key1}, that is, modifying the index value key1 of the parameter information path, so that when upgrading later, you only need to replace the index value key1 or replace the corresponding specific parameter document to be compatible with the old version. In an alternative embodiment, the index value of the parameter information path can be confirmed without an instruction, but by determining which text stream the current token stream text is to update and confirm the index value of the parameter information path, such as: SensorTokenStream1, SensorTokenStream2, these two text streams correspond to the index of the temperature parameter information path and the humidity parameter information path respectively.
[0089] In one embodiment, multiple token stream texts are received. After each token stream text is parsed, the appearance or format of the sensor parameter information and / or text information is adjusted according to the obtained executable instructions for format adjustment to generate a sub-image to be displayed for each token stream text, and then the sub-images to be displayed corresponding to all token stream texts are merged and drawn into an image to be displayed.
[0090] In an alternative embodiment, after obtaining all the token stream texts, the image to be displayed is drawn once in a loop in the aforementioned manner and a drawing template is formed. The appearance or format of each text message is adjusted according to the executable instructions for format adjustment obtained to generate the corresponding first image. The first images corresponding to the relevant text information are pre-loaded. When drawing the complete image to be displayed, the drawing is performed in the order of the corresponding instructions of the token stream text. If it is a sensor instruction, the corresponding sensor parameter information is obtained and the second image is drawn at the corresponding position of the drawing template. If it is text information, the first image loaded at the corresponding position on the drawing template is directly drawn. After each loop, a frame of the image to be displayed is generated on the drawing template. If there is no other content to be displayed, the program image can be generated according to the image to be displayed. If there are other images to be displayed, the image to be displayed and the other images to be displayed are merged to generate each frame of the program image.
[0091] In one embodiment, the image sending module 340 is used to send the program image to the LED display screen for display. Specifically, the program image can be encoded and sent to the LED screen for display. In this embodiment, the encoding of the program image can be appropriately scaled according to the resolution of the LED display screen, or the brightness or chromaticity of the program image can be adjusted according to the brightness of the environment.
[0092] In this embodiment, the above-mentioned sensor program display device can execute the sensor program display method provided in any embodiment of the present invention, and has the functional modules and beneficial effects corresponding to the execution method. For the technical details not described in detail in this embodiment, please refer to the sensor program display method provided in any embodiment of the present invention. Since the sensor program display device introduced above is a device that can execute the sensor program display method in the embodiment of the present invention, based on the sensor program display method introduced in the embodiment of the present invention, the technical personnel in this field can understand the specific implementation method of the sensor program display device of this embodiment and its various variations, so how the sensor program display device implements the sensor program display method in the embodiment of the present invention will not be described in detail here. As long as the technical personnel in this field implement the device used by the sensor program display method in the embodiment of the present invention, it belongs to the scope of protection of this application.
[0093] Embodiment 3
[0094] Figure 4 FIG. 4 is a schematic diagram showing the structure of an image display system provided by Embodiment 3 of the present invention. Figure 4 As shown, the image display system 400 includes an LED display screen 410 and a receiving card / playback box 420. The LED display screen 410 and the receiving card / playback box 420 are connected in a wired network or a wireless network. In one embodiment, the receiving card 420 can also be integrated on the driver board of the LED display screen 410. The receiving card / playback box 420 includes at least one processor 11 and a memory (only the detailed structure of the local conference host is shown in the figure) that is communicatively connected to the at least one processor 11, wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the image display system 400 can also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other through the bus 14. The input / output (I / O) interface 15 is also connected to the bus 14.
[0095] Multiple components of the image display system 400 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the image display system 400 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0096] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the processor of the image display system 400 implementing the sensor program display method.
[0097] In some embodiments, the sensor program display method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the image display system 400 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the sensor program display method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the sensor program display method in any other appropriate manner (e.g., by means of firmware).
[0098] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0099] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0100] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0101] To provide interaction with a user, the systems and techniques described herein may be implemented on a mobile terminal having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the mobile terminal. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0102] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0103] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0104] Embodiment 4
[0105] Embodiment 4 of the present invention further provides a computer storage medium storing a computer program, wherein the computer program is used to execute any of the above embodiments of the present invention when executed by a computer processor.
[0106] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM, or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.
[0107] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0108] The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wire, optical cable, radio frequency (RF), etc., or any suitable combination of the foregoing.
[0109] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
[0110] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A sensor program display method, applied to an LED display screen, characterized in that: The method comprises: Receive the token stream text corresponding to the display image of the sensor program; Parsing the token stream text to obtain drawing instructions and text information; generating a program image according to the sensor parameter information, the drawing instruction and the text information; Send program images to LED screen for display; The drawing instructions include unsupported instructions, executable instructions, and sensor type instructions, wherein the executable instructions include format instructions and supplementary instructions; The parsing of the token stream text includes: Traverse the token stream text to identify all strings, parse the strings including preset rules into drawing instructions, and parse other strings into text information; The traversal of the token stream text identifies all character strings, parses the character strings including preset rules into drawing instructions, and parses other character strings into text information including: Convert the received token stream text into numbers according to preset rules to form a token number string; Determine whether the token stream text includes a character string that meets the preset rules according to the preset digital string sequence; Parse the strings in the token stream text that meet the preset rules into drawing instructions, and parse other strings in the token stream text into text information.
2. The sensor program display method according to claim 1, characterized in that: The numbers include at least a first number, a second number, a third number, and a fourth number, and the converting the text of the received token stream text into numbers according to a preset rule includes: Convert the text in the token stream text to a first number, convert the character { in the token stream text to a second number, convert the character} in the token stream text to a third number, and convert the character $ in the token stream text to a fourth number.
3. The sensor program display method according to claim 2, characterized in that: The string of the preset rule is ${xxx}, where xxx is any text. The method of judging whether the token stream text includes the string of the preset rule according to the preset sequence of digital strings includes: According to the order of the digital string, first check whether the token stream text matches $. If yes, parse the token stream text to see if there are one or more {xxx} after $, until the next $ is matched. After the next $ appears, continue to parse the token stream text to see if there are one or more {xxx} after $, until the token stream text is traversed.
4. The sensor program display method according to claim 3, characterized in that: The step of parsing a character string in the token stream text that complies with a preset rule into a drawing instruction includes: Determine whether the {xxx} after $ in the token stream text is a string in the format of {HD_XXX}. If so, parse the string as a drawing instruction.
5. A sensor program display device, applied to an LED display screen, characterized in that: include: A data receiving module, used for receiving the token stream text corresponding to the display image of the sensor program; A data parsing module, used for parsing the token stream text to obtain drawing instructions and text information; An image generation module, used for generating a program image according to the sensor parameter information, the drawing instruction and the text information; An image sending module is used to send program images to the LED screen for display; The drawing instructions include unsupported instructions, executable instructions, and sensor type instructions, wherein the executable instructions include format instructions and supplementary instructions; The parsing of the token stream text includes: Traverse the token stream text to identify all strings, parse the strings including preset rules into drawing instructions, and parse other strings into text information; The traversal of the token stream text identifies all character strings, parses the character strings including preset rules into drawing instructions, and parses other character strings into text information including: Convert the received token stream text into numbers according to preset rules to form a token number string; Determine whether the token stream text includes a character string that meets the preset rules according to the preset digital string sequence; Parse the strings in the token stream text that meet the preset rules into drawing instructions, and parse other strings in the token stream text into text information.
6. An image display system, characterized in that: include: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the sensor program display method as described in any one of claims 1-4.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the sensor program display method as described in any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Public place air environment monitoring display system
CN101101300A
Presentation generation method and device, and electronic device
CN109493401A